XPath

Contents
      1. Caveats
              1. Descendant-or-self-Abbreviation
              2. Axes
              3. Axis scope

Caveats

Descendant-or-self-Abbreviation
 //person[1] 
is equal to
 /decendant-or-self::node()/person[1]
and selects all person child elements that are at the first childs of their parent nodes whereas
 /decendant::person[1]
selects the one first person node anywhere under the context node. (cf. Specification sect. 2.5)
Axes
ancestor, descendant, following, preceding and self axes partition a document. (cf. 2.2). Their definition uses the term "document order". That is the order in which start tags of nodes textually appear in the document (cf. 5), resulting in a preorder traversal. The ''following'' axis contains everything after, ''descendant'' everything below the context node. ''preceding'' comprises nodes textually before the context node minus the ones in ''ancestor'', which contains the direct path to the context node (''self'').
Axis scope
In preceding::person[1] the axis scope may reach the predicate, too. Therefore, the reverse document order applies here, but not in (preceding::person)[1]. (cf. 3.3)

EditContents