Package net.sf.saxon.trace

## Class ModeTraceListener

- java.lang.Object
- - net.sf.saxon.lib.StandardDiagnostics
  - - net.sf.saxon.trace.AbstractTraceListener
    - - net.sf.saxon.trace.ModeTraceListener

- All Implemented Interfaces:
    `java.util.EventListener`, `TraceListener`

      public class ModeTraceListener
      extends AbstractTraceListener

  A trace listener for XSLT that only handles invocation of template rules; enabled using saxon:trace="yes" on the xsl:mode declaration

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.trace.AbstractTraceListener

      `indent, out`

    - ### Fields inherited from class net.sf.saxon.lib.StandardDiagnostics

      `MAX_MESSAGE_LENGTH, MAX_MESSAGE_LINE_LENGTH, MIN_MESSAGE_LINE_LENGTH, TARGET_MESSAGE_LINE_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ModeTraceListener()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `endCurrentItem​(Item item)` | Called after a node of the source tree got processed
    `void` | `enter​(Traceable info, XPathContext context)` | Called when an instruction in the stylesheet gets processed
    `protected java.lang.String` | `getOpeningAttributes()` | Generate attributes to be included in the opening trace element
    `void` | `leave​(Traceable info)` | Called after an instruction of the stylesheet got processed
    `void` | `startCurrentItem​(Item item)` | Called when an item becomes the context item
    `protected java.lang.String` | `tag​(Traceable info)` |

    - ### Methods inherited from class net.sf.saxon.trace.AbstractTraceListener

      `close, endRuleSearch, enter, escape, getCodeInjector, getOutputDestination, isApplicable, level, open, setLevelOfDetail, setOutputDestination, spaces, startRuleSearch`

    - ### Methods inherited from class net.sf.saxon.lib.StandardDiagnostics

      `abbreviateLocationURI, abbreviateLocationURIDefault, expandSpecialCharacters, formatListOfOffendingNodes, getInstructionName, getInstructionNameDefault, getLocationMessageText, printStackTrace, showOriginator, wordWrap`

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

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

- - ### Constructor Detail

    - #### ModeTraceListener

          public ModeTraceListener()

  - ### Method Detail

    - #### getOpeningAttributes

          protected java.lang.String getOpeningAttributes()

      Generate attributes to be included in the opening trace element
      Specified by:
        `getOpeningAttributes` in class `AbstractTraceListener`

    - #### startCurrentItem

          public void startCurrentItem​(Item item)

      Description copied from class: `AbstractTraceListener`
      Called when an item becomes the context item
      Specified by:
        `startCurrentItem` in interface `TraceListener`
      Overrides:
        `startCurrentItem` in class `AbstractTraceListener`
      Parameters:
        `item` - 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 item)

      Description copied from class: `AbstractTraceListener`
      Called after a node of the source tree got processed
      Specified by:
        `endCurrentItem` in interface `TraceListener`
      Overrides:
        `endCurrentItem` in class `AbstractTraceListener`
      Parameters:
        `item` - 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.

    - #### enter

          public void enter​(Traceable info,
                            XPathContext context)

      Called when an instruction in the stylesheet gets processed

    - #### leave

          public void leave​(Traceable info)

      Description copied from class: `AbstractTraceListener`
      Called after an instruction of the stylesheet got processed
      Specified by:
        `leave` in interface `TraceListener`
      Overrides:
        `leave` in class `AbstractTraceListener`
      Parameters:
        `info` - gives the same information that was supplied to the enter method, though it is not necessarily the same object. Note that the line number of the instruction is that of the start tag in the source stylesheet, not the line number of the end tag.

    - #### tag

          protected java.lang.String tag​(Traceable info)

      Specified by:
        `tag` in class `AbstractTraceListener`