com.icl.saxon.output
Class StringEmitter

java.lang.Object
  extended bycom.icl.saxon.output.Emitter
      extended bycom.icl.saxon.output.StringEmitter
All Implemented Interfaces:
Result

final class StringEmitter
extends Emitter

This class outputs text content to a StringBuffer, and discards all other content.

Author:
Field Summary
 
Fields inherited from class com.icl.saxon.output.Emitter
locator, namePool, outputProperties, outputStream, systemId, writer
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
protected StringEmitter(StringBuffer buffer)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Produce output using the current Writer.
 void comment(char[] 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
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setOutputStream, setSystemId, setUnparsedEntity, setWriter, usesWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringEmitter

protected StringEmitter(StringBuffer buffer)
Method Detail

startDocument

public void startDocument()
                   throws TransformerException
Start of the document.

Specified by:
startDocument in class Emitter
Throws:
TransformerException

endDocument

public void endDocument()
                 throws TransformerException
End of the document.

Specified by:
endDocument in class Emitter
Throws:
TransformerException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws TransformerException
Produce output using the current Writer.
Special characters are not escaped.

Specified by:
characters in class Emitter
Parameters:
ch - Character array to be output
start - start position of characters to be output
length - number of characters to be output
Throws:
TransformerException - for any failure

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.

Specified by:
startElement in class Emitter
Parameters:
namespaces - Array of namespace codes identifying the namespace prefix/uri pairs associated with this element
nscount - Number of significant entries within namespaces array
Throws:
TransformerException

endElement

public void endElement(int nameCode)
                throws TransformerException
Output an element end tag.
Does nothing with this output method.

Specified by:
endElement in class Emitter
Throws:
TransformerException

processingInstruction

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

Specified by:
processingInstruction in class Emitter
Throws:
TransformerException

comment

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

Specified by:
comment in class Emitter
Throws:
TransformerException