xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Re: [Xalan] OutOfMemoryException by using the document()-function
Date Fri, 09 Feb 2001 20:22:10 GMT

Myriam, I may be confused, but I don't think the problem here is with
stylesheet processing, but with the document function.

Harald, this is a well known problem.  In XalanJ1 we had implemented a
processing instruction where you could tell Xalan that it was OK to release
the tree.  In XalanJ2 we plan to implement an algorithm that will know by
stylesheet analysis that it is OK to release a node.  Having multiple trees
is just another wrinkle on the more general problem -- but with added
complexity because the URL to the tree can be dynamic, and so you can refer
to the same tree without static analysis of the stylesheet being able to
determine this.  We'll be focusing very hard on this in the next couple of
months.  Until this is implemented, the only thing I can think of is to
increase your memory.  If this will still not do the trick, then perhaps we
can re-implement the processing instruction in XalanJ2 as a stop-gap


                    otus.com             To:     general@xml.apache.org                  
                                         cc:     xalan-dev@xml.apache.org, (bcc: Scott Boag/CAM/Lotus)
                    02/09/2001           Subject:     Re: [Xalan] OutOfMemoryException by
using the document()     
                    10:57 AM             -function                                       
                    respond to                                                           

This is probably a better question for the xalan list so I took the liberty
of forwarding it there...
Yes, that is a problem. Someone can correct me if I'm wrong, but I believe
that we need to keep all the stylesheets around in case there is a later
reference to them, which obviously is problematic. That being said, I think
there was some work done on some caching algorithm for releasing the
stylesheets, but I don't remember the details of that. Maybe someone else
can be more helpful?


Harald Hett <h.hett@gis-systemhaus.de> on 02/08/2001 10:01:56 AM

Please respond to general@xml.apache.org

To:   general@xml.apache.org
cc:    (bcc: Myriam Midy/CAM/Lotus)
Subject:  [Xalan] OutOfMemoryException by using the document()-function

Hello List!
I've got a problem using Xalan-j with a large amount of data, that is
spread over a central document like
                     <include file="subdoc1.xml"/>
                     <include file="subdoc2.xml"/>
                     <include file="subdocN.xml"/>

and a number of sub-documents, that are referenced by the

Now I tried to analyze this by writing a simple stylesheet, that only
does the
includes and nothing else (i.e. no output at all):

           <xsl:stylesheet ...>
                     <xsl:template match="/">
                               <xsl:apply-templates select="*" mode

                     <xsl:template match="include" mode="include">
                               <xsl:apply-templates select="document

                     <xsl:template match="*" mode="include">
                               <!-- do nothing -->

Doing so, xalan must be able to parse through a big number of
without running out of memory, I thought.
But as I let xalan process it, the memory was not freed after each
include and so after a certain number of sub-documents xalan stops with

Has anyone a guess?

Harald Hett <h.hett@gis-systemhaus.de>

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message