net.sf.saxon.trace
Class ExpressionPresenter
java.lang.Object
net.sf.saxon.trace.ExpressionPresenter
public class ExpressionPresenter
extends java.lang.Object
This class handles the display of an abstract expression tree in an XML format
with some slight resemblence to XQueryX
ExpressionPresenter
public ExpressionPresenter(Configuration config)
Make an ExpressionPresenter that writes indented output to System.err
config
- the Saxon configuration
ExpressionPresenter
public ExpressionPresenter(Configuration config,
OutputStream out)
Make an ExpressionPresenter that writes indented output to a specified output stream
config
- the Saxon configurationout
- the output stream
ExpressionPresenter
public ExpressionPresenter(Configuration config,
Receiver receiver)
Make an ExpressionPresenter for a given Configuration using a user-supplied Receiver
to accept the output
config
- the Configurationreceiver
- the user-supplied Receiver
close
public void close()
Close the output
defaultDestination
public static Receiver defaultDestination(Configuration config,
OutputStream out)
throws XPathException
Make a receiver, using default output properties, with serialized output going
to a specified OutputStream
config
- the Configurationout
- the OutputStream
- a Receiver that directs serialized output to this output stream
emitAttribute
public void emitAttribute(String name,
String value)
Output an attribute node
name
- the name of the attributevalue
- the value of the attribute
endElement
public int endElement()
End an element in the expression tree
- the depth of the tree after ending this element. For diagnostics, this can be compared with the
value returned by startElement()
endSubsidiaryElement
public void endSubsidiaryElement()
End a child element in the output
getConfiguration
public Configuration getConfiguration()
Get the Saxon configuration
getNamePool
public NamePool getNamePool()
Get the name pool
getTypeHierarchy
public TypeHierarchy getTypeHierarchy()
Get the type hierarchy cache
startElement
public int startElement(String name)
Start an element
name
- the name of the element
- the depth of the tree before this element: for diagnostics, this can be compared
with the value returned by endElement
startSubsidiaryElement
public void startSubsidiaryElement(String name)
Start a child element in the output
name
- the name of the child element