Class ComponentInversion

java.lang.Object
com.saxonica.ee.stream.ComponentInversion

public class ComponentInversion extends Object
This class represents the inversion of a template or function body
  • Constructor Details

    • ComponentInversion

      public ComponentInversion(Expression body)
      Create the Jackson inversion of a template or function, allowing the template or function to execute on a streamed input source.
      Parameters:
      body - the body of the template to be inverted
  • Method Details

    • getWatch

      public Watch getWatch(WatchManager wm, ItemFeed result, XPathContext context) throws XPathException
      Get a Watch associated with this template, if any. This creates a watch to implement the "drill-down" instruction of the inverted template, for example if the drill-down instruction is <xsl:copy-of select="a/b/c"> then it returns a CopyOfFeed with that expression as its selection.
      Parameters:
      wm - the WatchManager which keeps track of all active Watches
      result - the destination for the output of this Watch
      context - the stack of dynamic context objects for the active Watches
      Returns:
      the Watch if there is one, or null otherwise.
      Throws:
      XPathException - if an error occurs
    • invert

      public void invert(boolean isW3CStreamable) throws XPathException
      Invert the body of the template.
      Throws:
      XPathException - if the template is non-streamable
    • setStackFrame

      public void setStackFrame(SlotManager frame)
      Set the stackframe identifying the slots used for local variables
      Parameters:
      frame - the stack frame skeleton
    • getStackFrame

      public SlotManager getStackFrame()
      Get the stackframe identifying the slots used for local variables
      Returns:
      the stack frame skeleton
    • getInversion

      public Inversion getInversion()
    • explain

      public void explain(ExpressionPresenter presenter) throws XPathException
      Output diagnostic explanation to an ExpressionPresenter
      Parameters:
      presenter - the destination for the output
      Throws:
      XPathException