fn:element-with-id

Returns the sequence of element nodes that have an ID value matching the value of one or more of the IDREF values supplied in $values.

element-with-id($values as xs:string*, $node as node():=.) ➔ element()*

Arguments

 

$values

xs:string*

The ID value being sought

 

$node

node()

:= .

A node (typically the root) of the document being searched

Result

element()*

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XPath 3.1 Functions and Operators

XPath 4.0 Functions and Operators

Saxon availability

Available in XPath 3.0, XSLT 3.0, XQuery 3.0, and later versions. From Saxon 9.6, available in all editions. Available for all platforms.