This package contains classes used to support streaming. For many kinds of expression
that support streaming, there is a
ItemFeedclass 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
whose main methods are
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
method. (It is the responsibility of the class, however, to minimize the amount of data that it buffers).
ItemFeed class for evaluating an expression is created by calling the
which in turn is returned by the streaming adjunct class for the particular kind of expression.
Interface Summary Interface Description FeedMakerAn expression that can be evaluated in streaming mode is represented at compile time by a list of FeedMaker objects. FilteringFeed.FilterInterface defining the filter function, to be implemented by the caller
Class Summary Class Description AbsorptionFeedThis 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.PendingItemA pending item represents a tree under construction. ApplyTemplatesFeedThis 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 AtomicItemFeedAn AtomicItemFeed is an ItemFeed in which the only allowed event is
ItemFeed.append(Item)passing an atomic value.
BufferingApplyTemplatesFeedThis class is used when a streaming xsl:for-each requests processing of a grounded consuming sequence with a static dependency on last() BufferingFeedA BufferingFeed is used to wrap an expression that does not have intrinsic capability to accept streamed input. BufferingFilterExpressionFeedThis 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 BufferingForEachExpressionFeedThis class is used when a streaming xsl:for-each requests processing of a grounded consuming sequence with a static dependency on last() CallableFeedA 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. CardinalityCheckingFeedA Feed to go on the streaming pipeline that checks the cardinality of the sequence represented by the events passing down the pipeline. ComplexNodeEventFeedThis event feed supports instructions that create a document or element node. CopyOfFeedThis 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 DecomposingFeedAppends the output of an ItemFeed to an Outputter DelegatingFeedA DelegatingFeed is an ItemFeed that delegates most of its work to a supplied Outputter. ElementCreatorFeedThis event feed supports instructions that create a document or element node. ExistenceFeedItemFeed implementation supporting the
FilteringFeedThis class selects a subset of the items, nodes, or events selected by some supplying expression. FilteringFeed.OpaqueFilterA filter that matches nothing FilteringFeed.TransparentFilterA filter that matches everything GeneralComparisonFeedThis 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. GroundedItemFeedAn 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
ItemCheckingFeedA 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. ItemFeedAn ItemFeed evaluates an expression in "composed push" mode. ItemMappingFeedA Feed which applies an ItemMappingFunction to each supplied item. MotionlessFeedA feed for an expression that typically accesses the context item but does not consume the input stream. NextIterationFeedThis class is used when one of the xsl:with-param elements within an xsl:next-iteration of an xsl:iterate consumes the streamed input NoCloseFeedThis feed suppresses the call on close(). NoOpenFeedThis 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. NoOpenOrCloseFeedThis 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. ShallowCopyEventFeedThis event feed implements an implicit xsl:copy instruction used in a built-in template. SimpleContentFeedThis 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). SimpleNodeConstructorFeedThis 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). SinkFeedAn ItemFeed that swallows (discards) all input passed to it SnapshotFeedThis class provides streamed implementation of the snapshot() function StringValueFeedThis 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. StringValueGathererA 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. TypedValueFeedThis class is used when a streamed template requests evaluation of the typed value of the nodes selected by a path expression.