>My problem: The transformer seems to hold the complete "Tree" in memory
>before writing anything to the file :-(
That's true.
We usually refer to this general issue as "pruning" -- recognizing when a
stylesheet definitely will not refer back to an early portion of the source
document and discarding it. This would require both additional stylesheet
analysis (to recognize when it can be done) and some work on the
source-document data structures (to actually return the dead storage to the
heap). It might also need some DTD or Schema analysis, to help us
understand where particular structures can and can't occur.
And it's likely that folks would have to write their stylesheets fairly
carefully in order to take advantage of this.
So it's definitely something we're interested in, but we're still in the
early stages of figuring out how to make it work. Until we do, you may find
that you're still better off hand-coding some kinds of SAX filters.