fn:idref

Return sequence of element nodes with IDREF values containing at least a specified ID value.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

fn:idref(xs:string* $arg, node() $node) => element()*

Description

This function returns a sequence, in document order, of those elements that are in the same document as $node that have an IDREF value matching one or more of the xs:IDs in the list of candidate xs:IDs. The list of xs:IDs results from parsing the string argument: the string is treated as a sequence of tokens separated by space, and each of the tokens is considered a value of type xs:ID. If the token is not a lexically valid xs:ID value, it is ignored. If no xs:ID value matches the IDREFS value of any element, the function returns the empty sequence. The match is performed strictly using Unicode codepoints, that is, without a collation.

This function allows reverse navigation from xs:ID values or DTD ID values to xs:IDREF, xs:IDREFS or the DTD types IDREF or IDREFS values.

Argument

$arg

string that can be tokenized into valid values of type xs:ID

$node

a node