[EMAIL PROTECTED] wrote:
Is it an actual out-of-memory problem, or a resource limitation problem of one sort or the other?
The error full dump is below. I have plenty diskspace, and judging from 'top' it does seem to be a memory issue.
[troi]~/tasks/talentum/xsl-conv/news>date;java -Xmx196M -Xms196M org.apache.xalan.xslt.Process -IN /tmp/NEWSFILE -INCREMENTAL -FLAVOR s2s -XSL group_demo.xsl -TEXT -EDUMP > /tmp/RELATIONS.sql;date
Thu Jan 31 19:47:02 CET 2002
javax.xml.transform.TransformerException: java.lang.reflect.InvocationTargetException
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1230)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:642)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1092)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1070)
at org.apache.xalan.xslt.Process.main(Process.java:904)
---------
java.lang.reflect.InvocationTargetException
at org.apache.xml.dtm.ref.IncrementalSAXSource_Xerces.deliverMoreNodes(IncrementalSAXSource_Xerces.java:336)
at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.nextNode(SAX2DTM.java:728)
at org.apache.xml.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:557)
at org.apache.xml.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1031)
at org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:471)
at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:355)
at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:383)
at org.apache.xpath.axes.WalkingIterator.nextNode(WalkingIterator.java:182)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:316)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:226)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:420)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:226)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2186)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2012)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1175)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:642)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1092)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1070)
at org.apache.xalan.xslt.Process.main(Process.java:904)
---------
java.lang.reflect.InvocationTargetException: java.lang.OutOfMemoryError
<<no stack trace available>>
Thu Jan 31 19:49:29 CET 2002
As an experement, if you're just trying to get the thing processed, try using <xsl:strip-space elements="*"/>
I tried placing that in the bottom of my template hierarchy, but to no avail. Also tried using the translate - I got the correct output, but still memory problems.
The only other suggestions I can offer are 1) try the latest CVS source, or 2) send me (privately) the input file and the XSLT, and I will try running it on my end. I am also working on a optimization branch right now, and it would be interesting to see if the behavior is any different, or if there's something that could be rearchitected to help.
But, out of 500Mb, it might be that we simply can't handle it without Joe's pruning code (or at least tail pruning) being operational (work on which keeps getting pushed back in favor of other priorities... ugh.)
I'm not certain I understand the concept of tail pruning, but I assume it means freeing ressources occupied by elements that have been read and will not be accessed again.
The structre I'm working on looks like this:
<newsrcs> <newsrc user="mpk"> <group id="duuni.vapaa-aika.atleettiklubi"> <subscribed/> <elementA/> <elementB/> </group> </newsrc>
.. </newsrcs>
There are lots of newsrc elements (~43000). More interesting, there are lots of elementA and elementB within each newsrc, in no particular order, making the tree very "wide". But I never access the elementA and elementB elements from the XSLT.
I think I'll try and reduce the document size by filtering away the elements that I don't need in this run.
Thanks for the tips (and enlightenment :)
Morten
