We have now learned the basics of selecting content in reference to the current page, and know the very basics of how it is used. Now we can cover a few additional commands, and explain how they work.
XPATH works on the premise of Axes, which is how the data relates to the current node. There are several Axis listed below with graphic depictions of the results. Please note the numbers, as those are the order in which the results would be returned.
Self Axis
While it is rarely used, the self axis actually returns the node in reference.
$currentPage/self::node

Child Axis
We mentioned the child axis earlier, and actually used its shortcut right off. The child axis select the nodes immediately below the node in reference. While the verbose method is rarely used, it is here for reference.
$currentPage/child::node
$currentPage/node
Parent Axis
The parent axis allows us to see the node immediately above the node in reference.
$currentPage/parent::node
$currentPage/../
Descendant Axis
Next we have descendant. The descendant axis retrieves all nodes below the node in reference no matter the depth.
$currentPage/descendant::node
$currentPage//node

Descendant-or-self Axis
The descendant-or-self axis returns all nodes below the current node, but also returns the node in reference to the command.
$currentPage/descendant-or-self::node

Ancestor Axis
The ancestor axis selects all nodes that are ancestors, or the parent, and the parent's parent, and so on, to the node in reference.
$currentPage/ancestor::node

Ancestor-or-self Axis
The ancestor-or-self axis selects all nodes that are ancestors, or the parent, and the parent's parent, and so on, including the node in reference.
$currentPage/ancestor-or-self::node

Preceding Axis
Coming soon

Preceding-sibling Axis
Coming soon

Following Axis
Coming soon

Following-sibling Axis
Coming Soon
