1. Web
  2. XML
  3. XPath
  4. Reference
  5. Functions
  6. key

key

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

Syntax

key( keyname, value )

Parameters

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.

Return value

A node set.

Description

  • 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.

Specifications

XSLT 1.0 12.2

Gecko support

Supported.

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /