XPath defines twelve axes along which an XPointer may search for nodes
These depend on context to determine exactly what they point to.
For instance, consider this location path:
id("p6")/child::NAME
id()
function that returns a
node set containing the element with the ID type attribute whose
value is p6
. This provides a context node for the
following location step along the relative child
axis. Other axes include
ancestor
descendant
self
ancestor-or-self
descendant-or-self
attribute
Each selects nodes from a
particular subset of the nodes in the document. For instance,
the following
axis selects from nodes that come
after the context node. The preceding
axis selects
from nodes that come before the context node.