xsl-list
[Top] [All Lists]

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

2006-08-26 08:17:08
On Friday 25 August 2006 12:08, Michael Kay wrote:
Firstly, the fact that ./v[$p] doesn't work, but ./v[$p + 0] does work,
means that the value of $p is not a number. Perhaps it is a string, or
perhaps it is a result tree fragment. Either way, you would probably get an
immediate performance improvement by changing it to be a number, to avoid
the conversion costs each time the value is used.

Incidentally, the expression "./v" is exactly the same as "v". If your
processor is particularly stupid, the more complex expression might take
longer to evaluate.

When is the context item not redundant in a path expression? Some examples:

./a/b/c
a/b/c/.
a/b/./c
a/b/././c


Cheers,

                Frans

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