xsl-list
[Top] [All Lists]

RE: [xsl] XSLT 1.0 support in browsers, as of June 2008

2008-06-18 09:11:14
not(//xref[(_at_)target=$anchor])"> 

The only way to avoid the "//" above would be to use xsl:key

Is that they case? Binding //xref or //xref[(_at_)target] to a 
variable might do nearly as well as a key.

True if the number of xref elements in the document is small, but false if
it is large.

Keys are useful only because they allow for optimization 
using information that cannot always be deduced reliably from 
a stylesheet by itself. 

Saxon-SA typically builds an index anyway, except in a few special cases
like //xref[(_at_)target=$param] where $param is global. The wasted cost if the
index only used once is much less than the potential benefits if it's used
repeatedly. (There's another rule you can use, which is to build the index
the second time the expression is used, on the theory that if an expression
is evaluated twice then it's probably going to be evaluated often. But it's
not worth the hassle - I've seen cases where the indexing makes things
slower, but not enough to get anyone upset.)

I'd be interested to see Saxon-SA vs Saxon-B numbers for the stylesheet in
question.

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--