thomas908 wrote:
> Please help me find a solution to this problem. The requirement I have is
> something like this:
>
> 1. We have, as an input, XML files ranging from 20-400MB which we need to
> process.
> 2. A series of XSLTs (12 in number) need to be applied on these XMLs to
> process them (XML to XML transformation). Output of first XSLT will be input
> of second, output of second will be input of third and so on.
> 3. These XMLs need to be imported in an XML Database (eXist)
>
> We have to automate this process.
> I have written some Java code, which does the following
> 1. Applies XSLs on XML
> 2. Stores the processed XMLs in eXist database
>
> But for big XMLs I keep on getting OutOfMemory Exceptions. Is there a better
> approach to do this?
> Will Cocoon be of any use in this?
>   
XSL transformation requires to build the entire DOM in memory.
So, no way. The bigger is the document the more memory you use.
You have to use a different approach, like STX, for example.

http://stx.sourceforge.net/
http://en.wikipedia.org/wiki/Streaming_Transformations_for_XML

Take a look if you can reach the same goal.
Cocoon has an stx transformer (based on joost). Take a look in the block
samples.

Alberto


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to