|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.event.Emitter
Emitter: This abstract class defines methods that must be implemented by components that format SAXON output. There is one emitter for XML, one for HTML, and so on. Additional methods are concerned with setting options and providing a Writer.
The interface is deliberately designed to be as close as possible to the standard SAX2 ContentHandler interface, however, it allows additional information to be made available. An Emitter is a Receiver, specifically it is a Receiver that can direct output to a Writer or OutputStream, using serialization properties defined in a Properties object.
Field Summary | |
protected CharacterSet |
characterSet
|
protected org.xml.sax.Locator |
locator
|
protected NamePool |
namePool
|
protected java.util.Properties |
outputProperties
|
protected java.io.OutputStream |
outputStream
|
protected javax.xml.transform.stream.StreamResult |
streamResult
|
protected java.lang.String |
systemId
|
protected java.io.Writer |
writer
|
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
Emitter()
|
Method Summary | |
NamePool |
getNamePool()
Get the namepool used for this document |
java.util.Properties |
getOutputProperties()
Get the output properties |
java.io.OutputStream |
getOutputStream()
Get the output stream |
java.lang.String |
getSystemId()
Get the System ID |
java.io.Writer |
getWriter()
Get the output writer |
static Emitter |
makeEmitter(java.lang.String className)
Load a named output emitter or SAX2 ContentHandler and check it is OK. |
protected void |
makeWriter()
Make a Writer for this Emitter to use, given a StreamResult |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set locator, to identify position in the document. |
void |
setNamePool(NamePool namePool)
Set the namePool in which all name codes can be found |
void |
setOutputProperties(java.util.Properties details)
Set output properties |
void |
setOutputStream(java.io.OutputStream stream)
Set the output destination as a byte stream |
void |
setStreamResult(javax.xml.transform.stream.StreamResult result)
Set the StreamResult acting as the output destination of the Emitter |
void |
setSystemId(java.lang.String systemId)
Set the System ID |
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri,
java.lang.String publicId)
Set unparsed entity URI. |
void |
setWriter(java.io.Writer writer)
Set the output destination as a character stream |
boolean |
usesWriter()
Determine whether the Emitter wants a Writer for character output or an OutputStream for binary output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.event.Receiver |
attribute, characters, comment, endDocument, endElement, namespace, processingInstruction, startContent, startDocument, startElement |
Field Detail |
protected NamePool namePool
protected java.lang.String systemId
protected javax.xml.transform.stream.StreamResult streamResult
protected java.io.Writer writer
protected java.io.OutputStream outputStream
protected java.util.Properties outputProperties
protected org.xml.sax.Locator locator
protected CharacterSet characterSet
Constructor Detail |
public Emitter()
Method Detail |
public void setNamePool(NamePool namePool)
setNamePool
in interface Receiver
public NamePool getNamePool()
getNamePool
in interface Receiver
public void setSystemId(java.lang.String systemId)
setSystemId
in interface javax.xml.transform.Result
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.transform.Result
public void setOutputProperties(java.util.Properties details) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public java.util.Properties getOutputProperties()
public void setStreamResult(javax.xml.transform.stream.StreamResult result)
protected void makeWriter() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public boolean usesWriter()
public void setWriter(java.io.Writer writer)
public java.io.Writer getWriter()
public void setOutputStream(java.io.OutputStream stream) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
public java.io.OutputStream getOutputStream()
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface Receiver
public void setUnparsedEntity(java.lang.String name, java.lang.String uri, java.lang.String publicId) throws javax.xml.transform.TransformerException
setUnparsedEntity
in interface Receiver
name
- The name of the unparsed entityuri
- The system identifier of the unparsed entitypublicId
- The public identifier of the unparsed entity
javax.xml.transform.TransformerException
public static Emitter makeEmitter(java.lang.String className) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |