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

RE: RE: Best Practice - collection() function

Subject: RE: RE: Best Practice - collection() function
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 7 Jul 2008 12:55:43 +0100
RE: RE:  Best Practice - collection() function
> I am using Saxon 9.06 - 
> 
> Question - I am using keys to provide cross referencing for 
> the index. Since the keys are declared as a child of 
> <xsl:stylesheet>, when I call a collection(), is the key over 
> written or does the key continue to hold all the information 
> in memory?
> 

An index is constructed for a given document the first time the key()
function is used to search that document. The index will be held in memory
so long as both the compiled stylesheet and the document tree are in memory.
In the case of collection(), if you don't use saxon:discard-document(), the
document tree is held in memory until the end of the transformation. In
fact, if I remember correctly, saxon:discard-document() has no effect if
there are indexes for the document in memory [but I need to check that].

Michael Kay
http://www.saxonica.com/

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.