>would expect a steady memory usage when using SAX.
If you don't reference the whole source document, make sure you've told
Xalan to read the document incrementally. This will avoid building more of
the document-content data model (DTM) than is actually examined by the
stylesheet. Writing your stylesheet to limit how much data it retrieves --
not searching for all instances of something when you only intend to
operate on the first, for example -- can help Xalan take advantage of this
feature.
We do not yet have the logic required to recognize when a stylesheet will
never again reference part of the data model and release ("prune") that
storage, except in the special case of Result Tree Fragments. We know
that's a significant opportuity for improvement when processing large
documents. I have not had time to synchronize my prototype sketch with the
recent changes in Xalan and test it.