Given a sequence of
ID values, returns a sequence containing
all the nodes with an
value matching one of the given
A sequence of
each of which represents an
value. If the
argument is supplied, the XSLT processor looks for matching
IDREFS values in the document that
contains that node. Without the
node() argument, the processor looks
in the document that contains the context node.
A sequence of nodes, each of which has an
IDREFS value that matches one of the
IDs. The nodes are
returned in document order, and any duplicate nodes are
XQuery 1.0 and XPath 2.0 Functions and Operators section 15.5, “Functions and Operators that Generate Sequences.”
For our example, we’ll use a list of components and parts
with an embedded DTD. We’ll list each part, followed by the name
of each component that uses that part. The
idref() function lets us retrieve
with the specific
there we can get the name of the component.
This is the exact opposite of the example for the
id() function. In that example, we
and list all of the parts that it uses.
To illustrate the
idref() function, we’ll use an XML
document with an embedded DTD. (This allows us to demonstrate the
function without requiring a schema-aware XSLT processor.) Here is
a fragment of the document:
<?xml version="1.0"?> ...