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

RE: variable with document() reference

Subject: RE: variable with document() reference
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 1 Sep 2004 19:27:17 +0100
xsl variable document
It depends entirely on the implementation. Most implementations will only
load the document once. If they load it twice they are required to allocate
the same node identity the second time, so it's less work to keep it in
memory and avoid reloading it: but they could try to be clever and flush it
out if memory is in short supply...

Michael Kay

> -----Original Message-----
> From: 0 8 [mailto:0112358@xxxxxxxxx] 
> Sent: 01 September 2004 18:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  variable with document() reference
> 
> I really should know the answer to this, but I can't seem to 
> get a handle on it.
> 
> If I reference an external document in a variable, like...
> 
> <xsl:variable name="xln-source" select="document($file)" />
> 
> ...and then need to loop through it, like...
> 
> <xsl:for-each 
> select="$xln-source//set[descendant::start/@xlink:href = $match]">
>    <!-- do something -->
> </xsl:for-each>
> 
> ...is the external document being loaded in the variable or it the
> for-each call?  I have a different for-each later requiring the same
> document and I would like to load it only once.
> 
> I'm actually thinking that I may need to move this to keys anyways,
> but it's bothering me that I can't answer this question.
> 
> Thanks,
> -m

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.