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

Re: Testing if something is not there

Subject: Re: Testing if something is not there
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 6 Nov 2001 15:50:04 +0000
Re:  Testing if something is not there
Hi Mike,

> Saxon currently evaluates all variables except node-set variables at
> the time they are declared. For node-set variables, it evaluates the
> select expression the first three times the variable is referred to;
> the third time, it saves the value of the variable in memory. This
> is a time/space trade-off: for many simple node-set expressions such
> as "following-sibling::*", allocating space to hold the value is
> more expensive than re-evaluating it on each reference.

Ahh... I'd misinterpreted/misremembered what you'd said at XSLT-UK
about this. Thanks for the clarification. So with Saxon as the
processor, it's worth putting an expression into a variable if it's
(a) likely to be expensive to compute *and* (b) going to be executed
more than three times in the same context.

[Jim: I forgot the other aspect of using variables which is handy,
namely for maintenance it's easier to refer to complicated expressions
than repeat them in the code.]

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.