Package net.sf.saxon.trace

## Class XQueryTraceListener

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

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

      public class XQueryTraceListener
      extends AbstractTraceListener

  A Simple trace listener for XQuery that writes messages (by default) to System.err

- - ### 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
    --- | ---
    `XQueryTraceListener()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `endRuleSearch​(java.lang.Object rule, Mode mode, Item item)` | Called at the end of a rule search
    `protected java.lang.String` | `getOpeningAttributes()` | Generate attributes to be included in the opening trace element
    `void` | `startRuleSearch()` | Called at the start of a rule search
    `protected java.lang.String` | `tag​(Traceable info)` | Get the trace element tagname to be used for a particular construct.

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

      `close, endCurrentItem, enter, escape, getCodeInjector, getOutputDestination, isApplicable, leave, level, open, setLevelOfDetail, setOutputDestination, spaces, startCurrentItem`

    - ### 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

    - #### XQueryTraceListener

          public XQueryTraceListener()

  - ### Method Detail

    - #### getOpeningAttributes

          protected java.lang.String getOpeningAttributes()

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

    - #### tag

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

      Get the trace element tagname to be used for a particular construct. Return null for trace events that are ignored by this trace listener.
      Specified by:
        `tag` in class `AbstractTraceListener`
      Parameters:
        `info` -

    - #### startRuleSearch

          public void startRuleSearch()

      Called at the start of a rule search
      Specified by:
        `startRuleSearch` in interface `TraceListener`
      Overrides:
        `startRuleSearch` in class `AbstractTraceListener`

    - #### endRuleSearch

          public void endRuleSearch​(java.lang.Object rule,
                                    Mode mode,
                                    Item item)

      Called at the end of a rule search
      Specified by:
        `endRuleSearch` in interface `TraceListener`
      Overrides:
        `endRuleSearch` in class `AbstractTraceListener`
      Parameters:
        `rule` - the rule that has been selected
        `mode` -
        `item` -