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

Re: Seeking Examples of XSLT Memory Stress

  • To: Michael Kay <mike@s...>
  • Subject: Re: Seeking Examples of XSLT Memory Stress
  • From: Bob Foster <bob@o...>
  • Date: Wed, 17 Aug 2005 15:57:03 -0700
  • Cc: xml-dev@l...
  • In-reply-to: <20050817175530.8C0A82FD78@l...>
  • References: <20050817175530.8C0A82FD78@l...>
  • User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

stress memory windows
But then the semantics of unload are that those two guarantees no longer 
apply. Is that too hard to specify?

Bob Foster
http://xmlbuddy.com/

Michael Kay wrote:
>>If the document falls out of scope then both XSLT 1 and 2 allow
>>an implementation to discard it.  I don't think we'll see a
>>procedural way to discard a document otherwise, except as
>>part of something like the XQuery update facility perhaps.
>>
> 
> 
> In practice it's quite difficult to discard the document automatically. The
> spec offers two guarantees:
> 
> (a) if the same document (URI) is loaded again, you'll get the same node
> identifiers
> 
> (b) if the same document (URI) is loaded again, it will have the same
> content
> 
> It would be possible to discard the document and achieve (a) by remembering
> the node identifiers and reusing them if needed. Achieving (b) though is
> really hard, given that the URI might in the worst case identify a random
> number generator. The only real way to do it is to serialize a private copy
> of the document to disk.
> 
> The real problem though is in deciding when it's a good idea to discard the
> document. For example, if the stylesheet is working its way through the
> @href links from the primary source document, what's the chance that you'll
> want to visit the same target document more than once? That's why I decided
> that in this case having a user function to tell me when the document is no
> longer needed is rather more useful.
> 
> Michael Kay
> http://www.saxonica.com/


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.