In general, XSLT -- because it has full random access to the source document -- needs acces to the whole input at once, which means it has trouble with huge documents. There have been attempts at "streaming" processors, but they generally handle only limited subsets of the language, and Xalan doesn't have much (if any) capability in that area.
For more detailed background, check the archives of this mailing list; search for discussion of "streaming" and "pruning". Depending on the exact characteristics of your problem, the simplest solution may be to rewrite it as a custom SAX application, possibly passing selected subtrees through Xalan. Or you might want to check whether your needs fit into the range where one of the existing limited-streaming processors (such as the one in the Datapower product) could handle it. ______________________________________ "... Three things see no end: A loop with exit code done wrong, A semaphore untested, And the change that comes along. ..." -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish ( http://www.ovff.org/pegasus/songs/threes-rev-11.html)