home contribute faq download

FunctX XSLT Functions

fn:key

Return the nodes that have a specified key

Google
Webxsltfunctions.com

Description

The fn:key function returns the nodes with a particular key. It is similar to calling the fn:id function except using keys instead of IDs. Note: this is an XSLT-only function; it is not available in XQuery or XPath.

Arguments and Return Type

NameType
$key-name xs:string
$key-value xs:anyAtomicType*
$top node()
return value node()*

Examples

XSLT ExampleResults
See the example from the XSLT 2.0 recommendation.

See Also

fn:idRetrieves elements by their ID

History

Published OnLast UpdatedContributor(s)
2007-03-172007-03-17W3C, XSLT 2.0, http://www.w3.org/TR/xslt20/
Datypic XSLT Services

Recommended Reading:

XQuery