Re: [xslt] Different behavior of Key() betwen versions 1.1.7 and 1.1.11 of libxslt



This was a bug fixed long ago.  The key() function should only return matches
from the same source document as the context node.

> <xsl:for-each select="str:split(@ref,' ')">
>         <xsl:for-each select="key('point',.)">
>         (...)
>         </xsl:for-each>
> </xsl:for-each>

str:split creates a new document (xslt rvt) so the key() function will not find
any matches from your original.  Run xsltproc --verbose and see the messages
about context document changing.  This is per the spec.  There are workarounds
for accomplishing this, do a google search, but libxslt is doing the correct thing.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]