XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2016)
-> - Issue with Processing Instruct... (1)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> + Query + ddtek:http-post optio... (5)
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Steven FancherSubject: Document loading and unloading
Author: Steven Fancher
Date: 11 Jan 2007 05:24 PM
Here is a general question:

When does a document referenced by doc(...) get unloaded from memory?

I'm processing a bunch (>5000) small XML files and I keep blowing the stack.

Does anyone know if there is a rule about this? Is it completely implementation dependent? Should it be when the variable bound to the doc() goes out of scope?

-Steven Fancher

Postnext
(Deleted User) Subject: Re: Document loading and unloading
Author: (Deleted User)
Date: 12 Jan 2007 03:10 AM
Hi Steven,
as you guessed, it's implementation-dependent; however, the
requirement that every call to doc() must be "stable" (i.e. when
given the same argument, it must return the exact same node tree,
with the same identity) almost forces every implementation to keep
all of them in memory until processing ends.

If you are using Saxon, it defines an extension function to release
such documents, saxon:discard-document (see
http://www.saxonica.com/documentation/extensions/functions/discarddocument.html)

Hope this helps,
Alberto

Posttop
Steven FancherSubject: Re: Document loading and unloading
Author: Steven Fancher
Date: 12 Jan 2007 09:04 AM
Thanks Alberto. I'll give it a try.

Steven Fancher

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.