com.saxonica.stream

## Class StreamingApplyTemplates

- java.lang.Object
- - net.sf.saxon.expr.Expression
  - - net.sf.saxon.expr.instruct.Instruction
    - - net.sf.saxon.expr.instruct.ApplyTemplates
      - - com.saxonica.stream.StreamingApplyTemplates

- All Implemented Interfaces:
    Serializable, SourceLocator, LocationProvider, SaxonLocator, ITemplateCall, TailCallReturner, InstructionInfo, Locator

      public class StreamingApplyTemplates
      extends ApplyTemplates

  Streaming version of the xsl:apply-templates instruction. Available in Saxon-EE only. Only used for select="doc(..)" or select="document(...)" or select="doc(..)//x" etc. It is not used for other apply-templates instructions occurring in a streaming template.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.sf.saxon.expr.instruct.ApplyTemplates

      `ApplyTemplates.ApplyTemplatesPackage`

  - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.instruct.ApplyTemplates

      `actualParams, implicitSelect, mode, select, threads, tunnelParams, useCurrentMode, useTailRecursion`

    - ### Fields inherited from class net.sf.saxon.expr.Expression

      `EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, INHERITED_CONTEXT, INSPECTION_CONTEXT, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, NAVIGATION_CONTEXT, NODE_VALUE_CONTEXT, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, W3C_CONSUMING, W3C_FREE_RANGING, W3C_GROUP_CONSUMING, W3C_MOTIONLESS, WATCH_METHOD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamingApplyTemplates(ApplyTemplates apply, Expression documentExp, Pattern selectPattern)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected TailCall` | `apply(XPathContext context, boolean returnTailCall)`
    `protected void` | `explainStreaming(ExpressionPresenter out)`
    `ExpressionCompiler` | `getExpressionCompiler()` Return the compiler of the StreamingApplyTemplate expression
    `protected void` | `promoteInst(PromotionOffer offer)` Handle promotion offers, that is, non-local tree rewrites.

    - ### Methods inherited from class net.sf.saxon.expr.instruct.ApplyTemplates

      `addToPathMap, copy, createsNewNodes, explain, getActualParams, getImplementationMethod, getInstructionNameCode, getIntrinsicDependencies, getMode, getNumberOfThreadsExpression, getSelectExpression, getStreamability, getStreamingAdjunct, getTunnelParams, init, isImplicitSelect, iterateSubExpressions, optimize, process, processLeavingTail, replaceSubExpression, setActualParameters, simplify, typeCheck, usesCurrentMode, useTailRecursion`

    - ### Methods inherited from class net.sf.saxon.expr.instruct.Instruction

      `assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, evaluateItem, getConstructType, getExpressionName, getInstructionName, getItemType, getIteratorFromProcessMethod, getSourceLocator, isXSLT, iterate, promote`

    - ### Methods inherited from class net.sf.saxon.expr.Expression

      `adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntegerBounds, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSubExpressionInfo, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, toString, typeError`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface javax.xml.transform.SourceLocator

      `getColumnNumber, getLineNumber, getPublicId, getSystemId`

- - ### Constructor Detail

    - #### StreamingApplyTemplates

          public StreamingApplyTemplates(ApplyTemplates apply,
                                 Expression documentExp,
                                 Pattern selectPattern)
                                  throws XPathException

      Throws:
        `XPathException`

  - ### Method Detail

    - #### promoteInst

          protected void promoteInst(PromotionOffer offer)
                              throws XPathException

      Description copied from class: `ApplyTemplates`
      Handle promotion offers, that is, non-local tree rewrites.
      Overrides:
        `promoteInst` in class `ApplyTemplates`
      Parameters:
        `offer` - The type of rewrite being offered
      Throws:
        `XPathException` - if an error occurs

    - #### apply

          protected TailCall apply(XPathContext context,
                       boolean returnTailCall)
                            throws XPathException

      Overrides:
        `apply` in class `ApplyTemplates`
      Throws:
        `XPathException`

    - #### getExpressionCompiler

          public ExpressionCompiler getExpressionCompiler()

      Return the compiler of the StreamingApplyTemplate expression
      Overrides:
        `getExpressionCompiler` in class `ApplyTemplates`
      Returns:
        the relevant ExpressionCompiler

    - #### explainStreaming

          protected void explainStreaming(ExpressionPresenter out)

      Overrides:
        `explainStreaming` in class `ApplyTemplates`

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