Visit Mozilla.org

XPath:Functions:key

From MDC

XSLT/XPath Reference: XSLT elements, EXSLT functions, XPath functions, XPath axes

Contents


The key function returns a node-set of nodes that have the given value for the given key.

[edit] Syntax

key( keyname , value )

[edit] Arguments

keyname
A string containing the name of the xsl:key element to be used.
value
The returned node-set will contain every node that has this value for the given key.

[edit] Returns

A node set.

[edit] Notes

  • The xsl:key element defines what attribute on what given elements will be used to match the key.

This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library.

[edit] Defined

XSLT 1.0 12.2

[edit] Gecko support

Supported.