This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How parser maintains and XML tree


> I was just wondering that the xslt parsers use DOM
> structure and I am still not convinced that the parser
> would be able to maintain a large XML tree say, 50Mb
> or more. 
> It will show the Out of memory problems, if this is
> the case then what is the solution for this problem? 
> Otherwise in case it works for large XML struct. then
> how do they maintain in the memory?????

You are right that XSLT requires a tree representing the whole document
and that pretty well all current processors require this tree to be in
memory. There are Saxon users who have successfully processed documents
over 100Mb but this does need a lot of memory.

If the transformation is simple, you can often break it up so that each
"record" of the source file is transformed separately. With Saxon, you
can use saxon:preview to achieve this. With other processors, you can
write a SAX filter that breaks the large document into lots of small
documents and transforms each one in turn.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]