Axis steps

Axis steps consist of three parts: an optional axis to specify a direction of movement; a node test to specify the criteria that is used to select nodes; and zero or more predicates to filter the sequence that is returned by the step. The result of an axis step is always a sequence of zero or more nodes.

An axis step can be either a forward step, which starts at the context node and moves through the XML tree in document order, or a reverse step, which starts at the context node and moves through the XML tree in reverse document order. If the context item is not a node, then the expression results in an error.

The unabbreviated syntax for an axis step consists of an axis name and node test that are separated by a double colon, followed by zero or more predicates. The syntax of an axis expression can be abbreviated by omitting the axis and using shorthand notations.

In the following example, child is the name of the axis and para is the name of the element nodes to be selected on this axis.
child::para
The axis step in this example selects all para elements that are children of the context node.