[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Some Pointers on XSLT 2.0 vs. 1.0 and for Using XS

Subject: Re: Some Pointers on XSLT 2.0 vs. 1.0 and for Using XSLT 2.0 on the Web
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Mon, 13 Oct 2008 19:55:13 -0400
Re:  Some Pointers on XSLT 2.0 vs. 1.0 and for Using XS
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.