On Oct 13, 2008, at 1:55 PM, Jesse Heines wrote:
I have been using XSLT 1.0 for many years to render Java Server
Pages on my
website (http://teaching.cs.uml.edu/~heines) from data stored in XML
files.
I do this quite a bit. You would be much happier with JSP 2.0 with
JSTL and the Expression Language. It is very XML friendly (and
therefore XSL friendly).
Also, you could get rid of the font element with a simple (external)
CSS style. JSTL has an XSL 1.0 like syntax. Expression language is
somewhat similar to attribute value templates (but you can use them
anywhere).
<div>
<xsl:if test="$test=val">
<xsl:attribute name="class">blah</xsl:attribute>
</xsl:if>
</div>
The only clumsy thing at this point is because of danged SGML legacy
things like checked=checked, selected=selected. What I do is generate
these into the JSP like so:
<input type="radio"
name="bar"
value="foo${obj.bar='foo' ? '& quot; checked=& quot;checked' : ''}"/>
Ugly, but at least you can generate it from one place in the XSL and
not have to write it for each input.
best,
-Rob
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--