tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Studley <Luke.Stud...@cerillion.com>
Subject RE: Dynamic XML/XSLT with Tomcat 4.0
Date Sat, 19 Jan 2002 11:31:40 GMT
I've been round this route myself recently. These observations might be
useful:

1. Originally I was using XML/XSLT to generate HTML/WML on the fly using
Servlet 2.3 filters and the TraX API. This worked fine - but I found the
resultant site relatively hard to maintain.

2. Took a trip through Cocoon2 world to see how it could fit in. I got very
excited for a while and started re-writing my site - but then I realized
that what I was effectively doing was creating "custom tags" in the XML data
that were implemented using XSLT. Sound familiar?

3. Ended up in Struts/JSP/Taglib world. This is much better for the site
(although I'd still prefer to be doing XML/XSLT personally ;). The taglibs
you need are already written, JSP programmers are easier to get hold of than
XSLT - plus as Craig noted there is the excellent Xtags library which allows
me to embed XSLT directives in my JSP page to access my original dynamic XML
datasources

One other point - about using dynamic XPath. If you are using the
(excellent) SAXON XSLT processor you can create and evaluate xpath
expressions on the fly using the saxon:evaluate() function. (Not sure - but
I think there is something similar for Xalan).

However, for ultimate flexibility, if you are using the XTags taglib you can
use a dynamic input stream (such as another JSP page) for both your XML and
XSL. The only thing I regret about the XTags library is that it uses the
DOM4J library underneath and I can't use the more advanced SAXON functions -
but it is fine for small scale data extraction from XML sources.

Luke

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message