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 2000/12/05 22:05:28 UTC

Re: Streaming and pruning and Xalan-2 -- CLARIFICATION

I misspoke: Xalan _does_ do streaming. What it doesn't do is pruning.


What's usually meant by a "streaming processor" is one that can start
running the stylesheet before the whole source document has been parsed,
and outputs the result document as it's calculated rather than waiting for
the whole result document to be generated. As I noted, Xalan can do that
today, which should reduce latency and (depending on the stylesheet and
source document involved) reduce  the amount of time spent in the parser.


But some XSLT developers -- including myself --  have a bad habit of using
"streaming" as a shorthand for a bunch of memory optimization issues that
would be particularly useful for a streaming processor. The most useful of
these would be to discard portions of the source document that are no
longer needed by the stylesheet, or that weren't needed in the first place,
so the processor could handle larger documents with less memory. Those
optimizations are definitely on Xalan's wishlist, but aren't yet supported
in the current version of the code.

We really need a better term for the latter, to avoid this confusion. I'm
suggesting "pruning", since it's primarily a matter of trimming off
branches of the input tree that we don't need.  If anyone objects, feel
free to suggest an alternative.

(Note that you may not be able to apply pruning when handed the input
document in the form of a DOM -- because whoever gave you that DOM may
expect to get it back unaltered. We may eventually want to provide a
parameter on stylesheet invocation, and/or a trax option, that indicates
whether the source DOM can safely be pruned or not.)


So Xalan-2 _does_ run as a streaming processor -- but does not yet perform
pruning, though it's likely to do so in the future.

I hope that's a bit clearer!