com.lotus.xsl
Class FormatterToHTML

java.lang.Object
  |
  +--com.lotus.xsl.FormatterToXML
        |
        +--com.lotus.xsl.FormatterToHTML

public class FormatterToHTML
extends FormatterToXML

FormatterToHTML formats SAX-style events into XML.


Fields inherited from class com.lotus.xsl.FormatterToXML
indent, m_attrSpecialChars, m_escapeCData, m_shouldWriteXMLHeader, m_stripCData
 
Constructor Summary
FormatterToHTML(java.io.Writer writer, java.lang.String encoding, java.lang.String doctype, boolean doIndent, int indent)
          Constructor for customized encoding and doctype.
 
Method Summary
 void cdata(char[] ch, int start, int length)
          Receive notification of cdata.
 void characters(char[] chars, int start, int length)
          Receive notification of character data.
 void endDocument()
          Receive notification of the end of a document.
 void endElement(java.lang.String name)
          Receive notification of the end of an element.
 void entityReference(java.lang.String name)
          Receive notivication of a entityReference.
 void startElement(java.lang.String name, com.lotus.xsl.AttributeList atts)
          Receive notification of the beginning of an element.
 
Methods inherited from class com.lotus.xsl.FormatterToXML
comment, ignorableWhitespace, indent, prepAttrString, printSpace, processingInstruction, setDocumentLocator, startDocument
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatterToHTML

public FormatterToHTML(java.io.Writer writer,
                       java.lang.String encoding,
                       java.lang.String doctype,
                       boolean doIndent,
                       int indent)
Constructor for customized encoding and doctype.
Parameters:
writer - The character output stream to use.
encoding - Java character encoding in use by writer.
doctype - String to be printed at the top of the document.
indent - Number of spaces to indent at each nesting level.
Method Detail

endDocument

public void endDocument()
                 throws com.lotus.xsl.SAXException
Receive notification of the end of a document.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
Overrides:
endDocument in class FormatterToXML

startElement

public void startElement(java.lang.String name,
                         com.lotus.xsl.AttributeList atts)
                  throws com.lotus.xsl.SAXException
Receive notification of the beginning of an element.
Parameters:
name - The element type name.
atts - The attributes attached to the element, if any.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
Overrides:
startElement in class FormatterToXML
See Also:
endElement(java.lang.String), org.xml.sax.AttributeList

endElement

public void endElement(java.lang.String name)
                throws com.lotus.xsl.SAXException
Receive notification of the end of an element.
Parameters:
name - The element type name
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
Overrides:
endElement in class FormatterToXML

characters

public void characters(char[] chars,
                       int start,
                       int length)
                throws com.lotus.xsl.SAXException
Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).

Parameters:
chars - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
Overrides:
characters in class FormatterToXML
See Also:
FormatterToXML.ignorableWhitespace(char[], int, int), org.xml.sax.Locator

cdata

public void cdata(char[] ch,
                  int start,
                  int length)
           throws com.lotus.xsl.SAXException
Receive notification of cdata.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).

Parameters:
ch - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
Overrides:
cdata in class FormatterToXML
See Also:
FormatterToXML.ignorableWhitespace(char[], int, int), org.xml.sax.Locator

entityReference

public void entityReference(java.lang.String name)
                     throws com.lotus.xsl.SAXException
Receive notivication of a entityReference.
Overrides:
entityReference in class FormatterToXML