Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
These examples are fairly pathological, but you might like to try them out on your chosen XPath processor to see how well it handles them. There may well be much simpler path expressions in which
/
is not associative, but I haven't discovered them yet!
Axis Steps
This section discusses the expressions called axis steps. Axis steps are often used as operands of the
/
operator in a path expression, which is how they got their name (a path consists of many steps). But an axis step is an expression in its own right, and it can be used on its own without any need for a
/
operator. We've also seen that XPath 2.0 allows the operands of
/
to be any kind of expression, they are no longer constrained to be axis steps. So the
/
operator and axis steps have become quite decoupled in the semantics of the language. However, they are so often used together that it makes sense to retain the term
path expression
to describe any expression that uses either a
/
operator or an axis step or both.