org.exolab.adaptx.xpath.expressions

Interface NodeExpression

public interface NodeExpression extends XPathExpression, MatchExpression

Represents an XPath node expression.

Author: Keith Visco

Field Summary
static shortANY_EXPR
The node expression type that selects or matches "any" node.
static shortATTRIBUTE_EXPR
The node expression type that selects or matches attribute nodes
static shortCOMMENT_EXPR
The node expression type that selects or matches comment nodes
static shortELEMENT_EXPR
The node expression type that selects or matches element nodes
static shortIDENTITY_EXPR
The node expression type that selects or matches the current context node
static shortID_EXPR
The node expression type that selects or matches any element node with a specific ID
static shortNAMESPACE_EXPR
The node expression type that selects or matches namespace nodes
static shortPARENT_EXPR
The node expression type that selects or matches the parent node of the current context node.
static shortPI_EXPR
The node expression type that selects or matches Processing Instruction nodes
static shortTEXT_EXPR
The node expression type that selects or matches text nodes
static shortWILDCARD_EXPR
The node expression type that selects or matches any element node
Method Summary
StringgetName()
Returns the QName matched by this NodeExpression.
shortgetNodeExprType()
Returns the type of this Node exprression, the value must be one of the value Node expression types.
booleanmatches(XPathNode node, XPathContext context)
Determines if the given node is matched by this MatchExpr with respect to the given context.

Field Detail

ANY_EXPR

public static final short ANY_EXPR
The node expression type that selects or matches "any" node.

ATTRIBUTE_EXPR

public static final short ATTRIBUTE_EXPR
The node expression type that selects or matches attribute nodes

COMMENT_EXPR

public static final short COMMENT_EXPR
The node expression type that selects or matches comment nodes

ELEMENT_EXPR

public static final short ELEMENT_EXPR
The node expression type that selects or matches element nodes

IDENTITY_EXPR

public static final short IDENTITY_EXPR
The node expression type that selects or matches the current context node

ID_EXPR

public static final short ID_EXPR
The node expression type that selects or matches any element node with a specific ID

NAMESPACE_EXPR

public static final short NAMESPACE_EXPR
The node expression type that selects or matches namespace nodes

PARENT_EXPR

public static final short PARENT_EXPR
The node expression type that selects or matches the parent node of the current context node.

PI_EXPR

public static final short PI_EXPR
The node expression type that selects or matches Processing Instruction nodes

TEXT_EXPR

public static final short TEXT_EXPR
The node expression type that selects or matches text nodes

WILDCARD_EXPR

public static final short WILDCARD_EXPR
The node expression type that selects or matches any element node

Method Detail

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.

Returns: 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.

Returns: the type of this Node expression

matches

public boolean matches(XPathNode node, XPathContext context)
Determines if the given node is matched by this MatchExpr with respect to the given context.

Parameters: node the node to determine a match for context the XPathContext

Returns: true if the given node is matched by this MatchExpr

Throws: XPathException when an error occurs during evaluation