Package org.apache.xalan.trace
Class PrintTraceListener
- java.lang.Object
-
- org.apache.xalan.trace.PrintTraceListener
-
- All Implemented Interfaces:
java.util.EventListener
,TraceListener
,TraceListenerEx
,TraceListenerEx2
,TraceListenerEx3
public class PrintTraceListener extends java.lang.Object implements TraceListenerEx3
Implementation of the TraceListener interface that prints each event to standard out as it occurs.- See Also:
TracerEvent
-
-
Field Summary
Fields Modifier and Type Field Description boolean
m_traceElements
Set to true if the listener is to print events that occur as each node is 'executed' in the stylesheet.boolean
m_traceExtension
Set to true if the listener is to print information after each extension event.boolean
m_traceGeneration
Set to true if the listener is to print information after each result-tree generation event.boolean
m_traceSelection
Set to true if the listener is to print information after each selection event.boolean
m_traceTemplates
This needs to be set to true if the listener is to print an event whenever a template is invoked.
-
Constructor Summary
Constructors Constructor Description PrintTraceListener(java.io.PrintWriter pw)
Construct a trace listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_trace(TracerEvent ev)
Print information about a TracerEvent.void
extension(ExtensionEvent ev)
Print information about an extension event.void
extensionEnd(ExtensionEvent ev)
Print information about an extension event.void
generated(GenerateEvent ev)
Print information about a Generate event.void
selected(SelectionEvent ev)
Method that is called just after a select attribute has been evaluated.void
selectEnd(EndSelectionEvent ev)
Method that is called after an xsl:apply-templates or xsl:for-each selection occurs.void
trace(TracerEvent ev)
Print information about a TracerEvent.void
traceEnd(TracerEvent ev)
Method that is called when the end of a trace event occurs.
-
-
-
Field Detail
-
m_traceTemplates
public boolean m_traceTemplates
This needs to be set to true if the listener is to print an event whenever a template is invoked.
-
m_traceElements
public boolean m_traceElements
Set to true if the listener is to print events that occur as each node is 'executed' in the stylesheet.
-
m_traceGeneration
public boolean m_traceGeneration
Set to true if the listener is to print information after each result-tree generation event.
-
m_traceSelection
public boolean m_traceSelection
Set to true if the listener is to print information after each selection event.
-
m_traceExtension
public boolean m_traceExtension
Set to true if the listener is to print information after each extension event.
-
-
Method Detail
-
_trace
public void _trace(TracerEvent ev)
Print information about a TracerEvent.- Parameters:
ev
- the trace event.
-
trace
public void trace(TracerEvent ev)
Print information about a TracerEvent.- Specified by:
trace
in interfaceTraceListener
- Parameters:
ev
- the trace event.
-
traceEnd
public void traceEnd(TracerEvent ev)
Method that is called when the end of a trace event occurs. The method is blocking. It must return before processing continues.- Specified by:
traceEnd
in interfaceTraceListenerEx2
- Parameters:
ev
- the trace event.
-
selected
public void selected(SelectionEvent ev) throws javax.xml.transform.TransformerException
Method that is called just after a select attribute has been evaluated.- Specified by:
selected
in interfaceTraceListener
- Parameters:
ev
- the generate event.- Throws:
javax.xml.transform.TransformerException
-
selectEnd
public void selectEnd(EndSelectionEvent ev) throws javax.xml.transform.TransformerException
Method that is called after an xsl:apply-templates or xsl:for-each selection occurs.- Specified by:
selectEnd
in interfaceTraceListenerEx
- Parameters:
ev
- the generate event.- Throws:
javax.xml.transform.TransformerException
-
generated
public void generated(GenerateEvent ev)
Print information about a Generate event.- Specified by:
generated
in interfaceTraceListener
- Parameters:
ev
- the trace event.
-
extension
public void extension(ExtensionEvent ev)
Print information about an extension event.- Specified by:
extension
in interfaceTraceListenerEx3
- Parameters:
ev
- the extension event to print information about
-
extensionEnd
public void extensionEnd(ExtensionEvent ev)
Print information about an extension event.- Specified by:
extensionEnd
in interfaceTraceListenerEx3
- Parameters:
ev
- the extension event to print information about
-
-