Re: [xslt] problem with key and position() function

On Mon, Mar 26, 2007 at 03:33:29PM +0200, Stéphane Mottelet wrote:
> Hi folks, I am encoutering a problem when using the
> function position() with the result of a key().
>             <xsl:value-of select="position(key('match_a','second'))"/>
> Is it  a bug, or am I missing something. I would expect to get the result :
> <result>2</result>
 it returns a node-set containing the nodes in the same document as the context node that have a value for the named key equal to this string.

there would be only one element in that node set, so the position can only be 1
so what you wrote is probably not what you expected.

does not take any argument.
Nothing replace checking the docs a bit when learning a new language


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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