| org.apache.xpath.patterns.NodeTest org.apache.xpath.axes.PredicatedNodeTest org.apache.xpath.axes.LocPathIterator org.apache.xpath.axes.MatchPatternIterator
MatchPatternIterator | public class MatchPatternIterator extends LocPathIterator (Code) | | 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.
|
Constructor Summary | |
| MatchPatternIterator(Compiler compiler, int opPos, int analysis) Create a LocPathIterator object, including creation
of step walkers from the opcode list, and call back
into the Compiler to create predicate expressions. |
Method Summary | |
public short | acceptNode(int n, XPathContext xctxt) Test whether a specified node is visible in the logical view of a
TreeWalker or NodeIterator. | public void | detach() Detaches the iterator from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. | protected int | getNextNode() Get the next node via getNextXXX. | public int | nextNode() Returns the next node in the set and advances the position of the
iterator in the set. | public void | setRoot(int context, Object environment) Initialize the context values for this expression
after it is cloned. |
m_pattern | protected StepPattern m_pattern(Code) | | This is the select pattern, translated into a match pattern.
|
m_superAxis | protected int m_superAxis(Code) | | The traversal axis from where the nodes will be filtered.
|
m_traverser | protected DTMAxisTraverser m_traverser(Code) | | The DTM inner traversal class, that corresponds to the super axis.
|
serialVersionUID | final static long serialVersionUID(Code) | | |
MatchPatternIterator | MatchPatternIterator(Compiler compiler, int opPos, int analysis) throws javax.xml.transform.TransformerException(Code) | | Create a LocPathIterator object, including creation
of step walkers from the opcode list, and call back
into the Compiler to create predicate expressions.
Parameters: compiler - The Compiler which is creatingthis expression. Parameters: opPos - The position of this iterator in theopcode list from the compiler. Parameters: analysis - Analysis bits that give general information about the LocationPath. throws: javax.xml.transform.TransformerException - |
acceptNode | public short acceptNode(int n, XPathContext xctxt)(Code) | | 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. a constant to determine whether the node is accepted,rejected, or skipped, as defined above . |
detach | public void detach()(Code) | | Detaches the iterator from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. Afterdetach has been invoked, calls to
nextNode orpreviousNode will raise the
exception INVALID_STATE_ERR.
|
getNextNode | protected int getNextNode()(Code) | | Get the next node via getNextXXX. Bottlenecked for derived class override.
The next node on the axis, or DTM.NULL. |
nextNode | public int nextNode()(Code) | | 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.
The next Node in the set being iterated over, ornull if there are no more members in that set. |
setRoot | public void setRoot(int context, Object environment)(Code) | | Initialize the context values for this expression
after it is cloned.
Parameters: context - The XPath runtime context for thistransformation. |
|
|