Sandy wrote:
I am doing XSL transformation using xalan, but sometimes the input XML files
are too large and that cause
"java.lang.OutOfMemoryError: Java heap space" exception in xalan.
Is there any way to split the xml file and do processing.
I tried to use the -FLAVOR s2s assuming that it will help as xalan won't
keep the xml tree in memory, but that also didn't help.
There's a different transformation language called STX, which can
transform in a streaming fashion (as opposed to XSL, which generally
requires the whole input document to be loaded before all expressions
can be evaluated). It's much faster, too.
You might want to google for it, and see if your transform can be
translated into that. If you don't use upward axes, it probably can.
Otherwise, you have to look through your transform manually and see if
there is anything preventing you from doing a split, such as sibling
axis steps on the nodes that you want in separate documents, or
predicates that examine something about nodes that have been flung into
a different document.
Soren