Class MergeInstrAdjunct

java.lang.Object
com.saxonica.ee.stream.adjunct.StreamingAdjunct
com.saxonica.ee.stream.adjunct.MergeInstrAdjunct

public class MergeInstrAdjunct extends StreamingAdjunct
Streaming adjunct for the xsl:merge instruction. This is rather different from the usual run of streaming adjuncts since it is more concerned with initiating streaming than with the actual processing
  • Constructor Details

    • MergeInstrAdjunct

      public MergeInstrAdjunct()
  • Method Details

    • checkStreamability

      public static void checkStreamability(MergeInstr.MergeSource mergeSource, Configuration config) throws XPathException
      Throws:
      XPathException
    • computeStreamability

      public PostureAndSweep computeStreamability(ContextItemStaticInfoEE contextInfo, List<String> reasons)
      Description copied from class: StreamingAdjunct
      Compute the posture and sweep of this expression as defined in the W3C streamability specifications. This must be implemented in all subclasses that don't use the general streamability rules. The implementation should have the side-effect of computing the streamability of all subexpressions, recursively.
      Overrides:
      computeStreamability in class StreamingAdjunct
      Parameters:
      contextInfo - Information about the context item type and posture
      reasons - the caller may supply a list, in which case the implementation may add to this; the contents are human-readable messages explaining why the expression is not streamable.
      Returns:
      the posture and sweep of the expression
    • makeSourceIterators

      public static List<ContextMappingIterator> makeSourceIterators(MergeInstr.MergeSource ms, PackageData pd, XPathContext c1) throws XPathException
      Given a streamable xsl:merge-source, return a set of iterators, one for each of the input sequences. Each iterator returns a sequence of "ItemWithMergeKeys" objects, representing an item in the streamed input sequence together with the values of its merge keys
      Parameters:
      ms - The merge source
      pd - The containing package
      c1 - The dynamic XPath Context
      Returns:
      a set of iterators, one for each of the sources selected by the xsl:merge-source element, containing the items delivered by this source together with their merge keys
      Throws:
      XPathException - if anything goes wrong