Package 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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
depth
(package private) boolean
inStartTag
-
Constructor Summary
Constructors Constructor Description ExpressionPresenter(Configuration config)
Make an ExpressionPresenter that writes indented output to the standard error output destination of the ConfigurationExpressionPresenter(Configuration config, java.io.OutputStream out)
Make an ExpressionPresenter that writes indented output to a specified output streamExpressionPresenter(Configuration config, Receiver receiver)
Make an ExpressionPresenter for a given Configuration using a user-supplied Receiver to accept the output
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the outputstatic Receiver
defaultDestination(Configuration config, java.io.OutputStream out)
Make a receiver, using default output properties, with serialized output going to a specified OutputStreamvoid
emitAttribute(java.lang.String name, java.lang.String value)
Output an attribute nodeint
endElement()
End an element in the expression treevoid
endSubsidiaryElement()
End a child element in the outputConfiguration
getConfiguration()
Get the Saxon configurationNamePool
getNamePool()
Get the name poolTypeHierarchy
getTypeHierarchy()
Get the type hierarchy cachestatic java.util.Properties
makeDefaultProperties()
Make a Properties object containing defaulted serialization attributes for the expression treeint
startElement(java.lang.String name)
Start an elementvoid
startSubsidiaryElement(java.lang.String name)
Start a child element in the output
-
-
-
Constructor Detail
-
ExpressionPresenter
public ExpressionPresenter(Configuration config)
Make an ExpressionPresenter that writes indented output to the standard error output destination of the Configuration- Parameters:
config
- the Saxon configuration
-
ExpressionPresenter
public ExpressionPresenter(Configuration config, java.io.OutputStream out)
Make an ExpressionPresenter that writes indented output to a specified output stream- Parameters:
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- Parameters:
config
- the Configurationreceiver
- the user-supplied Receiver
-
-
Method Detail
-
defaultDestination
public static Receiver defaultDestination(Configuration config, java.io.OutputStream out) throws XPathException
Make a receiver, using default output properties, with serialized output going to a specified OutputStream- Parameters:
config
- the Configurationout
- the OutputStream- Returns:
- a Receiver that directs serialized output to this output stream
- Throws:
XPathException
-
makeDefaultProperties
public static java.util.Properties makeDefaultProperties()
Make a Properties object containing defaulted serialization attributes for the expression tree- Returns:
- a default set of properties
-
startElement
public int startElement(java.lang.String name)
Start an element- Parameters:
name
- the name of the element- Returns:
- the depth of the tree before this element: for diagnostics, this can be compared with the value returned by endElement
-
emitAttribute
public void emitAttribute(java.lang.String name, java.lang.String value)
Output an attribute node- Parameters:
name
- the name of the attributevalue
- the value of the attribute
-
endElement
public int endElement()
End an element in the expression tree- Returns:
- the depth of the tree after ending this element. For diagnostics, this can be compared with the value returned by startElement()
-
startSubsidiaryElement
public void startSubsidiaryElement(java.lang.String name)
Start a child element in the output- Parameters:
name
- the name of the child element
-
endSubsidiaryElement
public void endSubsidiaryElement()
End a child element in the output
-
close
public void close()
Close the output
-
getConfiguration
public Configuration getConfiguration()
Get the Saxon configuration- Returns:
- the Saxon configuration
-
getNamePool
public NamePool getNamePool()
Get the name pool- Returns:
- the name pool
-
getTypeHierarchy
public TypeHierarchy getTypeHierarchy()
Get the type hierarchy cache- Returns:
- the type hierarchy cache
-
-