You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jo...@lotus.com on 2001/01/25 15:56:16 UTC

Re: little off-topic /some question about XSL

>    i have some doubt about how an XSLT processor works...
> - does it use a SAX parser or a DOM parser????

The simple answer is "yes". For example, Xalan can accept either a SAX
stream or a DOM tree as input. It may run faster if you can feed it SAX and
let it build its own customized data model (currently the Stree classes).

>- has anyone ever tried to use Xalan along with JDOM??

That's been discussed, but as far as I know never implemented. This is
open-source code; if you need it, you could try coding up the appropriate
code to either make JDOM look like a "real" DOM (may be challenging since
JDOM discards some information that the DOM considers meaningful, and I'm
not sure whether any of it is info that Xalan expects to have availalbe),
or to import the JDOM's data into XSLT's internal representation (easiest
solution would be instead to export the JDOM's contents into a SAX stream,
then feed that stream into Xalan's existing SAX interfaces).


RE: little off-topic /some question about XSL

Posted by chris markiewicz <cm...@commnav.com>.
right, convert jdom to whatever...i currently convert it to a dom:

(d is a JDOM Document)

org.jdom.output.DOMOutputter domout = new DOMOutputter();
String tmp = "org.jdom.adapters.XercesDOMAdapter";
org.w3c.dom.Document domDoc = domout.output(d, tmp);

there is also a SAXOutputtter class...

my question - the previous email says that it may run faster if i feed it a
SAX...why is that...is it just easier for xalan to process a SAX?  my choice
of DOM was probably arbitrary.

chris

-----Original Message-----
From: Joseph_Kesselman@lotus.com [mailto:Joseph_Kesselman@lotus.com]
Sent: Thursday, January 25, 2001 9:56 AM
To: xalan-dev@xml.apache.org
Cc: xalan-dev@xml.apache.org
Subject: Re: little off-topic /some question about XSL



>    i have some doubt about how an XSLT processor works...
> - does it use a SAX parser or a DOM parser????

The simple answer is "yes". For example, Xalan can accept either a SAX
stream or a DOM tree as input. It may run faster if you can feed it SAX and
let it build its own customized data model (currently the Stree classes).

>- has anyone ever tried to use Xalan along with JDOM??

That's been discussed, but as far as I know never implemented. This is
open-source code; if you need it, you could try coding up the appropriate
code to either make JDOM look like a "real" DOM (may be challenging since
JDOM discards some information that the DOM considers meaningful, and I'm
not sure whether any of it is info that Xalan expects to have availalbe),
or to import the JDOM's data into XSLT's internal representation (easiest
solution would be instead to export the JDOM's contents into a SAX stream,
then feed that stream into Xalan's existing SAX interfaces).