Class HTMLIndenter
java.lang.Object
com.icl.saxon.output.Emitter
com.icl.saxon.output.ProxyEmitter
com.icl.saxon.output.HTMLIndenter
- All Implemented Interfaces:
Result
HTMLIndenter: This ProxyEmitter indents HTML elements, by adding whitespace
character data where appropriate.
The character data is never added when within an inline element.
The string used for indentation defaults to four spaces, but may be set using the
indent-chars property
Author Michael H. Kay
-
Field Summary
Fields inherited from class ProxyEmitter
baseEmitter, outputPropertiesFields inherited from interface Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] chars, int start, int len) Output character datavoidcomment(char[] chars, int start, int len) Output a commentvoidEnd of documentvoidendElement(int nameCode) Output element end tagvoidignorableWhitespace(char[] chars, int start, int len) Output ignorable white spacevoidprocessingInstruction(String target, String data) Output a processing instructionvoidStart of documentvoidstartElement(int nameCode, Attributes atts, int[] namespaces, int nscount) Output element start tagMethods inherited from class ProxyEmitter
setDocumentLocator, setEscaping, setNamePool, setOutputProperties, setUnderlyingEmitter, setUnparsedEntity, setWriterMethods inherited from class Emitter
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputStream, setSystemId, usesWriter
-
Constructor Details
-
HTMLIndenter
public HTMLIndenter()
-
-
Method Details
-
startDocument
Start of document- Overrides:
startDocumentin classProxyEmitter- Throws:
TransformerException
-
startElement
public void startElement(int nameCode, Attributes atts, int[] namespaces, int nscount) throws TransformerException Output element start tag- Overrides:
startElementin 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:
endElementin classProxyEmitter- Throws:
TransformerException
-
processingInstruction
Output a processing instruction- Overrides:
processingInstructionin classProxyEmitter- Throws:
TransformerException
-
characters
Output character data- Overrides:
charactersin classProxyEmitter- Throws:
TransformerException
-
ignorableWhitespace
Output ignorable white space- Throws:
TransformerException
-
comment
Output a comment- Overrides:
commentin classProxyEmitter- Throws:
TransformerException
-
endDocument
End of document- Overrides:
endDocumentin classProxyEmitter- Throws:
TransformerException
-