org.apache.xpath.axes
Class MatchPatternIterator
java.lang.Object
|
+--org.apache.xpath.Expression
|
+--org.apache.xpath.patterns.NodeTest
|
+--org.apache.xpath.axes.PredicatedNodeTest
|
+--org.apache.xpath.axes.LocPathIterator
|
+--org.apache.xpath.axes.MatchPatternIterator
- public class MatchPatternIterator
- extends LocPathIterator
This class treats a
LocationPath as a
filtered iteration over the tree, evaluating each node in a super axis
traversal against the LocationPath interpreted as a match pattern. This
class is useful to find nodes in document order that are complex paths
whose steps probably criss-cross each other.
- See Also:
- Serialized Form
Method Summary |
short |
acceptNode(int n,
XPathContext xctxt)
Test whether a specified node is visible in the logical view of a
TreeWalker or NodeIterator. |
int |
nextNode()
Returns the next node in the set and advances the position of the
iterator in the set. |
void |
setRoot(int context,
java.lang.Object environment)
Initialize the context values for this expression
after it is cloned. |
Methods inherited from class org.apache.xpath.axes.LocPathIterator |
allowDetachToRelease,
asIterator,
asNode,
bool,
cloneWithReset,
detach,
execute,
findLastPos,
getAxis,
getCachedNodes,
getContext,
getCurrentContextNode,
getCurrentNode,
getCurrentPos,
getDTM,
getDTMManager,
getExpandEntityReferences,
getFilter,
getFoundLast,
getIsTopLevel,
getLast,
getLastPos,
getLength,
getPrefixResolver,
getRoot,
getWhatToShow,
getXPathContext,
isDocOrdered,
isFresh,
isMutable,
isNodesetExpr,
item,
previousNode,
reset,
runTo,
setCurrentContextNode,
setCurrentPos,
setEnvironment,
setIsTopLevel,
setItem,
setLast,
setShouldCacheNodes,
size |
Methods inherited from class org.apache.xpath.axes.PredicatedNodeTest |
acceptNode,
canTraverseOutsideSubtree,
clone,
fixupVariables,
getLocPathIterator,
getPredicateCount,
getPredicateIndex,
getProximityPosition,
getProximityPosition,
initProximityPosition,
isReverseAxes,
resetProximityPositions,
setLocPathIterator,
setPredicateCount |
Methods inherited from class org.apache.xpath.patterns.NodeTest |
debugWhatToShow,
execute,
execute,
getDefaultScore,
getLocalName,
getNamespace,
getNodeTypeTest,
getStaticScore,
initNodeTest,
initNodeTest,
setLocalName,
setNamespace,
setStaticScore,
setWhatToShow |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
setRoot
public void setRoot(int context,
java.lang.Object environment)
- Initialize the context values for this expression
after it is cloned.
- Parameters:
execContext
- The XPath runtime context for this
transformation.- Overrides:
- setRoot in class LocPathIterator
nextNode
public int nextNode()
- Returns the next node in the set and advances the position of the
iterator in the set. After a NodeIterator is created, the first call
to nextNode() returns the first node in the set.
- Returns:
- The next
Node
in the set being iterated over, or
null
if there are no more members in that set. - Overrides:
- nextNode in class LocPathIterator
acceptNode
public short acceptNode(int n,
XPathContext xctxt)
- Test whether a specified node is visible in the logical view of a
TreeWalker or NodeIterator. This function will be called by the
implementation of TreeWalker and NodeIterator; it is not intended to
be called directly from user code.
- Parameters:
n
- The node to check to see if it passes the filter or not.- Returns:
- a constant to determine whether the node is accepted,
rejected, or skipped, as defined above .
Copyright © 2001 Apache XML Project. All Rights Reserved.