org.apache.xpath.axes

Class ChildTestIterator

public class ChildTestIterator extends BasicTestIterator

This class implements an optimized iterator for children patterns that have a node test, and possibly a predicate.

See Also: BasicTestIterator

UNKNOWN: advanced

Constructor Summary
ChildTestIterator(DTMAxisTraverser traverser)
Create a ChildTestIterator object.
Method Summary
DTMIteratorcloneWithReset()
Get a cloned Iterator that is reset to the beginning of the query.
voiddetach()
Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.
intgetAxis()
Returns the axis being iterated, if it is known.
voidsetRoot(int context, Object environment)
Initialize the context values for this expression after it is cloned.

Constructor Detail

ChildTestIterator

public ChildTestIterator(DTMAxisTraverser traverser)
Create a ChildTestIterator object.

Parameters: traverser Traverser that tells how the KeyIterator is to be handled.

Throws: javax.xml.transform.TransformerException

Method Detail

cloneWithReset

public DTMIterator cloneWithReset()
Get a cloned Iterator that is reset to the beginning of the query.

Returns: A cloned NodeIterator set of the start of the query.

Throws: CloneNotSupportedException

detach

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. Afterdetach has been invoked, calls to nextNode orpreviousNode will raise the exception INVALID_STATE_ERR.

getAxis

public int getAxis()
Returns the axis being iterated, if it is known.

Returns: Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.

setRoot

public void setRoot(int context, Object environment)
Initialize the context values for this expression after it is cloned.

Parameters: context The XPath runtime context for this transformation.

Copyright B) 2006 Apache XML Project. All Rights Reserved.