RE: RE: [xsl] Best Practice - collection() function

Subject: RE: RE: [xsl] Best Practice - collection() function
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Mon, 07 Jul 2008 08:16:50 -0400
On Mon, 2008-07-07 at 12:55 +0100, Michael Kay wrote:
> > 
> > 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 jaxp terms, is the compiled stylesheet the (javax.xml.transform.)
Templates or the Transformer object?

And for the document tree, that would exist just for the duration of the
transformation, right?


> 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

Current Thread