public final class AxisInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ANCESTOR
Constant representing the ancestor axis
|
static int |
ANCESTOR_OR_SELF
Constant representing the ancestor-or-self axis
|
static int |
ATTRIBUTE
Constant representing the attribute axis
|
static java.lang.String[] |
axisName
Table giving the name of each axis as used in XPath, for example "ancestor-or-self"
|
static int |
CHILD
Constant representing the child axis
|
static int |
DESCENDANT
Constant representing the descendant axis
|
static int |
DESCENDANT_OR_SELF
Constant representing the descendant-or-self axis
|
static int[] |
excludeSelfAxis
Give the corresponding axis if the self node is excluded.
|
static int |
FOLLOWING
Constant representing the following axis
|
static int |
FOLLOWING_SIBLING
Constant representing the following-sibling axis
|
static int[] |
inverseAxis
For each axis, determine the inverse axis, in the sense that if A is on axis X starting at B,
the B is on the axis inverseAxis[X] starting at A.
|
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[] |
isSubtreeAxis
Table indicating for each axis whether it is contained within the subtree
rooted at the origin node.
|
static int |
NAMESPACE
Constant representing the namespace axis
|
static int |
PARENT
Constant representing the parent axis
|
static int |
PRECEDING
Constant representing the preceding axis
|
static int |
PRECEDING_OR_ANCESTOR
Constant representing the preceding-or-ancestor axis.
|
static int |
PRECEDING_SIBLING
Constant representing the preceding-sibling axis
|
static short[] |
principalNodeType
Table indicating the principal node type of each axis
|
static UType[] |
principalNodeUType |
static int |
SELF
Constant representing the self axis
|
Modifier and Type | Method and Description |
---|---|
static boolean |
containsNodeKind(int axis,
int nodeKind)
Determine whether a given kind of node can be found on a given axis.
|
static int |
getAxisNumber(java.lang.String name)
Resolve an axis name into a symbolic constant representing the axis
|
static UType |
getTargetUType(UType origin,
int axis)
Given a context item type and an axis, determine the kinds of nodes that can be returned
|
static boolean |
isAlwaysEmpty(int axis,
int nodeKind)
Ask whether a given axis can contain any nodes when starting at the specified node kind.
|
public static final int ANCESTOR
public static final int ANCESTOR_OR_SELF
public static final int ATTRIBUTE
public static final int CHILD
public static final int DESCENDANT
public static final int DESCENDANT_OR_SELF
public static final int FOLLOWING
public static final int FOLLOWING_SIBLING
public static final int NAMESPACE
public static final int PARENT
public static final int PRECEDING
public static final int PRECEDING_SIBLING
public static final int SELF
public static final int PRECEDING_OR_ANCESTOR
public static final short[] principalNodeType
public static final UType[] principalNodeUType
public static final boolean[] isForwards
public static final boolean[] isPeerAxis
public static final boolean[] isSubtreeAxis
public static final java.lang.String[] axisName
public static int[] inverseAxis
public static int[] excludeSelfAxis
public static int getAxisNumber(java.lang.String name) throws XPathException
name
- the name of the axisXPathException
- if the axis name is not one of the defined axespublic static boolean isAlwaysEmpty(int axis, int nodeKind)
axis
- the axis, for example ATTRIBUTE
nodeKind
- the node kind of the origin node, for example Type.ATTRIBUTE
public static boolean containsNodeKind(int axis, int nodeKind)
axis
- the axis, for example ATTRIBUTE
nodeKind
- the node kind of the origin node, for example Type.ELEMENT
public static UType getTargetUType(UType origin, int axis)
origin
- the context item type, as a UType representing one or more node kindsaxis
- identifies the axisCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.