Package com.saxonica.ee.stream.adjunct
This package contains classes used to support streaming. For every kind of expression that can appear in the expression tree, there is an auxiliary or adjunct class that contains the code needed to support streaming (if any). This provides capability to assess the streamability of a construct at compile time, and to evaluate the expression (in bottom-up push mode) at execution time.
None of these classes will be used directly by typical user applications.
The interface to these adjunct classes is defined in the abstract class
StreamingAdjunct
. The main methods
are getWatchMaker()
and getFeedMaker()
which return
a factory for respectively a Watch
and a Feed
;
a Watch is used to evaluate the expression in decomposed push mode, an event
at a time, while a Feed is used to evaluate it in composed push mode, an item
at a time.
The association between an expression class and its corresponding adjunct is
held in a static map maintained by the class StreamingAdjunct
.
-
ClassesClassDescriptionHandle streaming for calls to user-defined functions with streamability="absorbing"Generate streaming code for an accumulator-after() function call, particularly in the case where the instruction is consuming and therefore has to defer evaluation until the endElement event.Streaming implementation of an AdjacentTextNodeMerger expressionCompile an xsl:apply-imports expression/instruction to Java source code.Handle streaming for the xsl:apply-templates instructionGenerate streaming code for a SquareArrayConstructor, that is a sequence of expressions or instructions used to establish the content of an XDM arrayHandle streaming for calls to user-defined functions with streamability="ascent"Compile a AtomicSequenceConverter or UntypedSequenceConverter expression to streaming code.Streaming adjunct class for an atomizer (or call on the data() function)Compile an axis expression to streaming code.Generate streaming code for a Block, that is a sequence of expressions or instructionsFeed implementation supporting the
fn:boolean()
andfn:not()
functionsFeed implementation for the fn:not functionFeed implementation for the fn:boolean functionStreaming code for an fn:boolean() function callGenerate streaming code for a cardinality checkerStreaming code to implement a conditional ("if/choose") expressionWatch factory class for an class that composes items from sequences of events: examples are copy-of(), data(), and string().Generate streaming code for a conditional Block, that is a sequence constructor containing xsl:on-empty and/or xsl:on-not-empty instructionsCompile an xsl:copy expression/instruction to streaming code.Streaming code for the count() function.Provides streaming code for a call on current-group().Generate streaming code for a call on current-merge-group().Handle streaming for calls to user-defined functions with streamability="absorbing"Implement streaming of deep-equal function.Implement the distinct-values function in streaming mode.Evaluate an xsl:document instruction in streaming code.Generate streaming code for a document sorting expression node.Generate streaming code for an xsl:element instruction.Streaming code for an fn:empty() function callStreamed evaluation of an EmptyTextNodeRemover expression.Streaming code for an fn:exists() function callAn ItemFeed that captures all written events in a buffer for subsequent replay.Generate streaming code for a filter expression (when not part of a Watch).Generate streaming code for the fn:filter function.Handle streaming for calls to user-defined functions with streamability="filter"A subclass of StreamingAdjunct used for expressions that have a sequence-valued operand with usage transmission.Generate streaming code for a first item expression (when not part of a Watch).Streaming code for functions implemented as fold operations.Compile an xsl:for-each instruction to streaming code.Compile an xsl:for-each-group instruction to streaming code.Streaming code to implement a "for" expressionStreaming code to implement an xsl:fork expressionWatch factory class for a general comparisonThis class implements GroupingFeed when the group-adjacent option is used.This feed supports xsl:for-each-group in streaming mode.This class implements GroupingFeed when the group-ending-with option is used.This class implements GroupingFeed when the group-starting-with option is used.Generate streaming code for the index-of() function.Implement streaming of insert-before instruction.Abstract superclass for constructs that have operand usage "inspection" on their primary (sequence-valued) operandGenerate streaming code for an "instance of" expressionStreaming code for an item checkerGenerate streaming code for the saxon:items-after function.Generate streaming code for the saxon:items-before function.Generate streaming code for the saxon:items-from function.Generate streaming code for the saxon:items-until function.Implement streaming code for xsl:iterateCompiles streaming code to implement a Let expressionCompiles streaming code to implement a Let expression for which the "action" part (the return clause) is consumingStreamed evaluation of a literal (not difficult!)Streaming code to implement an xsl:map instruction or map constructor, where each map entry is allowed to be consuming.Streaming adjunct for the xsl:merge instruction.Generate streaming code for the min() and max() functions.Streaming code to implement an xsl:map instruction or map constructor, where each map entry is allowed to be consuming.Compile a xsl:next-intruction instruction to streaming code.Compile an xsl:next-match expression/instruction to streaming code.Streaming code for an fn:not() function callGenerate streaming code for a consuming xsl:on-empty instructionGenerate streaming code for a consuming xsl:on-non-empty instructionStreaming code for an outermost() function call.Watch factory class for an atomizerGenerate streaming code for a remove() function call.Handle an xsl:result-document expression/instruction for XSLT streaming capability.Streaming code for an expression that does not support streamingHandle streaming for calls to user-defined functions with streamability="shallow-descent"Generate streaming code for an xsl:value-of, xsl:comment, xsl:processing-instruction instruction, etcWatch factory class for a singleton atomizerGenerate streaming code for the snapshot() functionStreaming code for sort expression.This abstract class supplements anExpression
with methods used at compile-time to support streaming, by generating aWatch
that allows the expression to be evaluated in push mode.Streaming code to implement the XPath string() functionStreaming code for a subscript expressionGenerate streaming code for a subsequence() function call.Streaming code to implement a switch expression, which results from optimizing a choose where all the branches have similar test conditions.Implement streaming of the trace instruction injected into the code when compiled with tracing enabled.Implement streaming of fn:trace instruction.A subclass of StreamingAdjunct used for expressions that have a sequence-valued operand with usage transmission.Generate streaming code for a "treat" function call (for example one-or-more)Streaming code for a try/catch expressionHandle streaming for calls to user-defined functions Used only for XSLT streaming capability.Class to handle streaming of union, intersect, and except expressionsGenerate streaming code for an xsl:where-populated instruction.Streaming code for the xml-to-json() function