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

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

Defined for: XPath 1.0 and 2.0, XQuery 1.0

Direction: forward

Axis identifier: descendant

Abbreviated syntax: none

The descendant axis

Figure: the descendant axis.

The descendant axis contains all nodes directly or indirectly descended from the context node: its children and their children. It therefore contains the context node’s content, explaining why attribute and namespace nodes are excluded.

Every branch descended from the context node is tested to its end, whose final node is also called a leaf node. If the current node is not an element node, the descendant axis is empty.

Example:

   

back to top