[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: Jarno.Elovirta@xxxxxxxxx
Date: Fri, 21 Mar 2003 09:36:16 +0200
xsl document cache
Hi,

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

I didn't quite get the last sentence. Anyhow, most, if not all processors, evaluate variable only when they're needed, so if you don't use $config-top anywhere, the document names.xml is not fetched and read into a source tree. Also, processors cache the documents for the duration of the transformation (or life-span of e.g. Transformer object), so if it's used in multiple locations in your stylesheet, processed only once. 

Cheers,

Jarno - Ivory Frequency: Today is the Day

 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.