# Package com.saxonica.stream.adjunct

This package contains classes used to support streaming.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  DivisibleInstruction | This interface is implemented by instructions that can be executed in streaming mode.

- Class Summary
  Class | Description
  --- | ---
  AdjacentTextNodeMergerAdjunct | Compile an AdjacentTextNodeMerger expression to Java source code Needed only for streaming - this class is not used in XQuery
  ApplyImportsAdjunct | Compile an xsl:apply-imports expression/instruction to Java source code.
  ApplyTemplatesAdjunct | Handle streaming for the xsl:apply-templates instruction Used only for XSLT streaming capability.
  AtomicSequenceConverterAdjunct | Compile a AtomicSequenceConverter or UntypedSequenceConverter expression to streaming code.
  AtomizerAdjunct | Watch factory class for an atomizer
  AverageAdjunct | Generate streaming code for the avg() function.
  BlockAdjunct | Generate streaming code for a Block, that is a sequence of expressions or instructions
  CardinalityCheckerAdjunct | Generate streaming code for a cardinality checker
  ChooseAdjunct | Streaming code to implement a conditional ("if/choose") expression
  CopyAdjunct | Compile an xsl:copy expression/instruction to streaming code.
  CopyOfAdjunct |
  CountAdjunct | Generate streaming code for the count() function.
  DistinctValuesAdjunct | Compile a distinct-values expression/instruction to streaming code.
  DocumentInstrAdjunct | Compile a xsl:document instruction to streaming code.
  ElementInstrAdjunct | Generate streaming code for an xsl:element instruction
  EmptyAdjunct | Generate Java code for an empty() function call
  EmptyTextNodeRemoverAdjunct | Compile an AdjacentTextNodeMerger expression to Java source code Needed only for streaming - this class is not used in XQuery
  ExistsAdjunct | Generate streaming code for an exists() function call
  FilterExpressionAdjunct | Generate streaming code for a filter expression (when not part of a Watch).
  FirstItemExpressionAdjunct | Generate streaming code for a first item expression (when not part of a Watch).
  ForEachAdjunct | Compile an xsl:for-each instruction to streaming code.
  ForEachGroupAdjunct | Handle streamed implementation of an xsl:for-each-group instruction.
  ForkAdjunct | Streaming code to implement an xsl:fork expression
  GeneralComparisonAdjunct | Watch factory class for a general comparison
  GroupVariableReferenceAdjunct | Generate streaming code for a variable reference that binds to the "current group" declared in for-each-group.
  ItemCheckerAdjunct | Generate streaming code for an item checker
  IterateAdjunct | Compile an xsl:iterate instruction to streaming code.
  LetExpressionAdjunct | Compiles streaming code to implement a Let expression
  MinimaxAdjunct | Generate streaming code for the min() and max() functions.
  NextIterationAdjunct | Compile a xsl:next-intruction instruction to streaming code.
  NextMatchAdjunct | Compile an xsl:next-match expression/instruction to streaming code.
  ResultDocumentAdjunct | Handle an xsl:result-document expression/instruction for XSLT streaming capability.
  SimpleNodeConstructorAdjunct | Generate streaming code for an xsl:value-of, xsl:comment, xsl:processing-instruction instruction, etc
  SingletonAtomizerAdjunct | Watch factory class for a singleton atomizer
  StreamingAdjunct | This abstract class supplements an `Expression` with methods used at compile-time to support streaming, by generating a `Watch` or `Feed` that allows the expression to be evaluated in push mode.
  StringFnAdjunct | Generate Java code to implement the XPath string() function
  StringJoinAdjunct | Generate streaming code for the string-join() function.
  SumAdjunct | Generate streaming code for the sum() function.
  UnsupportedOperationAdjunct | Streaming code for an expression that does not support streaming
  WithParamAdjunct | Compile a xsl:with-param instruction to streaming code.

## Package com.saxonica.stream.adjunct Description

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).

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 made by the `com.saxonica.stream.adjunct.AdjunctClassMapper` class.

Michael H. Kay
Saxonica Limited
30 July 2010

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