An Axis, in its simplest form, takes a Cursor and returns a list of Cursors. It is used for selections, such as finding children, ancestors, etc. Axes can be chained together to express complex rules, such as all children named foo.

The terminology used in this module is taken directly from the XPath
specification: http://www.w3.org/TR/xpath/. For those familiar with XPath,
the one major difference is that attributes are not considered nodes in this
module.

Axes can be composed with >=>, where e.g. f >=> g means that on all results of
the f axis, the g axis will be applied, and all results joined together.
Because Axis is just a type synonym for Cursor -> [Cursor], it is possible to use
other standard functions like >>= or concatMap similarly.

The operators &|, &/, &// and &.// can be used to combine axes so that the second
axis works on the context nodes, children, descendants, respectively the context node as
well as its descendants of the results of the first axis.

The operators $|, $/, $// and $.// can be used to apply an axis (right-hand side)
to a cursor so that it is applied on the cursor itself, its children, its descendants,
respectively itself and its descendants.

Note that many of these operators also work on generalised Axes that can return
lists of something other than Cursors, for example Content elements.

The preceding axis. XPath:
the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes.

The following axis. XPath:
the following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes.

The ancestor axis. XPath:
the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; thus, the ancestor axis will always include the root node, unless the context node is the root node.

The descendant axis. XPath:
the descendant axis contains the descendants of the context node; a descendant is a child or a child of a child and so on; thus the descendant axis never contains attribute or namespace nodes.

Select only those elements with a matching tag name. XPath:
A node test that is a QName is true if and only if the type of the node (see [5 Data Model]) is the principal node type and has an expanded-name equal to the expanded-name specified by the QName.

Select only those elements with a loosely matching tag name. Namespace and case are ignored. XPath:
A node test that is a QName is true if and only if the type of the node (see [5 Data Model]) is the principal node type and has an expanded-name equal to the expanded-name specified by the QName.

Select attributes on the current element (or nothing if it is not an element). XPath:
the attribute axis contains the attributes of the context node; the axis will be empty unless the context node is an element

Note that this is not strictly an Axis, but will work with most combinators.

The return list of the generalised axis contains as elements lists of Content
elements, each full list representing an attribute value.

Select attributes on the current element (or nothing if it is not an element). Namespace and case are ignored. XPath:
the attribute axis contains the attributes of the context node; the axis will be empty unless the context node is an element

Note that this is not strictly an Axis, but will work with most combinators.

The return list of the generalised axis contains as elements lists of Content
elements, each full list representing an attribute value.