# 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 `$arg`.

element-with-id($arg as xs:string*) → element()*

Arguments
| $arg | xs:string* | The ID value being sought, within the document containing the context node
Result | element()*

element-with-id($arg as xs:string*, $node as node()) → element()*

Arguments
| $arg | xs:string* | The ID value being sought
| $node | node() | A node (typically the root) of the document being searched
Result | element()*

Links to W3C specifications

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

Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

XPath 3.0 Specification

Notes on the Saxon implementation

The function is fully implemented according to the W3C specifications.

Next