xsl-list
[Top] [All Lists]

Re: [xsl] xslt performance issue position() function used in predicate very slow

2006-08-25 04:26:06

performance questions are always processor specific, and you haven't
said what processor you are using.

<xsl:value-of select="./v[position()=$p]"/>
(the ./ at the front isn't needed)

BTW abbreviated version doesn't wok  i.e. select="./v[$p]" but
select="./v[$p+0]" works
is this some bug ???

most likely you are defining $p to be a string or result tree fragment
rather than a number, in which case v[$p] is the same as v[true()]
ie the same as v, unless $p is the empty string.
It's likely to be more efficient to generate $p as a number than a result
tree fragment, if that's what you are doing.

David

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