xsl-list
[Top] [All Lists]

Re: [xsl] XPath shorthand

2012-08-22 08:55:00
Am 22.08.2012 um 15:22 schrieb Ihe Onwuka 
<ihe(_dot_)onwuka(_at_)googlemail(_dot_)com>:

following-sibling::*[local-name() = $names]


Yes I didn't think of this but there are two things.

This won't work in a template match on XSLT 1.0 and it is hiding
multiple comparisons under the innocent looking equality general
comparison which may bite on large volumes.

Well, that the "innocent looking equality comparison" has the meaning of 
"exists in" in XSLT 2 and is IMO one of the first things you have to learn when 
switching from XSLT 1.0. Whoever takes 2.0 serious – compared to just changing 
the version attribute of the xsl:stylesheet – will know about that.

Also, I believe that any decent XSL processor will create a hash on $names and 
therefore deliver about the same performance compared to xsl:key.

- Michael MH
--~------------------------------------------------------------------
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>
--~--


<Prev in Thread] Current Thread [Next in Thread>