Java heap space problem in xalan

S

Sandy

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.
 
S

Soren Kuula

Sandy said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top