net.sf.saxon.evpull
Class Decomposer
java.lang.Object
net.sf.saxon.evpull.Decomposer
- EventIterator, PullEvent
public class Decomposer
extends java.lang.Object
This class takes a sequence of pull events and turns it into fully-decomposed form, that is, it
takes and document and element nodes in the sequence and turns them into a subsequence consisting of a
start element|document event, a content sequence, and an end element|document event, recursively.
The resulting sequence is decomposed, but not flat (it will contain nested EventIterators). To flatten
it, use
EventStackIterator.flatten(EventIterator)
boolean | isFlatSequence() - Determine whether the EventIterator returns a flat sequence of events, or whether it can return
nested event iterators
|
PullEvent | next() - Get the next event in the sequence
|
Decomposer
public Decomposer(EventIterator base,
Configuration config)
Create a Decomposer, which turns an event sequence into fully decomposed form
base
- the base sequence, which may be fully composed, fully decomposed, or
anything in betweenconfig
- the Saxon configuration
Decomposer
public Decomposer(NodeInfo node)
Create a Decomposer which returns the sequence of events corresponding to
a particular node
node
- the node to be decomposed
isFlatSequence
public boolean isFlatSequence()
Determine whether the EventIterator returns a flat sequence of events, or whether it can return
nested event iterators
- isFlatSequence in interface EventIterator
- true if the next() method is guaranteed never to return an EventIterator
next
public PullEvent next()
throws XPathException
Get the next event in the sequence
- next in interface EventIterator
- the next event, or null when the sequence is exhausted. Note that since an EventIterator is
itself a PullEvent, this method may return a nested iterator.