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

RE: use-when attribute?

Subject: RE: use-when attribute?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 18 Dec 2004 14:07:59 -0000
RE:  use-when attribute?
> The big difference is that those global variables execute 
> expressions. The keys contain match 
> patterns. I am pretty sure that all keys are built with only 
> a single pass through the document. If 
> it isn't so, than the programmers haven't implemented it very 
> cleverly, I would say...


Saxon builds the index for each key when that key is first used against a
particular document. In general, you don't know which keys will be used for
which document, and there's no point building an index for a key that won't
be used.

In any case, scanning the nodes is not expensive compared with evaluating
the pattern and the use expression, so it doesn't much matter whether it's
done in one scan or several. It's not like a database, where disc accesses
are expensive and need to me minimised.

Also, forming the union of three node-sets isn't necessarily expensive in a
pipelined implementation, especially if the path expressions that produce
the three node-sets automatically deliver results in sorted order. (This is
another reason for avoiding // - an expression of the form //a/b may need to
be sorted, whereas /*/a/b doesn't).

Michael Kay
http://www.saxonica.com/

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.