Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.icl.saxon.output
Class HTMLEmitter

    java.lang.Object
      |
      +--com.icl.saxon.output.Emitter
            |
            +--com.icl.saxon.output.XMLEmitter
                  |
                  +--com.icl.saxon.output.HTMLEmitter

All Implemented Interfaces:
  javax.xml.transform.Result

public class HTMLEmitter
extends XMLEmitter

This class generates HTML output

Field Summary

Fields inherited from class com.icl.saxon.output.XMLEmitter
`characterSet, declarationIsWritten, empty, escaping, lastDisplayName, lastNameCode, lastPrefix, lastURI, openStartTag, preferHex`

Fields inherited from class com.icl.saxon.output.Emitter
`locator, namePool, outputProperties, outputStream, systemId, writer`

Fields inherited from interface javax.xml.transform.Result
`PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

Constructor Summary
`HTMLEmitter()` Constructor

Method Summary
`void` | `characters(char[] ch, int start, int length)` Character data.
`void` | `endElement(int nameCode)` Output an element end tag.
`protected static boolean` | `isEmptyTag(java.lang.String tag)`
`static boolean` | `isUrlAttribute(java.lang.String element, java.lang.String attribute)`
`void` | `processingInstruction(java.lang.String target, java.lang.String data)` Handle a processing instruction.
`void` | `startDocument()` Output start of document
`void` | `startElement(int nameCode, org.xml.sax.Attributes atts, int[] namespaces, int nscount)` Output element start tag
`protected void` | `writeAttribute(int elCode, java.lang.String attname, java.lang.String type, java.lang.String value)` Write attribute name=value pair.
`protected void` | `writeEscape(char[] ch, int start, int length, boolean inAttribute)` Escape characters.

Methods inherited from class com.icl.saxon.output.XMLEmitter
`closeStartTag, comment, emptyElementTagCloser, endDocument, outputCharacterReference, setDocumentLocator, setEscaping, setOutputProperties, setResult, setUnparsedEntity, testCharacters, testCharacters, writeDeclaration, writeDocType`

Methods inherited from class com.icl.saxon.output.Emitter
`getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setNamePool, setOutputStream, setSystemId, setWriter, usesWriter`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HTMLEmitter

    public HTMLEmitter()

  Constructor

Method Detail

### isEmptyTag

    protected static boolean isEmptyTag(java.lang.String tag)

### isUrlAttribute

    public static boolean isUrlAttribute(java.lang.String element,
                                         java.lang.String attribute)

### startDocument

    public void startDocument()
                       throws javax.xml.transform.TransformerException

  Output start of document

  Overrides:
    `startDocument` in class `XMLEmitter`
    `javax.xml.transform.TransformerException`

### startElement

    public void startElement(int nameCode,
                             org.xml.sax.Attributes atts,
                             int[] namespaces,
                             int nscount)
                      throws javax.xml.transform.TransformerException

  Output element start tag

  Overrides:
    `startElement` in class `XMLEmitter`
  Parameters:
    `namespaces` - Array of namespace codes identifying the namespace prefix/uri pairs associated with this element
    `nscount` - Number of significant entries within namespaces array
    `javax.xml.transform.TransformerException`

### writeAttribute

    protected void writeAttribute(int elCode,
                                  java.lang.String attname,
                                  java.lang.String type,
                                  java.lang.String value)
                           throws javax.xml.transform.TransformerException

  Write attribute name=value pair. Overrides the XML behaviour if the name and value are the same (we assume this is a boolean attribute to be minimised), or if the value is a URL.

  Overrides:
    `writeAttribute` in class `XMLEmitter`
    `javax.xml.transform.TransformerException`

### writeEscape

    protected void writeEscape(char[] ch,
                               int start,
                               int length,
                               boolean inAttribute)
                        throws java.io.IOException

  Escape characters. Overrides the XML behaviour

  Overrides:
    `writeEscape` in class `XMLEmitter`
  Parameters:
    `ch` - The character array containing the string
    `start` - The start position of the input string within the character array
    `length` - The length of the input string within the character array This method converts the XML special characters (such as < and &) into their predefined entities.
    `java.io.IOException`

### endElement

    public void endElement(int nameCode)
                    throws javax.xml.transform.TransformerException

  Output an element end tag.

  Overrides:
    `endElement` in class `XMLEmitter`
    `javax.xml.transform.TransformerException`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)
                    throws javax.xml.transform.TransformerException

  Character data.

  Overrides:
    `characters` in class `XMLEmitter`
    `javax.xml.transform.TransformerException`

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String data)
                               throws javax.xml.transform.TransformerException

  Handle a processing instruction.

  Overrides:
    `processingInstruction` in class `XMLEmitter`
    `javax.xml.transform.TransformerException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD