|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.output.Emitter
Emitter: This interface 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.
Field Summary | |
protected org.xml.sax.Locator |
locator
|
protected NamePool |
namePool
|
protected java.util.Properties |
outputProperties
|
protected java.io.OutputStream |
outputStream
|
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 | |
abstract void |
characters(char[] chars,
int start,
int len)
Output character data |
abstract void |
comment(char[] chars,
int start,
int length)
Output a comment. |
abstract void |
endDocument()
Notify document end |
abstract void |
endElement(int nameCode)
Output an element end tag |
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 document handler and check it is OK. |
abstract void |
processingInstruction(java.lang.String name,
java.lang.String data)
Output a processing instruction |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set locator, to identify position in the document. |
void |
setEscaping(boolean escaping)
Switch escaping on or off. |
void |
setNamePool(NamePool namePool)
Set the namePool in which all name codes can be found |
void |
setOutputProperties(java.util.Properties props)
Set the output properties |
void |
setOutputStream(java.io.OutputStream stream)
Set the output destination as a byte stream |
void |
setSystemId(java.lang.String systemId)
Set the System ID |
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Set unparsed entity URI Used only when supplying input from a parser. |
void |
setWriter(java.io.Writer writer)
Set the output destination as a character stream |
abstract void |
startDocument()
Notify document start |
abstract void |
startElement(int nameCode,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
Output an element start tag. |
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 |
Field Detail |
protected NamePool namePool
protected java.lang.String systemId
protected java.io.Writer writer
protected java.io.OutputStream outputStream
protected java.util.Properties outputProperties
protected org.xml.sax.Locator locator
Constructor Detail |
public Emitter()
Method Detail |
public void setNamePool(NamePool namePool)
public NamePool getNamePool()
public void setSystemId(java.lang.String systemId)
setSystemId
in interface Result
systemId
- The system identifier as a URI string.public java.lang.String getSystemId()
getSystemId
in interface Result
public void setOutputProperties(java.util.Properties props)
public java.util.Properties getOutputProperties()
public boolean usesWriter()
public void setWriter(java.io.Writer writer)
public java.io.Writer getWriter()
public void setOutputStream(java.io.OutputStream stream)
public java.io.OutputStream getOutputStream()
public abstract void startDocument() throws TransformerException
TransformerException
public abstract void endDocument() throws TransformerException
TransformerException
public abstract void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws TransformerException
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount
- Number of significant entries within namespaces array
TransformerException
public abstract void endElement(int nameCode) throws TransformerException
TransformerException
public abstract void characters(char[] chars, int start, int len) throws TransformerException
TransformerException
public abstract void processingInstruction(java.lang.String name, java.lang.String data) throws TransformerException
TransformerException
public abstract void comment(char[] chars, int start, int length) throws TransformerException
TransformerException
public void setEscaping(boolean escaping) throws TransformerException
TransformerException
public void setDocumentLocator(org.xml.sax.Locator locator)
public void setUnparsedEntity(java.lang.String name, java.lang.String uri) throws TransformerException
TransformerException
public static Emitter makeEmitter(java.lang.String className) throws TransformerException
TransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |