com.icl.saxon.output
public abstract class Emitter extends Object implements Result
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 Locator | locator |
protected NamePool | namePool |
protected Properties | outputProperties |
protected OutputStream | outputStream |
protected String | systemId |
protected Writer | writer |
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 |
Properties | getOutputProperties()
Get the output properties |
OutputStream | getOutputStream()
Get the output stream |
String | getSystemId()
Get the System ID |
Writer | getWriter()
Get the output writer |
static Emitter | makeEmitter(String className)
load a named output emitter or document handler and check it is OK. |
abstract void | processingInstruction(String name, String data)
Output a processing instruction |
void | setDocumentLocator(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(Properties props)
Set the output properties |
void | setOutputStream(OutputStream stream)
Set the output destination as a byte stream |
void | setSystemId(String systemId)
Set the System ID |
void | setUnparsedEntity(String name, String uri)
Set unparsed entity URI Used only when supplying
input from a parser. |
void | setWriter(Writer writer)
Set the output destination as a character stream |
abstract void | startDocument()
Notify document start |
abstract void | startElement(int nameCode, 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 |
UNKNOWN: name code The name code identifying the element. Use the namePool.getDisplayName() method to obtain the tag to display in XML output.
Parameters: namespaces Array of namespace codes identifying the namespace prefix/uri pairs associated with this element nscount Number of significant entries within namespaces array
UNKNOWN: name The Name Code identifying the name of the Element within the name pool. attributes The attributes (excluding namespace declarations) associated with this element.