# Package com.saxonica.ee.stream.feed

This package contains classes used to support streaming. For many kinds of expression that support streaming, there is a `ItemFeed`class in this package that evaluates the expression in composed push mode, one item at a time.

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

These classes generally implement the interface `ItemFeed`, whose main methods are `open()`, `append(item)`, and `close()`. These methods are called to supply the sequence of items representing the streamed operand of the expression. The feed class can either deliver the result incrementally during calls of the `append(item)` method, or it can deliver the entire result during the `close()` method. (It is the responsibility of the class, however, to minimize the amount of data that it buffers).

The `ItemFeed` class for evaluating an expression is created by calling the `FeedMaker`, which in turn is returned by the streaming adjunct class for the particular kind of expression.

- Interface Summary
  Interface | Description
  --- | ---
  FeedMaker | An expression that can be evaluated in streaming mode is represented at compile time by a list of FeedMaker objects.
  FilteringFeed.Filter | Interface defining the filter function, to be implemented by the caller

- Class Summary
  Class | Description
  --- | ---
  AbsorptionFeed | This class is used as an abstract superclass for expressions where the consuming operand is absorbed by the expression: for example, data(), string(), or copy-of().
  AbsorptionFeed.PendingItem | A pending item represents a tree under construction.
  ApplyTemplatesFeed | This class is used when a streaming template applies xsl:apply-templates to composed items, typically to the items in the current group established using xsl:for-each-group
  AtomicItemFeed | An AtomicItemFeed is an ItemFeed in which the only allowed event is `ItemFeed.append(Item)` passing an atomic value.
  BufferingApplyTemplatesFeed | This class is used when a streaming xsl:for-each requests processing of a grounded consuming sequence with a static dependency on last()
  BufferingFeed | A BufferingFeed is used to wrap an expression that does not have intrinsic capability to accept streamed input.
  BufferingFilterExpressionFeed | This class is used when a streaming template requests filtering of items that don't come directly from the streamed document, but rather are constructed in the course of the push pipeline
  BufferingForEachExpressionFeed | This class is used when a streaming xsl:for-each requests processing of a grounded consuming sequence with a static dependency on last()
  CallableFeed | A CallableFeed is used to wrap an expression that does (a) not have intrinsic capability to accept streamed input, and (b) does not expect any operand to be a sequence, and (c) implements the Callable interface.
  CardinalityCheckingFeed | A Feed to go on the streaming pipeline that checks the cardinality of the sequence represented by the events passing down the pipeline.
  ComplexNodeEventFeed | This event feed supports instructions that create a document or element node.
  CopyOfFeed | This class is used to construct a grounded copy of a streamed node, by capturing the events representing the streamed node as they are notified, and constructing the grounded copy from these events.
  CopyOfFeed.AccumulatorCopier |
  DecomposingFeed | Appends the output of an ItemFeed to an Outputter
  DelegatingFeed | A DelegatingFeed is an ItemFeed that delegates most of its work to a supplied Outputter.
  ElementCreatorFeed | This event feed supports instructions that create a document or element node.
  ExistenceFeed | ItemFeed implementation supporting the `fn:exists()`, `fn:empty()`, and `fn:count()` function
  FilteringFeed | This class selects a subset of the items, nodes, or events selected by some supplying expression.
  FilteringFeed.OpaqueFilter | A filter that matches nothing
  FilteringFeed.TransparentFilter | A filter that matches everything
  GeneralComparisonFeed | This class is used when a streaming template requests a general comparison with one operand being pushed from the streamed input document, and the other being evaluated in pull mode.
  GroundedItemFeed | An GroundedItemFeed is an ItemFeed in which decomposed document and element nodes (that is, start|end Document|Element events) are not accepted, and parentless leaf nodes supplied using methods such as `GroundedItemFeed.characters(java.lang.CharSequence, net.sf.saxon.s9api.Location, int)` or `GroundedItemFeed.attribute(NodeName, SimpleType, CharSequence, Location, int)` are converted into calls on `ItemFeed.append(Item)` supplying an `Orphan` item.
  ItemCheckingFeed | A Feed to go on the streaming pipeline that checks the item type of the items in the sequence represented by the events passing down the pipeline.
  ItemFeed | An ItemFeed evaluates an expression in "composed push" mode.
  ItemMappingFeed | A Feed which applies an ItemMappingFunction to each supplied item.
  MotionlessFeed | A feed for an expression that typically accesses the context item but does not consume the input stream.
  NextIterationFeed | This class is used when one of the xsl:with-param elements within an xsl:next-iteration of an xsl:iterate consumes the streamed input
  NoCloseFeed | This feed suppresses the call on close().
  NoOpenFeed | This feed is used for the inner loop of a for-each, where the results of multiple iterations need to be concatenated into a single sequence.
  NoOpenOrCloseFeed | This feed is used for the inner loop of a for-each, where the results of multiple iterations need to be concatenated into a single sequence.
  ShallowCopyEventFeed | This event feed implements an implicit xsl:copy instruction used in a built-in template.
  SimpleContentFeed | This class is used when a streaming template requests evaluation of a simple content constructor in streaming mode (that is, when it constructs a text, attribute, comment, or PI node based on the contents of the streamed document).
  SimpleNodeConstructorFeed | This class is used when a streaming template requests evaluation of a simple content constructor in streaming mode (that is, when it constructs a text, attribute, comment, or PI node based on the contents of the streamed document).
  SinkFeed | An ItemFeed that swallows (discards) all input passed to it
  SnapshotFeed | This class provides streamed implementation of the snapshot() function
  StringValueFeed | This class is used when a streamed template requests evaluation of the string value of the nodes selected by a path expression, typically in response to an xsl:value-of instruction.
  StringValueGatherer | A StringValueGatherer is a Receiver that computes the string value of an element in streaming mode, by copying all the text nodes to a supplied receiver.
  TypedValueFeed | This class is used when a streamed template requests evaluation of the typed value of the nodes selected by a path expression.