[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: document() runs out of memory

Subject: Re: document() runs out of memory
From: Scott_Boag@xxxxxxxxx
Date: Tue, 21 Mar 2000 15:06:11 -0500
xalan out of memory
Xalan keeps an internal cache of the documents, so it shouldn't be
recreating a source tree or parsing each time.  I suspect you are running
into a variable bug that has since been fixed.  We just released Xalan
1.0.0, so I suggest you try that.

BTW, Xalan-specific questions are better posted on the Xalan dev list (you
can subscribe at http://xml.apache.org/mail.html).  The xsl-list should be
reserved for XSL specific questions.

-scott




                                                                                                                           
                    Brad Sommerfeld                                                                                        
                    <bsommerfeld@xxxxxxx>        To:     "'XSL-List@xxxxxxxxxxxxxxxx'" <XSL-List@xxxxxxxxxxxxxxxx>         
                    Sent by:                     cc:     (bcc: Scott Boag/CAM/Lotus)                                       
                    owner-xsl-list@mulber        Subject:     document() runs out of memory                                
                    rytech.com                                                                                             
                                                                                                                           
                                                                                                                           
                    03/21/00 02:31 PM                                                                                      
                    Please respond to                                                                                      
                    xsl-list                                                                                               
                                                                                                                           
                                                                                                                           



I am using the document function to read in external files but seem to be
exceeding my memory limits.  I believe it is because the previously read
files are still being held in memory but I don't know how to remove them.


The main template is:


  <xsl:template match="/">
    <xsl:for-each select="document('all_forms_list.xml')/someURIs/file/text
()">
    <xsl:variable name="contents" select="document(string(.))"/>
    <xsl:apply-templates select="$contents//XFDL"/>
    </xsl:for-each>
  </xsl:template>





There is a single document all_forms_list.xml which is a list of URI's to
be read.  When the list gets to about 250 URI's the parser exists with an
out of memory exception.


I am using Apache Xalan 0.19.2 with 256meg of memory on a pentium running
NT 4.0.


I ran a test to determine if it was the input or the output trees that were
exceeding the memory and concluded that it was the inputs.  I doubled the
size of the output tree (by executing the templates 2X) and still failed at
the same number of inputs even though my outputs went from ~3000 lines of
XML to ~6000 lines of XML.


I'm afraid that the variable $contents is being created scoped within the
for-each and that I'm getting a new one everytime but I don't know how to
prevent it.  Any ideas?


Brad Sommerfeld








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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.