Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:id

Return sequence of element nodes referenced by IDREF values.


Syntax

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

Top of page

Description

This function returns a sequence, in document order with duplicates eliminated, of those elements that are in the same document as $node that have an ID value matching one or more of the xs:IDREFs in the list of candidate xs:IDREFs. The list of xs:IDREFs 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:IDREF. If the token is not a lexically valid xs:IDREF value, it is ignored. If no xs:IDREF value matches the ID value of any element, the function returns the empty sequence. The match is performed strictly using Unicode codepoints, that is, without a collation.

Top of page

Argument

$arg

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

$node

a node

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page