org.apache.xml.dtm
Class Axis

java.lang.Object
  extended by org.apache.xml.dtm.Axis

public final class Axis
extends java.lang.Object

Specifies values related to XPath Axes.

The ancestor, descendant, following, preceding and self axes partition a document (ignoring attribute and namespace nodes): they do not overlap and together they contain all the nodes in the document.


Field Summary
static int ALL
          A non-xpath axis, returns all nodes in the tree from and including the root.
static int ALLFROMNODE
          A non-xpath axis, traversing the subtree including the subtree root, descendants, attributes, and namespace node decls.
static int ANCESTOR
          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.
static int ANCESTORORSELF
          the ancestor-or-self axis contains the context node and the ancestors of the context node; thus, the ancestor axis will always include the root node.
static int ATTRIBUTE
          the attribute axis contains the attributes of the context node; the axis will be empty unless the context node is an element.
static int CHILD
          The child axis contains the children of the context node.
static int DESCENDANT
          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.
static int DESCENDANTORSELF
          The descendant-or-self axis contains the context node and the descendants of the context node.
static int DESCENDANTSFROMROOT
          A non-xpath axis, returns all nodes that aren't namespaces or attributes, from and including the root.
static int DESCENDANTSORSELFFROMROOT
          A non-xpath axis, returns all nodes that aren't namespaces or attributes, from and including the root.
static int FILTEREDLIST
          A non-xpath axis, for functions.
static int FOLLOWING
          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.
static int FOLLOWINGSIBLING
          The following-sibling axis contains all the following siblings of the context node; if the context node is an attribute node or namespace node, the following-sibling axis is empty.
private static boolean[] isReverse
          A table to identify whether an axis is a reverse axis;
private static java.lang.String[] names
          The names of the axes for diagnostic purposes.
static int NAMESPACE
          The namespace axis contains the namespace nodes of the context node; the axis will be empty unless the context node is an element.
static int NAMESPACEDECLS
          The namespace axis contains the namespace nodes of the context node; the axis will be empty unless the context node is an element.
static int PARENT
          The parent axis contains the parent of the context node, if there is one.
static int PRECEDING
          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
static int PRECEDINGANDANCESTOR
          A non-xpath axis, traversing the the preceding and the ancestor nodes, needed for inverseing select patterns to match patterns.
static int PRECEDINGSIBLING
          The preceding-sibling axis contains all the preceding siblings of the context node; if the context node is an attribute node or namespace node, the preceding-sibling axis is empty.
static int ROOT
          A non-xpath axis, returns root only.
static int SELF
          The self axis contains just the context node itself.
 
Constructor Summary
Axis()
           
 
Method Summary
static java.lang.String getNames(int index)
           
static int getNamesLength()
           
static boolean isReverse(int axis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANCESTOR

public static final int ANCESTOR
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.

See Also:
Constant Field Values

ANCESTORORSELF

public static final int ANCESTORORSELF
the ancestor-or-self axis contains the context node and the ancestors of the context node; thus, the ancestor axis will always include the root node.

See Also:
Constant Field Values

ATTRIBUTE

public static final int ATTRIBUTE
the attribute axis contains the attributes of the context node; the axis will be empty unless the context node is an element.

See Also:
Constant Field Values

CHILD

public static final int CHILD
The child axis contains the children of the context node.

See Also:
Constant Field Values

DESCENDANT

public static final int DESCENDANT
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.

See Also:
Constant Field Values

DESCENDANTORSELF

public static final int DESCENDANTORSELF
The descendant-or-self axis contains the context node and the descendants of the context node.

See Also:
Constant Field Values

FOLLOWING

public static final int FOLLOWING
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.

See Also:
Constant Field Values

FOLLOWINGSIBLING

public static final int FOLLOWINGSIBLING
The following-sibling axis contains all the following siblings of the context node; if the context node is an attribute node or namespace node, the following-sibling axis is empty.

See Also:
Constant Field Values

NAMESPACEDECLS

public static final int NAMESPACEDECLS
The namespace axis contains the namespace nodes of the context node; the axis will be empty unless the context node is an element.

See Also:
Constant Field Values

NAMESPACE

public static final int NAMESPACE
The namespace axis contains the namespace nodes of the context node; the axis will be empty unless the context node is an element.

See Also:
Constant Field Values

PARENT

public static final int PARENT
The parent axis contains the parent of the context node, if there is one.

See Also:
Constant Field Values

PRECEDING

public static final int PRECEDING
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

See Also:
Constant Field Values

PRECEDINGSIBLING

public static final int PRECEDINGSIBLING
The preceding-sibling axis contains all the preceding siblings of the context node; if the context node is an attribute node or namespace node, the preceding-sibling axis is empty.

See Also:
Constant Field Values

SELF

public static final int SELF
The self axis contains just the context node itself.

See Also:
Constant Field Values

ALLFROMNODE

public static final int ALLFROMNODE
A non-xpath axis, traversing the subtree including the subtree root, descendants, attributes, and namespace node decls.

See Also:
Constant Field Values

PRECEDINGANDANCESTOR

public static final int PRECEDINGANDANCESTOR
A non-xpath axis, traversing the the preceding and the ancestor nodes, needed for inverseing select patterns to match patterns.

See Also:
Constant Field Values

ALL

public static final int ALL
A non-xpath axis, returns all nodes in the tree from and including the root.

See Also:
Constant Field Values

DESCENDANTSFROMROOT

public static final int DESCENDANTSFROMROOT
A non-xpath axis, returns all nodes that aren't namespaces or attributes, from and including the root.

See Also:
Constant Field Values

DESCENDANTSORSELFFROMROOT

public static final int DESCENDANTSORSELFFROMROOT
A non-xpath axis, returns all nodes that aren't namespaces or attributes, from and including the root.

See Also:
Constant Field Values

ROOT

public static final int ROOT
A non-xpath axis, returns root only.

See Also:
Constant Field Values

FILTEREDLIST

public static final int FILTEREDLIST
A non-xpath axis, for functions.

See Also:
Constant Field Values

isReverse

private static final boolean[] isReverse
A table to identify whether an axis is a reverse axis;


names

private static final java.lang.String[] names
The names of the axes for diagnostic purposes.

Constructor Detail

Axis

public Axis()
Method Detail

isReverse

public static boolean isReverse(int axis)

getNames

public static java.lang.String getNames(int index)

getNamesLength

public static int getNamesLength()