An iterator over a sequence of events
EventMappingFunction is an interface that must be satisfied by an object passed to an EventMappingIterator.
A PullEvent is one of the following: An item (that is, a node or an atomic value) A startElement, endElement, startDocument, or endDocument event An EventIterator, representing a sequence of PullEvents
Iterate over the instructions in a Block, concatenating the result of each instruction into a single combined sequence.
The class is an EventIterator that handles the events arising from a document node constructor: that is, the start/end event pair for the document node, bracketing a sequence of events for the content of the document.
The class is an EventIterator that handles the events arising from an element constructor: that is, the start/end event pair for the element node, bracketing a sequence of events for the content of the element.
The ComplexContentProcessor is an EventIterator that deals with the events occurring between a startElement and endElement (or startDocument and endDocument) according to the XSLT/XQuery rules for constructing complex content.
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.
This class is an EventIterator over an empty sequence.
Pull event representing the end of a document
Pull event representing the end of an element node
This class is an EventIterator that filters a stream of pull events setting the type annotation on element nodes to xs:untyped and on attribute nodes to xs:untypedAtomic
This class maps a SequenceIterator to an EventIterator, by simply returning the items in the sequence as PullEvents.
Class to read pull events from an EventIterator and write them to a Receiver
MappingIterator merges a sequence of sequences into a single sequence.
An EventStackIterator is an EventIterator that delivers a flat sequence of PullEvents containing no nested EventIterators
This class bridges EventIterator events to XMLStreamReader (Stax) events.
NamespaceMaintainer is an EventIterator responsible for maintaining namespace context in an event stream.
A PullSource is a JAXP Source that encapsulates a PullProvider - that is, an object that supplies an XML document as a sequence of events that are read under the control of the recipient.
Diagnostic class to display the sequence of events reported by an EventIterator
This class takes a sequence of pull events and composes them into a sequence of items.
This class represents an EventIterator over a sequence containing a single pull event.
A PullEvent representing the start of a document node
This is a PullEvent representing the start of an element node.
This class implements the Saxon EventIterator API on top of a standard StAX parser (or any other StAX XMLStreamReader implementation)
This class is a filter for a sequence of pull events; it returns the input sequence unchanged, but traces execution to System.err
This package provides classes that implement a StAX-like pull pipeline in which a recieving component
makes calls on a provider component to supply information from the XML stream one event at a time. The
object that is supplied in response to these calls is a
a component that can be invoked to deliver a sequence of these objects is a
EventIterator is itself a
PullEvent, so an event provider
may return a sequence of events in response to a single call by returning an iterator. A sequence of events containing
no iterators is referred to as a flat sequence, and any sequence of events can be converted to a flat
sequence by inserting an
EventStackIterator into the pipeline.
Pull processing is not used extensively in Saxon, and is generally not used at all unless explicitly
requested. It can be requested, for example, by supplying a
PullEventSource object to an interface
that expects an XML document to be supplied as a JAXP
Source. It is also used
in XQJ when methods such as
XQDataFactory.createItemFromDocument(java.lang.String, java.lang.String, javax.xml.xquery.XQItemType) are used
to construct an XML document from a supplied
XMLStreamReader. In such cases
Saxon uses the class
StaxToEventBridge to convert StAX events to its own
PullEvent events. Conversion in the opposite direction uses the class
It is possible to request pull-mode evaluation of XQuery code using the method
XQueryExpression.iterateEvents(net.sf.saxon.Controller, net.sf.saxon.query.DynamicQueryContext). This causes any document and element
node constructors to be evaluated in pull mode, returning events representing start/end document/element
rather than actually constructing the result tree in memory. The relevant expressions in the expression
tree provide an
iterateEvents() method to support this mode of execution.
A sequence of events is said to be composed if it consists entirely of items (that is, a node
is passed as a single event, rather than by walking the tree); it is said to be decomposed
if if consists entirely of StAX-like events. In general, the classes in this package handle sequences
that mix both styles. A fully-composed sequence, however, is normally handled using the
SequenceIterator interface rather than by the classes in this package.
SequenceComposer returns a full composed event stream
from a decomposed or mixed stream, constructing tree fragments when
necessary to achieve this; the
does the inverse, walking any tree fragments to deliver the corresponding start-element and end-element
net.sf.saxon.pull represents an earlier attempt at pull-mode processing in Saxon.
It is retained because it provides some capabilities not yet present in this package.
Michael H. Kay
30 July 2010
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.