java.lang.Object
org.apache.xml.dtm.ref.DTMAxisIteratorBase
org.apache.xalan.xsltc.dom.StepIterator
- All Implemented Interfaces:
- java.lang.Cloneable, org.apache.xml.dtm.DTMAxisIterator
- Direct Known Subclasses:
- FilteredStepIterator
- public class StepIterator
- extends org.apache.xml.dtm.ref.DTMAxisIteratorBase
A step iterator is used to evaluate expressions like "BOOK/TITLE".
A better name for this iterator would have been ParentIterator since
both "BOOK" and "TITLE" are steps in XPath lingo. Step iterators are
constructed from two other iterators which we are going to refer to
as "outer" and "inner". Every node from the outer iterator (the one
for BOOK in our example) is used to initialize the inner iterator.
After this initialization, every node from the inner iterator is
returned (in essence, implementing a "nested loop").
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_source
protected org.apache.xml.dtm.DTMAxisIterator _source
- A reference to the "outer" iterator.
_iterator
protected org.apache.xml.dtm.DTMAxisIterator _iterator
- A reference to the "inner" iterator.
_pos
private int _pos
- Temp variable to store a marked position.
StepIterator
public StepIterator(org.apache.xml.dtm.DTMAxisIterator source,
org.apache.xml.dtm.DTMAxisIterator iterator)
setRestartable
public void setRestartable(boolean isRestartable)
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Set if restartable.
cloneIterator
public org.apache.xml.dtm.DTMAxisIterator cloneIterator()
- Description copied from class:
org.apache.xml.dtm.ref.DTMAxisIteratorBase
- Returns a deep copy of this iterator. Cloned iterators may not be
restartable. The iterator being cloned may or may not become
non-restartable as a side effect of this operation.
setStartNode
public org.apache.xml.dtm.DTMAxisIterator setStartNode(int node)
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Set start to END should 'close' the iterator,
i.e. subsequent call to next() should return END.
reset
public org.apache.xml.dtm.DTMAxisIterator reset()
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Resets the iterator to the last start node.
next
public int next()
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Get the next node in the iteration.
setMark
public void setMark()
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Remembers the current node for the next call to gotoMark().
gotoMark
public void gotoMark()
- Description copied from interface:
org.apache.xml.dtm.DTMAxisIterator
- Restores the current node remembered by setMark().