The child
axis selects from the children of the
context node.
For example,
xpointer(/child::FAMILYTREE/child::PERSON[position()=3]/child::NAME)
Reading from right to left, it selects the NAME
child of the third PERSON
element that's a child of
the FAMILYTREE
element that's a child of the root
element.
If the XPointer matches more than one node, then all are selected. For instance consider this XPointer:
xpointer(/child::FAMILYTREE/child::PERSON/child::NAME)
This selects all NAME
children of
PERSON
elements that are children of
FAMILYTREE
elements that are children of the root.
There are a dozen of these in Example 17-1.
The child axis is implied if no explicit axis name is present. For instance, the above three XPointers would more likely be written in this abbreviated form:
xpointer(/FAMILYTREE/PERSON[position()=3]/NAME)
xpointer(/FAMILYTREE/PERSON/NAME)
xpointer(/NAME)