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

Re: Re: RE: Best Practice - collection() function

Subject: Re: Re: RE: Best Practice - collection() function
From: <philip.vallone@xxxxxxxxxxx>
Date: Mon, 07 Jul 2008 07:41:47 -0500 (CDT)
Re: Re: RE:  Best Practice - collection() function
Hi Andrew,

Thanks for the help. I think the question sounds odd because I may have not been clear. You say they [keys] are built once per input document; by input document, do you mean supplied input file or each document in the collection()? I ask so I get a better understanding of whats going on when I use the collection() function and Keys. Right now, it works great and all my documents (e.g. tables, xref) are indexed.

As for your suggestion using "saxon:discard-document:" - I applied this during some test last week but didn't see much of a difference in memory usage. However it was not a controlled environment. I will do some more test.

Thanks,

From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: 2008/07/07 Mon AM 06:52:06 CDT
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: RE:  Best Practice - collection() function

>
> 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?
>

That's an odd-ish question - what is the significance of xsl:key being
a top-level element?

Keys should always be held in memory... that's what they're for :)
They're built once per input document, and that could be each
document-node returned from calling collection, or a single variable
wrapping that call... it's up to you and whether you need to key your
entire set or just each document.

If you are using Saxon and having memory issues with collection() then
use saxon:discard-document:
http://ajwelch.blogspot.com/2006/11/using-collection-and-saxondiscard.html

-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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.