Package com.icl.saxon.output
Class XMLIndenter
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.ProxyEmitter
com.icl.saxon.output.XMLIndenter
- All Implemented Interfaces:
Result
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 H. Kay
-
Field Summary
Fields inherited from class com.icl.saxon.output.ProxyEmitter
baseEmitter, outputProperties
Fields inherited from class com.icl.saxon.output.Emitter
locator, namePool, outputStream, systemId, writer
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] chars, int start, int len) Output character datavoid
comment
(char[] chars, int start, int len) Output a commentvoid
End of documentvoid
endElement
(int tag) Output element end tagvoid
ignorableWhitespace
(char[] chars, int start, int len) Output ignorable white spacevoid
processingInstruction
(String target, String data) Output a processing instructionvoid
Start of documentvoid
startElement
(int tag, Attributes atts, int[] namespaces, int nscount) Output element start tagMethods inherited from class com.icl.saxon.output.ProxyEmitter
setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriter
Methods inherited from class com.icl.saxon.output.Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
-
Constructor Details
-
XMLIndenter
public XMLIndenter()
-
-
Method Details
-
startDocument
Start of document- Overrides:
startDocument
in classProxyEmitter
- Throws:
TransformerException
-
startElement
public void startElement(int tag, Attributes atts, int[] namespaces, int nscount) throws TransformerException Output element start tag- Overrides:
startElement
in classProxyEmitter
- Parameters:
namespaces
- Array of namespace codes identifying the namespace prefix/uri pairs associated with this elementnscount
- Number of significant entries within namespaces array- Throws:
TransformerException
-
endElement
Output element end tag- Overrides:
endElement
in classProxyEmitter
- Throws:
TransformerException
-
processingInstruction
Output a processing instruction- Overrides:
processingInstruction
in classProxyEmitter
- Throws:
TransformerException
-
characters
Output character data- Overrides:
characters
in classProxyEmitter
- Throws:
TransformerException
-
ignorableWhitespace
Output ignorable white space- Throws:
TransformerException
-
comment
Output a comment- Overrides:
comment
in classProxyEmitter
- Throws:
TransformerException
-
endDocument
End of document- Overrides:
endDocument
in classProxyEmitter
- Throws:
TransformerException
-