Package net.sf.saxon.s9api
Enum Class Axis
- All Implemented Interfaces:
Serializable,Comparable<Axis>,Constable
This is an enumeration class containing constants representing the thirteen axes available
in XPath versions from 1.0 to 3.1, together with four new axes defined experimentally
in XPath 4.0.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe ancestor axis: contains a node's parent, the parent's parent, and so on, up to the root of the tree.The ancestor-or-self axis: contains the ancestors of a node together with the node itselfThe attribute axis.The child axis.The descendant axis.The descendant-or-self axis.The following axis.The following-or-self axis.The following-sibling axis.The following-sibling-or-self axis.The namespace axis.The parent axis.The preceding axis.The preceding-or-self axis.The following-sibling axis.The preceding-sibling-or-self axis.The self axis. -
Method Summary
-
Enum Constant Details
-
ANCESTOR
The ancestor axis: contains a node's parent, the parent's parent, and so on, up to the root of the tree. -
ANCESTOR_OR_SELF
The ancestor-or-self axis: contains the ancestors of a node together with the node itself -
ATTRIBUTE
The attribute axis. For an element this contains the attributes of the element (these do not include namespace declarations); for other node kinds the axis is empty. -
CHILD
The child axis. For a document or element node this contains the children of the node, which will all be elements, text nodes, comments, or processing instructions. For other node kinds the axis is empty. -
DESCENDANT
The descendant axis. Contains the children of the node, and their children, expanded recursively. -
DESCENDANT_OR_SELF
The descendant-or-self axis. Contains the descendants of a node together with the node itself. -
FOLLOWING
The following axis. Contains all nodes that follow the origin node in document order, other than its descendants. -
FOLLOWING_OR_SELF
The following-or-self axis. Contains all nodes on the following axis, together with the origin node itself. This is newly defined in the draft XPath 4.0 specification which is subject to change. -
FOLLOWING_SIBLING
The following-sibling axis. Contains all children of the origin node's parent that follow the origin node in document order. The axis is empty in the case of a node that has no parent, or that is the last child of its parent. -
FOLLOWING_SIBLING_OR_SELF
The following-sibling-or-self axis. Contains all nodes on the following-sibling axis, together with the origin node itself. This is newly defined in the draft XPath 4.0 specification which is subject to change. -
PARENT
The parent axis. Contains the origin node's parent; the axis is empty in the case of a node that has no parent. -
PRECEDING
The preceding axis. Contains all nodes that precede the origin node in document order, other than its ancestors. -
PRECEDING_OR_SELF
The preceding-or-self axis. Contains all nodes on the preceding axis, together with the origin node itself. This is newly defined in the draft XPath 4.0 specification which is subject to change. -
PRECEDING_SIBLING
The following-sibling axis. Contains all children of the origin node's parent that precede the origin node in document order. The axis is empty in the case of a node that has no parent, or that is the first child of its parent. -
PRECEDING_SIBLING_OR_SELF
The preceding-sibling-or-self axis. Contains all nodes on the preceding-sibling axis, together with the origin node itself. This is newly defined in the draft XPath 4.0 specification which is subject to change. -
SELF
The self axis. Contains the origin node only. -
NAMESPACE
The namespace axis. For an element node, this contains one namespace node for each in-scope namespace declaration, that is, a namespace declared either on the element itself, or on an ancestor element (if not overridden); also contains a namespace node for the implicitly-declared XML namespace. For other node kinds the axis is empty.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getAxisNumber
public int getAxisNumber()Get the axis number, as defined in classAxisInfo- Returns:
- the axis number
-