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

Re: document function in xslt

Subject: Re: document function in xslt
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 21 Mar 2003 00:56:53 -0700 (MST)
document in xsl
Stevenson Ngila wrote:
> does the use of this document function lower the speed of my application?
> i.e. if i have:
> 
> <><><><><><><><><><><><><><><><>
> <xsl:variable name="config-top" select="document( 'names.xml' )/config"/>
> <><><><><><><><><><><><><><><><>
> 
> does it act as a variable where by onces set it doesn't depend on the
> availability of names.xml document any more?

It should not make a difference whether you call document() once and bind its
result to a variable, or call it separately each time where you need it.
Emphasis on "should"...

Even if you call document() more than once, processors are required to
implement it in a way that always returns an identical root node, and thus the
same document, for the given URI. You should not assume that your processor is
conformant, though. I have seen some, uh, variability in this regard.
The way you are doing it is probably safer, even though it shouldn't make
a difference.

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.