Um... it's all in the code? (Sorry, no coffee yet) You can read some of the details at http://xml.apache.org/xalan-j/features.html#incremental and http://xml.apache.org/xalan-j/dtm.html
Very roughly, Xalan always builds a DTM (Document Table Model: very very roughly our own read-only DOM-like thing) of the XML document in memory; the transformer reads from that to grab nodes out of the input XML. We build that either using our DOM2DTM or SAX2DTM classes. For the SAX one, if you set the proper incremental feature, then we will start transforming (i.e. calculating and producing output) as soon as we think we can while we're still building the full DTM. If some transformation feature (XPath or whatever) tries to access a node that's not in the DTM yet, then we wait until it is. The short answer is: yes, we *try* to perform transformations incrementally when incremental feature is set on; how it really works is in the code or in someone else's head. In some cases, we can also do a better job with incremental transforms when using Xerces specifically as a parser, since one of the classes takes advantage of Xerces-specific features. We still work with any other JAXP-compliant parser, just the threading model changes. Note that if you feed us a DOMSource as the XML document, we don't bother to use incremental since it's all in memory already. In terms of only keeping the minimum you need in memory when using SAX, we're still working on that. One technique is called pruning, where you periodically delete the DTM nodes of the XML from memory after you know you don't need them anymore in the transformation process. The problem is knowing when you no longer need the nodes... ===== - Shane <eof .sig="'When I use a word,' Humpty Dumpty said, in a very serious tone, 'it means exactly what I choose it to mean - neither more nor less'" "Oohayu oyod?!"=gis. /> __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
