to the main page about the tutorial  THE XML REVOLUTION  -  TECHNOLOGIES FOR THE FUTURE WEB back up next

Axes

Available axes:

child   the children of the context node
descendant   all descendants (children, childrens children, ...)
parent   the parent (empty if at the root)
ancestor   all ancestors from the parent to the root
following-sibling   siblings to the right
preceding-sibling   siblings to the left
following   all following nodes in the document, excluding descendants
preceding   all preceding nodes in the document, excluding ancestors
attribute   the attributes of the context node
namespace   namespace declarations in the context node
self   the context node itself
descendant-or-self   the union of descendant and self
ancestor-or-self   the union of ancestor and self

Note that attributes and namespace declarations are considered a special kind of nodes here.

axes

Some of these axes assume a document ordering of the tree nodes. The ordering is the left-to-right preorder traversal of the document tree - which is the same as the order in the textual representation.

The resulting sets are ordered intuitively, either forward (in document order) or reverse (reverse document order).
For instance, following is a forward axis, and ancestor is a reverse axis.

(Frustratingly, each technology uses a slightly different tree model...)

back COPYRIGHT © 2000-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH next