XML technologies / XPath / XPath 2.0: language reference / Path expressions: axes / Following axis

(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, chapter 4.)

Defined for: XPath 1.0 and 2.0 (not in XQuery 1.0)

Direction: forward

Axis identifier: following

Abbreviated syntax: none

The following axis

Figure: the following axis.

The following axis is one of the forward axes. It contains all nodes in the document following the context node in document order, excluding its descendants, which form its content.

Otherwise, following and descendant would overlap, which they do not. In a serialized document, a node’s content lies between its start and end tags. Nodes following it in document order occur after its end tag.

For a document context node, the following axis is empty: no nodes can follow it in document order. Attribute and namespace nodes are always excluded, both those of the context node and those belonging to elements on the following axis.

Example:

   

back to top