org.exolab.adaptx.xpath.expressions
Interface NodeExpression
- MatchExpression, XPathExpression
public interface NodeExpression
Represents an XPath node expression.
- Keith Visco
static short | ANY_EXPR - The node expression type that selects or
matches "any" node.
|
static short | ATTRIBUTE_EXPR - The node expression type that selects or
matches attribute nodes
|
static short | COMMENT_EXPR - The node expression type that selects or
matches comment nodes
|
static short | ELEMENT_EXPR - The node expression type that selects or
matches element nodes
|
static short | IDENTITY_EXPR - The node expression type that selects or
matches the current context node
|
static short | ID_EXPR - The node expression type that selects or
matches any element node with a specific ID
|
static short | NAMESPACE_EXPR - The node expression type that selects or
matches namespace nodes
|
static short | PARENT_EXPR - The node expression type that selects or
matches the parent node of the current
context node.
|
static short | PI_EXPR - The node expression type that selects or
matches Processing Instruction nodes
|
static short | TEXT_EXPR - The node expression type that selects or
matches text nodes
|
static short | WILDCARD_EXPR - The node expression type that selects or
matches any element node
|
BOOLEAN , ERROR , FILTER_EXPR , LOCATION_PATH , NODE_TEST , NUMBER , PATH_EXPR , PRIMARY , STEP , STRING , UNION_EXPR |
String | getName() - Returns the QName matched by this NodeExpression.
|
short | getNodeExprType() - Returns the type of this Node exprression, the value
must be one of the value Node expression types.
|
boolean | matches(XPathNode node, XPathContext context) - Determines if the given node is matched by this MatchExpr with
respect to the given context.
|
ANY_EXPR
public static final short ANY_EXPR
The node expression type that selects or
matches "any" node.
- 0
ATTRIBUTE_EXPR
public static final short ATTRIBUTE_EXPR
The node expression type that selects or
matches attribute nodes
- 1
COMMENT_EXPR
public static final short COMMENT_EXPR
The node expression type that selects or
matches comment nodes
- 7
ELEMENT_EXPR
public static final short ELEMENT_EXPR
The node expression type that selects or
matches element nodes
- 2
IDENTITY_EXPR
public static final short IDENTITY_EXPR
The node expression type that selects or
matches the current context node
- 4
ID_EXPR
public static final short ID_EXPR
The node expression type that selects or
matches any element node with a specific ID
- 3
NAMESPACE_EXPR
public static final short NAMESPACE_EXPR
The node expression type that selects or
matches namespace nodes
- 10
PARENT_EXPR
public static final short PARENT_EXPR
The node expression type that selects or
matches the parent node of the current
context node.
- 5
PI_EXPR
public static final short PI_EXPR
The node expression type that selects or
matches Processing Instruction nodes
- 8
TEXT_EXPR
public static final short TEXT_EXPR
The node expression type that selects or
matches text nodes
- 6
WILDCARD_EXPR
public static final short WILDCARD_EXPR
The node expression type that selects or
matches any element node
- 9
getName
public String getName()
Returns the QName matched by this NodeExpression.
The value may be null, for example if this is a
TEXT_EXPR or a WILDCARD_EXPR.
- the QName matched by this NodeExpression.
getNodeExprType
public short getNodeExprType()
Returns the type of this Node exprression, the value
must be one of the value Node expression types.
- the type of this Node expression
matches
public boolean matches(XPathNode node,
XPathContext context)
throws XPathException
Determines if the given node is matched by this MatchExpr with
respect to the given context.
- matches in interface MatchExpression
node
- the node to determine a match forcontext
- the XPathContext
- true if the given node is matched by this MatchExpr
XPathException
- when an error occurs during
evaluation