XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (486 page)
- If the pattern is
chapter/title
, then a node matches if it is selected by the expression
root(.)//(chapter/title)
, which selects all
elements that are children of
elements.
- If the pattern is
para[1]
, then a node matches if it is selected by the expression
root(.)//(para[1])
, which selects any
element that is the first
child of its parent.
- If the pattern is
id(‘S123’)
, then a node matches if it is selected by the expression
root(.)//(id(‘S123’))
, which is equivalent to the expression
id(‘S123’)
and selects the element with an ID value of
S123
.