xsl-list
[Top] [All Lists]

Re: [xsl] Generating JSP/JSTL

2007-04-24 18:32:32
On Apr 24, 2007, at 1:06 PM, Robert Koberg wrote:


What *is* a serious pain with JSP and tag libraries (I suppose more with
the taglibs and their devs...) is the very common use of this type of
thing:

<foo bar="<blah:blah/>"/>


That sort of thing was pretty much unavoidable in older JSP containers, leading many people to say:

I prefer Velocity.

JSP 2.0 is much more sane, even w/o the XML syntax. You can, for example, use the JSTL expression language directly in attributes and text, so you don't need the "tag within the attribute" abomination. But still, I gave the XML style JSPs a try a while back (I think they are referred to in the JSP spec, confusingly, as "JSP Documents") and found them lacking. As I recall (it's been a while) you can write an XML/JSP something like:

 <jsp:root xmlns:jsp=' .... '>
  <html>
    ...
    Penn &amp; Teller
    ...
  </html>
 </jsp:root>

which, when "serialized" (JSP doesn't use that term, which might indicate the source of the problem) comes out as

 <html>
   ...
   Penn & Teller
   ...
 </html>

I gave up on "JSP Documents", and went back to plain old JSP, which as I say is much simpler to write these days. But in conjunction with XSLT I expect you'll have difficulties in any case, since non- XML JSP isn't XML at all (page declarations, for example) and XML JSP contains weird little gotchas, e.g. see above.

--

joe




--~------------------------------------------------------------------
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>
--~--