--- Tom Fennelly <[EMAIL PROTECTED]> wrote: > Hi there. > > I have a 2Gb message (file based) and was wondering > could I transform it > using Xalan. I tried (supplying as a StreamSource) > and it bombed out > (OOM errors). I actually tried then with smaller > files and went down to > 100M and it's still bombing out. Am I doing > something wrong?
The only realistic way with xsl would be processing such data subtree by subtree. With 100 meg docs, you'd need 400-500 megs just to hold DOM tree (or such) in memory (typical memory usage for DOM is 3x - 5x size of input doc; part is from utf8 -> Java's 2-byte char expansion, rest object/structural overhead). Aside from possibly using SAX, StAX may be bit simpler to use for explicitly written conversion code. There is also a streaming alternative to xsl called stx, which might work for you if you prefer declarative style. Hope this helps, -+ Tatu +- ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ