Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XSLT Reference

key Function

Retrieves elements previously marked with an xsl:key statement.

node-set key(name, value)

Remarks

The key() function retrieves a node set (zero or more nodes) that have the same key name and key value specified in the <xsl:key> statement. When the XSLT style sheet is first processed, the keys are stored internally to simplify access. Keys can simplify accessing nodes in the XML document, but may not be faster than using XPath to retrieve the same nodes.

Example

The key() function works in conjunction with the <xsl:key> element. For an example, see <xsl:key> Element.

See Also

Initiate XSLT in a Script