Class ContentHandlerProxy.ContentHandlerProxyTraceListener

java.lang.Object
net.sf.saxon.event.ContentHandlerProxy.ContentHandlerProxyTraceListener
All Implemented Interfaces:
TraceListener
Enclosing class:
ContentHandlerProxy

public static class ContentHandlerProxy.ContentHandlerProxyTraceListener extends Object implements TraceListener
Create a TraceListener that will collect information about the current location in the source document. This is used to provide information to the receiving application for diagnostic purposes.
  • Constructor Details

    • ContentHandlerProxyTraceListener

      public ContentHandlerProxyTraceListener()
  • Method Details

    • setOutputDestination

      public void setOutputDestination(Logger stream)
      Description copied from interface: TraceListener
      Method called to supply the destination for output. The default implementation does nothing.
      Specified by:
      setOutputDestination in interface TraceListener
      Parameters:
      stream - a Logger to which any output produced by the TraceListener should be written
    • getContextItemStack

      public Stack<Item> getContextItemStack()
      Get the context item stack
      Returns:
      the context item stack
    • open

      public void open(Controller controller)
      Method called at the start of execution, that is, when the run-time transformation starts
      Specified by:
      open in interface TraceListener
      Parameters:
      controller - identifies the transformation controller, and provides the listener with access to context and configuration information
    • close

      public void close()
      Method called at the end of execution, that is, when the run-time execution ends
      Specified by:
      close in interface TraceListener
    • startCurrentItem

      public void startCurrentItem(Item currentItem)
      Method that is called by an instruction that changes the current item in the source document: that is, xsl:for-each, xsl:apply-templates, xsl:for-each-group. The method is called after the enter method for the relevant instruction, and is called once for each item processed.
      Specified by:
      startCurrentItem in interface TraceListener
      Parameters:
      currentItem - the new current item. Item objects are not mutable; it is safe to retain a reference to the Item for later use.
    • endCurrentItem

      public void endCurrentItem(Item currentItem)
      Method that is called when an instruction has finished processing a new current item and is ready to select a new current item or revert to the previous current item. The method will be called before the leave() method for the instruction that made this item current.
      Specified by:
      endCurrentItem in interface TraceListener
      Parameters:
      currentItem - the item that was current, whose processing is now complete. This will represent the same underlying item as the corresponding startCurrentItem() call, though it will not necessarily be the same actual object.