public class ExpressionPresenter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExpressionPresenter.ExportOptions |
static interface |
ExpressionPresenter.Options |
Constructor and Description |
---|
ExpressionPresenter()
Make an uncommitted ExpressionPresenter.
|
ExpressionPresenter(Configuration config)
Make an ExpressionPresenter that writes indented output to the standard error output
destination of the Configuration
|
ExpressionPresenter(Configuration config,
Logger out)
Make an ExpressionPresenter that writes indented output to a specified output stream
|
ExpressionPresenter(Configuration config,
Receiver receiver)
Make an ExpressionPresenter for a given Configuration using a user-supplied Receiver
to accept the output
|
ExpressionPresenter(Configuration config,
javax.xml.transform.stream.StreamResult out)
Make an ExpressionPresenter that writes indented output to a specified output stream
|
ExpressionPresenter(Configuration config,
javax.xml.transform.stream.StreamResult out,
boolean checksum)
Make an ExpressionPresenter that writes indented output to a specified output stream,
with checksumming
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the output
|
static Receiver |
defaultDestination(Configuration config,
Logger out)
Make a receiver, using default output properties, with serialized output going
to a specified OutputStream
|
void |
emitAttribute(java.lang.String name,
java.lang.String value)
Output an attribute node
|
void |
emitAttribute(java.lang.String name,
StructuredQName value)
Output a QName-valued attribute node
|
void |
emitRetainedStaticContext(RetainedStaticContext sc,
RetainedStaticContext parentSC) |
int |
endElement()
End an element in the expression tree
|
void |
endSubsidiaryElement()
End a child element in the output
|
Configuration |
getConfiguration()
Get the Saxon configuration
|
NamePool |
getNamePool()
Get the name pool
|
ExpressionPresenter.Options |
getOptions()
Get the options
|
TypeHierarchy |
getTypeHierarchy()
Get the type hierarchy cache
|
void |
init(Configuration config,
Receiver out,
boolean checksum)
Make an ExpressionPresenter that writes indented output to a specified output stream,
with checksumming
|
void |
init(Configuration config,
javax.xml.transform.stream.StreamResult out,
boolean checksum)
Make an ExpressionPresenter that writes indented output to a specified output stream,
with checksumming
|
boolean |
isRelocatable()
Ask whether the package can be deployed to a different location, with a different base URI
|
static java.lang.String |
jsEscape(java.lang.String in)
Static method to escape a string using Javascript escaping conventions
|
static SerializationProperties |
makeDefaultProperties(Configuration config)
Make a Properties object containing defaulted serialization attributes for the expression tree
|
void |
namespace(java.lang.String prefix,
java.lang.String uri)
Output a namespace declaration
|
void |
setChildRole(java.lang.String role)
Set the role of the next element to be output
|
void |
setDefaultNamespace(java.lang.String namespace)
Set the default namespace, used for subsequent calls on startElement.
|
void |
setOptions(ExpressionPresenter.Options options)
Set the options
|
void |
setRelocatable(boolean relocatable)
Say whether the package can be deployed to a different location, with a different base URI
|
int |
startElement(java.lang.String name)
Start an element
|
int |
startElement(java.lang.String name,
Expression expr)
Start an element representing an expression in the expression tree
|
void |
startSubsidiaryElement(java.lang.String name)
Start a child element in the output
|
public ExpressionPresenter()
public ExpressionPresenter(Configuration config)
config
- the Saxon configurationpublic ExpressionPresenter(Configuration config, javax.xml.transform.stream.StreamResult out)
config
- the Saxon configurationout
- the output destinationpublic ExpressionPresenter(Configuration config, javax.xml.transform.stream.StreamResult out, boolean checksum)
config
- the Saxon configurationout
- the output destinationchecksum
- true if a checksum is to be written at the end of the filepublic ExpressionPresenter(Configuration config, Logger out)
config
- the Saxon configurationout
- the output streampublic ExpressionPresenter(Configuration config, Receiver receiver)
config
- the Configurationreceiver
- the user-supplied Receiverpublic void init(Configuration config, javax.xml.transform.stream.StreamResult out, boolean checksum)
config
- the Saxon configurationout
- the output destinationchecksum
- true if a checksum is to be written at the end of the filepublic void init(Configuration config, Receiver out, boolean checksum)
config
- the Saxon configurationout
- the output destinationchecksum
- true if a checksum is to be written at the end of the filepublic void setDefaultNamespace(java.lang.String namespace)
namespace
- the default namespacepublic void setOptions(ExpressionPresenter.Options options)
public ExpressionPresenter.Options getOptions()
public boolean isRelocatable()
public void setRelocatable(boolean relocatable)
relocatable
- if true then static-base-uri() represents the deployed location of the package,
rather than its compile time locationpublic static Receiver defaultDestination(Configuration config, Logger out) throws XPathException
config
- the Configurationout
- the OutputStreamXPathException
public static SerializationProperties makeDefaultProperties(Configuration config)
public int startElement(java.lang.String name, Expression expr)
name
- the name of the elementexpr
- the expression representedpublic void emitRetainedStaticContext(RetainedStaticContext sc, RetainedStaticContext parentSC)
public int startElement(java.lang.String name)
name
- the name of the elementpublic void setChildRole(java.lang.String role)
role
- the value of the role output to be usedpublic void emitAttribute(java.lang.String name, java.lang.String value)
name
- the name of the attributevalue
- the value of the attributepublic void emitAttribute(java.lang.String name, StructuredQName value)
name
- the name of the attributevalue
- the value of the attributepublic void namespace(java.lang.String prefix, java.lang.String uri)
prefix
- the namespace prefixuri
- the namespace URIpublic int endElement()
public void startSubsidiaryElement(java.lang.String name)
name
- the name of the child elementpublic void endSubsidiaryElement()
public void close()
public Configuration getConfiguration()
public NamePool getNamePool()
public TypeHierarchy getTypeHierarchy()
public static java.lang.String jsEscape(java.lang.String in)
in
- the string to be escapedCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.