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

Re: 10,000 document()'s

Subject: Re: 10,000 document()'s
From: david_n_bertoni@xxxxxxxxxx
Date: Tue, 8 Apr 2003 11:22:32 -0700
Re:  10



> The obvious approach is to use a for-each loop that includes a variable
that
> opens the external file using a document() call. The problem is that the
> process inevitably runs out of memory, both with Saxon and Xalan. It
seems
> that the variables are passing out of scope and being destroyed as they
> should, but I gather from a posting by Michael Kay
> (http://www.biglist.com/lists/xsl-list/archives/200212/msg00507.html)
that
> all of those document() source trees are remaining in memory throughout
the
> transformation, adding up to megabytes of data.
>
> Can anyone suggest a strategy? The process doesn't have to be fast, it
just
> has to finish.

Xalan has a feature to turn off caching, but doing so will interfere with
guarantees of generate-id() and the document() function.

The feature is detailed here:

   http://xml.apache.org/xalan-j/faq.html#faq-N102AE

The compliance feature that is broken is detailed here:

   http://www.w3.org/TR/xslt#document

   "Two documents are treated as the same document if they are identified
   by the same URI. The URI used for the comparison is the absolute URI
   into which any relative URI was resolved and does not include any
   fragment identifier. One root node is treated as the same node as
   another root node if the two nodes are from the same document. Thus, the
   following expression will always be true:

   generate-id(document("foo.xml"))=generate-id(document("foo.xml"))"

Dave


 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.