# Package com.saxonica.stream

This package and its subpackages contains classes used to support streaming and document projection.

See: Description

- Class Summary
  Class | Description
  --- | ---
  AccumulatorFunctionCallEE | This expression class represents a call to an accumulator function in an XSLT 3.0 stylesheet in SAxon-EE
  AccumulatorManagerEE | Manager for accumulator functions (XSLT 3.0).
  Conduit | A Conduit is a communication channel from a Producer to a Consumer: the channel is used to pass a sequence of items (and possibly an exception) from the producer to the consumer.
  ExpressionInverter | This class performs inversion of an expression so that it can be evaluated in push mode as events are received from the XML parser.
  Inversion | This class represents an expression that has been "inverted" (in the Jackson sense) so that its execution is push-driven, that is, driven by events from the streamed document.
  Inversion.PushAction | A PushAction is a collection of data that together represents the strategy for how an expression should be evaluated in push mode.
  ManualGroupIterator | The class ManualGroupIterator represents an iterator that is never repositioned, but can be used to represent the focus in the dynamic context.
  Projector | This class uses a `PathMap` to do document projection.
  SequenceExchanger | This class enables one thread to produce a sequence of items in push mode, and another thread to read the sequence of items in pull mode, using a producer/consumer model.
  SequenceExchanger.Consumer | The Consumer is a SequenceIterator that reads a sequence of items from the Conduit: that is, it allows its caller to make a sequence of calls on next(), each of which will return the next item pushed onto the Conduit by the corresponding Producer.
  SequenceExchanger.EvaluationThread | EvaluationThread is a producer that evaluates an expression in "push" mode, writing the results to a Conduit.
  SequenceExchanger.Producer | The class Producer represents the thread that pushes items onto the Conduit.
  SequenceExchanger.SequencePusher | A SequenceReceiver that accepts a sequence of events and writes them to a Conduit
  SequenceFilter | A sequence writer that passes on only those items that satisfy a filter predicate.
  SequenceTransmitter | This is a SequenceWriter that passes items through to a supplied SequenceReceiver
  Streamability |
  StreamingApplyTemplates | Streaming version of the xsl:apply-templates instruction.
  StreamingCopy | This class performs a streaming copy of selected nodes within a document.
  StreamingPatternMaker | Factory class to make a streaming pattern from an expression.
  StreamInstr | Implementation of the xsl:stream instruction
  TemplateInversion | This class represents the inversion of a template body

## Package com.saxonica.stream Description

This package and its subpackages contains classes used to support streaming and document projection. In principle these facilities are applicable both to XSLT and XQuery; the streamed evaluation of XPath expressions is also used during schema validation, to process identity constraints.

None of these classes will be used directly by typical user applications.

This package contains classes that watch for events coming from the streamed document. Different kinds of watch are associated with different expressions and perform differing actions with these events; for example a `CopyOfWatch` builds a subtree representing an element and passes this to a feed that expects a stream of element nodes, while a `CountWatch` counts the nodes and passes an integer to the next expression in the pipeline; a `TypedValueWatch` atomizes nodes and feeds the resulting atomic values to the next stage.

The instantiation of watch classes, calling them to test whether they are interested in particular events, and remembering when to de-activate them, is all handled by the `WatchManager`.

Michael H. Kay
Saxonica Limited
30 July 2010

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.