[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: document function in xslt
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|