Subject: RE: [xsl] XSLT 1.0 support in browsers, as of June 2008 From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 18 Jun 2008 17:10:49 +0100 |
> not(//xref[@target=$anchor])"> > > > >The only way to avoid the "//" above would be to use xsl:key > > Is that they case? Binding //xref or //xref[@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[@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/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT 1.0 support in brows, Julian Reschke | Thread | Re: [xsl] XSLT 1.0 support in brows, M. David Peterson |
Re: [xsl] XSLT 1.0 support in brows, Julian Reschke | Date | Re: [xsl] XSLT 1.0 support in brows, Liam Quin |
Month |