com.icl.saxon.output

Class StringEmitter

Implemented Interfaces:
Result

(package private) final class StringEmitter
extends Emitter

This class outputs text content to a StringBuffer, and discards all other content.
Author:
Michael H. Kay

Field Summary

Fields inherited from class com.icl.saxon.output.Emitter

locator, namePool, outputProperties, outputStream, systemId, writer

Constructor Summary

StringEmitter(StringBuffer buffer)

Method Summary

void
characters(ch[] , int start, int length)
Produce output using the current Writer.
void
comment(ch[] , int start, int length)
Output a comment.
void
endDocument()
End of the document.
void
endElement(int nameCode)
Output an element end tag.
void
processingInstruction(String name, String value)
Output a processing instruction.
void
startDocument()
Start of the document.
void
startElement(int nameCode, Attributes attributes, int[] namespaces, int nscount)
Output an element start tag.

Methods inherited from class com.icl.saxon.output.Emitter

characters, comment, endDocument, endElement, getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, startDocument, startElement, usesWriter

Constructor Details

StringEmitter

protected StringEmitter(StringBuffer buffer)

Method Details

characters

public void characters(ch[] ,
                       int start,
                       int length)
            throws TransformerException
Produce output using the current Writer.
Special characters are not escaped.
Parameters:
start - start position of characters to be output
length - number of characters to be output

comment

public void comment(ch[] ,
                    int start,
                    int length)
            throws TransformerException
Output a comment.
Does nothing with this output method.

endDocument

public void endDocument()
            throws TransformerException
End of the document.
Overrides:
endDocument in interface Emitter

endElement

public void endElement(int nameCode)
            throws TransformerException
Output an element end tag.
Does nothing with this output method.
Overrides:
endElement in interface Emitter
Parameters:

processingInstruction

public void processingInstruction(String name,
                                  String value)
            throws TransformerException
Output a processing instruction.
Does nothing with this output method.
Overrides:
processingInstruction in interface Emitter

startDocument

public void startDocument()
            throws TransformerException
Start of the document.
Overrides:
startDocument in interface Emitter

startElement

public void startElement(int nameCode,
                         Attributes attributes,
                         int[] namespaces,
                         int nscount)
            throws TransformerException
Output an element start tag.
Does nothing with this output method.
Overrides:
startElement in interface Emitter
Parameters: