com.icl.saxon.output

Class XMLIndenter

Implemented Interfaces:
Result

public class XMLIndenter
extends ProxyEmitter

XMLIndenter: This ProxyEmitter indents elements, by adding character data where appropriate. The character data is always added as "ignorable white space", that is, it is never added adjacent to existing character data. Author Michael Kay (mhkay@iclway.co.uk)

Nested Class Summary

Field Summary

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

baseEmitter, outputProperties

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

locator, namePool, outputProperties, outputStream, systemId, writer

Method Summary

void
characters(char[] chars, int start, int len)
Output character data
void
comment(char[] chars, int start, int len)
Output a comment
void
endDocument()
End of document
void
endElement(int tag)
Output element end tag
void
ignorableWhitespace(char[] chars, int start, int len)
Output ignorable white space
void
processingInstruction(String target, String data)
Output a processing instruction
void
startDocument()
Start of document
void
startElement(int tag, Attributes atts, int[] namespaces, int nscount)
Output element start tag

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

characters, comment, endDocument, endElement, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter, startDocument, startElement

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

Method Details

characters

public void characters(char[] chars,
                       int start,
                       int len)
            throws TransformerException
Output character data
Overrides:
characters in interface ProxyEmitter


comment

public void comment(char[] chars,
                    int start,
                    int len)
            throws TransformerException
Output a comment
Overrides:
comment in interface Emitter


endDocument

public void endDocument()
            throws TransformerException
End of document
Overrides:
endDocument in interface ProxyEmitter


endElement

public void endElement(int tag)
            throws TransformerException
Output element end tag
Overrides:
endElement in interface ProxyEmitter


ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int len)
            throws TransformerException
Output ignorable white space


processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws TransformerException
Output a processing instruction
Overrides:
processingInstruction in interface ProxyEmitter


startDocument

public void startDocument()
            throws TransformerException
Start of document
Overrides:
startDocument in interface ProxyEmitter


startElement

public void startElement(int tag,
                         Attributes atts,
                         int[] namespaces,
                         int nscount)
            throws TransformerException
Output element start tag
Overrides:
startElement in interface ProxyEmitter