> Is it true when the source is SAX events, Xalan will still need to build
> an internal source tree for the transformation?
Yes, though it can be done incrementally if you turn on the incremental
attribute.
> Now the internal tree
> representation is DTM, done by SAX2DTM?
Yes.
> So if the source is DOM, will Xalan use this tree directly, or build
> another internal representation in DTM? If I understand right, DOM2DTM
> is only a wrapper that the same DOM tree can be accessed via DTM
> interface, right?
DOM2DTM builds a pretty heavy weight wrapper around it. However, it still
gets data directly from the original DOM node.
> Has anybody benchmarked the performance of SAXSource and DOMSource under
> the new DTM implementation?
Against what? We've done lots of benchmarking of SAX2DTM, fairly little of
DOM2DTM.
> Which case will be faster, consume less memory?
I'm pretty sure case 2, by a pretty big margin. But I have no concrete
benchmarks of this case to base this on.
> Another question is about the Result, does Xalan fire the result SAX
> events in any way, then depend on the Result, it will pass the SAX
> events, build DOM, or serialize to Stream, respectively?
Xalan will fire SAX events, which will be handled by a serializer,
DOMBuilder, or ContentHandler, depending on the Result object passed to the
transform function.
-scott
"Li Liang"
<lliang@first To: <[EMAIL PROTECTED]>
rain.com> cc: (bcc: Scott Boag/CAM/Lotus)
Subject: DOM and SAX input in DTM
07/11/01
07:45 PM
Please
respond to
xalan-dev
Hi,
I have a question about the SAXSource and DOMSource under the context of
DTM.
Is it true when the source is SAX events, Xalan will still need to build
an internal source tree for the transformation? Now the internal tree
representation is DTM, done by SAX2DTM?
So if the source is DOM, will Xalan use this tree directly, or build
another internal representation in DTM? If I understand right, DOM2DTM
is only a wrapper that the same DOM tree can be accessed via DTM
interface, right?
Has anybody benchmarked the performance of SAXSource and DOMSource under
the new DTM implementation?
1. I have a DOM, use a custom DOM2SAX serializer to traverse the tree,
fire SAX events to Xalan.
2. With the same DOM, pass the DOMSource directly to Xalan.
Which case will be faster, consume less memory?
Another question is about the Result, does Xalan fire the result SAX
events in any way, then depend on the Result, it will pass the SAX
events, build DOM, or serialize to Stream, respectively?
Thanks a lot.
Li