>If I have a SAX stream & I feed it to XALAN & want
>a SAX stream back internally does XALAN convert my
>input document into a DOM tree 

Actually, in that case we use our own data models, which are 
lighter-weight than most DOM implementations.. but as you noted, we do 
need an in-memory model because stylesheets may traverse the document in 
any direction at any time. 

Searching the archives of this list for "pruning" and "filtering" will 
turn up comments about ongoing efforts to find ways to reduce the amount 
of that model which is built and/or retained. There are some opportunities 
for clever coding here, but achieving them is emphatically nontrivial and 
the optimizations may work only for some limited subset of stylesheets. 
For example, I believe our SQL Extension does _not_ maintain a full model 
-- but for that reason, only some sequences of processing can be 
successfully applied against it. The "holy grail" here is an optimizer 
which analyses the stylesheet and finds opportunities to reduce the 
working set, and a model (or models plural) which can respond to that 
information.

Meanwhile, turning on incremental mode (see the "features" page of the 
documentation) may help in some cases, if your stylesheet doesn't have to 
examine the whole document to produce its results. 

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. 
"may'ron DaroQbe'chugh vaj bIrIQbej"  ("Put down the squeezebox and nobody 
gets hurt.")

Reply via email to