net.sf.saxon.event

Class TEXTEmitter

Implemented Interfaces:
Result, Receiver

public class TEXTEmitter
extends XMLEmitter

This class generates TEXT output
Author:
Michael H. Kay

Field Summary

Fields inherited from class net.sf.saxon.event.XMLEmitter

declarationIsWritten, elementCode, elementStack, empty, openStartTag, preferHex, undeclareNamespaces

Fields inherited from class net.sf.saxon.event.Emitter

allCharactersEncodable, characterSet, namePool, outputProperties, outputStream, pipelineConfig, streamResult, systemId, writer

Method Summary

void
attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
void
characters(CharSequence chars, int locationId, int properties)
Produce output using the current Writer.
void
comment(CharSequence chars, int locationId, int properties)
Output a comment.
void
endElement()
Output an element end tag.
void
namespace(int namespaceCode, int properties)
void
open()
Start of the document.
protected void
openDocument()
void
processingInstruction(String name, CharSequence value, int locationId, int properties)
Output a processing instruction.
void
startElement(int nameCode, int typeCode, int locationId, int properties)
Output an element start tag.
void
writeDeclaration()
Output the XML declaration.

Methods inherited from class net.sf.saxon.event.XMLEmitter

attribute, characters, close, closeStartTag, comment, emptyElementTagCloser, endDocument, endElement, namespace, open, openDocument, outputCharacterReference, processingInstruction, startContent, startDocument, startElement, testCharacters, writeAttribute, writeCharSequence, writeDeclaration, writeDocType, writeEscape

Methods inherited from class net.sf.saxon.event.Emitter

getConfiguration, getOutputProperties, getOutputStream, getPipelineConfiguration, getSystemId, getWriter, makeWriter, setOutputProperties, setOutputStream, setPipelineConfiguration, setStreamResult, setSystemId, setUnparsedEntity, setWriter, usesWriter

Method Details

attribute

public void attribute(int nameCode,
                      int typeCode,
                      CharSequence value,
                      int locationId,
                      int properties)
Specified by:
attribute in interface Receiver
Overrides:
attribute in interface XMLEmitter

characters

public void characters(CharSequence chars,
                       int locationId,
                       int properties)
            throws XPathException
Produce output using the current Writer.
Special characters are not escaped.
Specified by:
characters in interface Receiver
Overrides:
characters in interface XMLEmitter
Parameters:
chars - Character sequence to be output
properties - bit fields holding special properties of the characters
Throws:
XPathException - for any failure

comment

public void comment(CharSequence chars,
                    int locationId,
                    int properties)
            throws XPathException
Output a comment.
Does nothing with this output method.
Specified by:
comment in interface Receiver
Overrides:
comment in interface XMLEmitter

endElement

public void endElement()
Output an element end tag.
Does nothing with this output method.
Specified by:
endElement in interface Receiver
Overrides:
endElement in interface XMLEmitter

namespace

public void namespace(int namespaceCode,
                      int properties)
Specified by:
namespace in interface Receiver
Overrides:
namespace in interface XMLEmitter

open

public void open()
            throws XPathException
Start of the document.
Specified by:
open in interface Receiver
Overrides:
open in interface XMLEmitter

openDocument

protected void openDocument()
            throws XPathException
Overrides:
openDocument in interface XMLEmitter

processingInstruction

public void processingInstruction(String name,
                                  CharSequence value,
                                  int locationId,
                                  int properties)
            throws XPathException
Output a processing instruction.
Does nothing with this output method.
Specified by:
processingInstruction in interface Receiver
Overrides:
processingInstruction in interface XMLEmitter

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
Output an element start tag.
Does nothing with this output method.
Specified by:
startElement in interface Receiver
Overrides:
startElement in interface XMLEmitter
Parameters:
nameCode - The element name (tag)
typeCode - The type annotation
properties - Bit fields holding any special properties of the element

writeDeclaration

public void writeDeclaration()
            throws XPathException
Output the XML declaration. This implementation does nothing.
Overrides:
writeDeclaration in interface XMLEmitter