APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.dom

public Class StepIterator

extends DTMAxisIteratorBase
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xalan.internal.xsltc.dom.FilteredStepIterator
Imports
com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary, com.sun.org.apache.xml.internal.dtm.DTMAxisIterator, com.sun.org.apache.xml.internal.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").
Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Erwin Bolwidt , Morten Jorgensen

Field Summary

Modifier and TypeField and Description
protected DTMAxisIterator
_iterator

A reference to the "inner" iterator.

private int
_pos

Temp variable to store a marked position.

protected DTMAxisIterator
_source

A reference to the "outer" iterator.

Inherited from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase:
_includeSelf_isRestartable_last_markedNode_position_startNode

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DTMAxisIterator
public void
gotoMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Restores the current node remembered by setMark().

public int
next()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Get the next node in the iteration.

public DTMAxisIterator
public void
setMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Remembers the current node for the next call to gotoMark().

public void
public DTMAxisIterator
setStartNode(int node)

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.

Inherited from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase:
getAxisgetLastgetNodeByPositiongetPositiongetStartNodeincludeSelfisDocOrderedisReverseresetPositionreturnNode

Field Detail

_iteratorback to summary
protected DTMAxisIterator _iterator

A reference to the "inner" iterator.

_posback to summary
private int _pos

Temp variable to store a marked position.

_sourceback to summary
protected DTMAxisIterator _source

A reference to the "outer" iterator.

Constructor Detail

StepIteratorback to summary
public StepIterator(DTMAxisIterator source, DTMAxisIterator iterator)

Method Detail

cloneIteratorback to summary
public DTMAxisIterator cloneIterator()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.cloneIterator.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.cloneIterator.

Doc from com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.cloneIterator.

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.

gotoMarkback to summary
public void gotoMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.gotoMark.

Restores the current node remembered by setMark().

nextback to summary
public int next()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.next.

Get the next node in the iteration.

resetback to summary
public DTMAxisIterator reset()

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.reset.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.reset.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.reset.

Resets the iterator to the last start node.

setMarkback to summary
public void setMark()

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setMark.

Remembers the current node for the next call to gotoMark().

setRestartableback to summary
public void setRestartable(boolean isRestartable)

Overrides com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase.setRestartable.

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setRestartable.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setRestartable.

Set if restartable.

setStartNodeback to summary
public DTMAxisIterator setStartNode(int node)

Implements com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Doc from com.sun.org.apache.xml.internal.dtm.DTMAxisIterator.setStartNode.

Set start to END should 'close' the iterator, i.e. subsequent call to next() should return END.