com.icl.saxon.output
Class XMLIndenter

java.lang.Object
  |
  +--com.icl.saxon.output.ProxyEmitter
        |
        +--com.icl.saxon.output.XMLIndenter
All Implemented Interfaces:
Emitter

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)


Fields inherited from class com.icl.saxon.output.ProxyEmitter
baseEmitter, characterSet, namePool, outputDetails, writer
 
Constructor Summary
XMLIndenter()
           
 
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(java.lang.String target, java.lang.String data)
          Output a processing instruction
 void startDocument()
          Start of document
 void startElement(int tag, org.xml.sax.Attributes atts, int[] namespaces, int nscount)
          Output element start tag
 
Methods inherited from class com.icl.saxon.output.ProxyEmitter
setCharacterSet, setDocumentLocator, setEscaping, setNamePool, setOutputDetails, setUnderlyingEmitter, setUnparsedEntity, setWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLIndenter

public XMLIndenter()
Method Detail

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Start of document
Overrides:
startDocument in class ProxyEmitter

startElement

public void startElement(int tag,
                         org.xml.sax.Attributes atts,
                         int[] namespaces,
                         int nscount)
                  throws org.xml.sax.SAXException
Output element start tag
Overrides:
startElement in class ProxyEmitter
Following copied from interface: com.icl.saxon.output.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

endElement

public void endElement(int tag)
                throws org.xml.sax.SAXException
Output element end tag
Overrides:
endElement in class ProxyEmitter

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Output a processing instruction
Overrides:
processingInstruction in class ProxyEmitter

characters

public void characters(char[] chars,
                       int start,
                       int len)
                throws org.xml.sax.SAXException
Output character data
Overrides:
characters in class ProxyEmitter

ignorableWhitespace

public void ignorableWhitespace(char[] chars,
                                int start,
                                int len)
                         throws org.xml.sax.SAXException
Output ignorable white space

comment

public void comment(char[] chars,
                    int start,
                    int len)
             throws org.xml.sax.SAXException
Output a comment
Overrides:
comment in class ProxyEmitter

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
End of document
Overrides:
endDocument in class ProxyEmitter