net.sf.saxon.om

Class Axis

public final class Axis extends Object

An axis, that is a direction of navigation in the document structure.
Field Summary
static byteANCESTOR
Constant representing the ancestor axis
static byteANCESTOR_OR_SELF
Constant representing the ancestor-or-self axis
static byteATTRIBUTE
Constant representing the attribute axis
static String[]axisName
Table giving the name each axis
static byteCHILD
Constant representing the child axis
static byteDESCENDANT
Constant representing the descendant axis
static byteDESCENDANT_OR_SELF
Constant representing the descendant-or-self axis
static byteFOLLOWING
Constant representing the following axis
static byteFOLLOWING_SIBLING
Constant representing the following-sibling axis
static boolean[]isForwards
Table indicating for each axis whether it is in forwards document order
static boolean[]isPeerAxis
Table indicating for each axis whether it is a peer axis.
static boolean[]isReverse
Table indicating for each axis whether it is in reverse document order
static boolean[]isSubtreeAxis
Table indicating for each axis whether it is contained within the subtree rooted at the origin node.
static byteNAMESPACE
Constant representing the namespace axis
static short[]principalNodeType
Table indicating the principal node type of each axis
static bytePARENT
Constant representing the parent axis
static bytePRECEDING
Constant representing the preceding axis
static bytePRECEDING_OR_ANCESTOR
Constant representing the preceding-or-ancestor axis.
static bytePRECEDING_SIBLING
Constant representing the preceding-sibling axis
static byteSELF
Constant representing the self axis
Method Summary
static booleancontainsNodeKind(int axis, int nodeKind)
Determine whether a given kind of node can be found on a given axis
static bytegetAxisNumber(String name)
Resolve an axis name into a symbolic constant representing the axis
static booleanisAlwaysEmpty(int axis, int nodeKind)

Field Detail

ANCESTOR

public static final byte ANCESTOR
Constant representing the ancestor axis

ANCESTOR_OR_SELF

public static final byte ANCESTOR_OR_SELF
Constant representing the ancestor-or-self axis

ATTRIBUTE

public static final byte ATTRIBUTE
Constant representing the attribute axis

axisName

public static final String[] axisName
Table giving the name each axis

CHILD

public static final byte CHILD
Constant representing the child axis

DESCENDANT

public static final byte DESCENDANT
Constant representing the descendant axis

DESCENDANT_OR_SELF

public static final byte DESCENDANT_OR_SELF
Constant representing the descendant-or-self axis

FOLLOWING

public static final byte FOLLOWING
Constant representing the following axis

FOLLOWING_SIBLING

public static final byte FOLLOWING_SIBLING
Constant representing the following-sibling axis

isForwards

public static final boolean[] isForwards
Table indicating for each axis whether it is in forwards document order

isPeerAxis

public static final boolean[] isPeerAxis
Table indicating for each axis whether it is a peer axis. An axis is a peer axis if no node on the axis is an ancestor of another node on the axis.

isReverse

public static final boolean[] isReverse
Table indicating for each axis whether it is in reverse document order

isSubtreeAxis

public static final boolean[] isSubtreeAxis
Table indicating for each axis whether it is contained within the subtree rooted at the origin node.

NAMESPACE

public static final byte NAMESPACE
Constant representing the namespace axis

principalNodeType

public static final short[] principalNodeType
Table indicating the principal node type of each axis

PARENT

public static final byte PARENT
Constant representing the parent axis

PRECEDING

public static final byte PRECEDING
Constant representing the preceding axis

PRECEDING_OR_ANCESTOR

public static final byte PRECEDING_OR_ANCESTOR
Constant representing the preceding-or-ancestor axis. This axis is used internally by the xsl:number implementation, it returns the union of the preceding axis and the ancestor axis.

PRECEDING_SIBLING

public static final byte PRECEDING_SIBLING
Constant representing the preceding-sibling axis

SELF

public static final byte SELF
Constant representing the self axis

Method Detail

containsNodeKind

public static boolean containsNodeKind(int axis, int nodeKind)
Determine whether a given kind of node can be found on a given axis

getAxisNumber

public static byte getAxisNumber(String name)
Resolve an axis name into a symbolic constant representing the axis

Parameters: name

Returns: integer value representing the named axis

Throws: net.sf.saxon.trans.StaticError

isAlwaysEmpty

public static boolean isAlwaysEmpty(int axis, int nodeKind)