[jdom-interest] JDom <-> Xalan
Jason Hunter
jhunter at collab.net
Tue Aug 22 11:02:31 PDT 2000
The fastest and lightest way to do an XSL transformations on a JDOM
document would be to use an XSLT engine that acted on the JDOM document
directly. That support isn't there yet.
The second fastest/lightest way would probably be to output SAX events
from the JDOM document as input for Xalan. You can then capture the
output as another JDOM document, or let Xalan handle outputting to the
final destination. You can output SAX events from a JDOM doc using
org.jdom.output.SAXOutputter. It's not written yet either, but it'd be
real easy. If you want fast/light execution you can take an hour or two
and write it.
The third best way is to serialize the doc as chars and feed the chars
into Xalan. It works, and I know people are doing that conversion with
JDOM. It's still better than using DOM. :-)
-jh-
Ilja Preuß wrote:
>
> Hi!
>
> In a project I am working on, we decided to try using XML/XSL for our
> Web-Frontend. I would like to use JDom to dynamically build XML-trees
> containing the data to be presented, putting those and some static xsl's
> into Xalan to get the final html-ouput 'on the fly'.
>
> The suggested way to use JDom data as input for Xalan seems to be via a
> character stream, but I am a little bit worried about the overhead involved
> in parsing the raw character data into some form of xml-tree, although the
> original source already is in the (admittedly another) form of such a tree.
> On the other hand, it is advised against using DOM, because of its bulky
> format, right? So what about using SAX as the interface between the two? Is
> this already possible (sadly, I couldn't figure it out myself)? If not,
> wouldn't it be nice if it was possible?
>
> Regards, Ilja
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list