org.exolab.adaptx.xpath.expressions
Interface PathComponent
- MatchExpression, XPathExpression
- LocationStep
- FilterBase
public interface PathComponent
A basic interface for LocationStep or FilterExpr
Version:
- Keith Visco
BOOLEAN , ERROR , FILTER_EXPR , LOCATION_PATH , NODE_TEST , NUMBER , PATH_EXPR , PRIMARY , STEP , STRING , UNION_EXPR |
void | evaluatePredicates(NodeSet nodes, XPathContext context) - Evaluates the PredicateExpr of this PathComponent against the given
NodeSet and XPathContext.
|
double | getDefaultPriority() - Determines the priority of a PatternExpr as follows:
From the 19991116 XSLT 1.0 Recommendation:
+ If the pattern has the form of a QName preceded by a
ChildOrAttributeAxisSpecifier or has the form
processing-instruction(Literal) then the priority is 0.
|
PredicateExpr | getPredicate() - Returns the PredicateExpr of this PathComponent
|
boolean | hasPredicates() - Returns true if this PathComponent has predicates expressions.
|
evaluatePredicates
public void evaluatePredicates(NodeSet nodes,
XPathContext context)
throws XPathException
Evaluates the PredicateExpr of this PathComponent against the given
NodeSet and XPathContext.
nodes
- the current NodeSetcontext
- the XPathContext for use during evaluation.
getDefaultPriority
public double getDefaultPriority()
Determines the priority of a PatternExpr as follows:
From the 19991116 XSLT 1.0 Recommendation:
+ If the pattern has the form of a QName preceded by a
ChildOrAttributeAxisSpecifier or has the form
processing-instruction(Literal) then the priority is 0.
+ If the pattern has the form NCName:* preceded by a
ChildOrAttributeAxisSpecifier, then the priority is -0.25
+ Otherwise if the pattern consists of just a NodeTest
preceded by a ChildOrAttributeAxisSpecifier then the
priority is -0.5
+ Otherwise the priority is 0.5
- the priority for this PatternExpr
getPredicate
public PredicateExpr getPredicate()
Returns the PredicateExpr of this PathComponent
- the PredicateExpr of this PathComponent
hasPredicates
public boolean hasPredicates()
Returns true if this PathComponent has predicates expressions.
- true if this PathComponent has predicates expressions.