|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icl.saxon.output.Emitter
com.icl.saxon.output.XMLEmitter
com.icl.saxon.output.HTMLEmitter
public class HTMLEmitter
This class generates HTML output
Field Summary | |
---|---|
(package private) static HashMap |
emptyTags
Table of HTML tags that have no closing tag |
Fields inherited from class com.icl.saxon.output.XMLEmitter |
---|
attbuff1, characterSet, declarationIsWritten, docTypeWritten, empty, escaping, lastDisplayName, lastNameCode, lastPrefix, lastURI, openStartTag, preferHex, specialInAtt, specialInText |
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(String tag)
|
static boolean |
isUrlAttribute(String element,
String attribute)
|
void |
processingInstruction(String target,
String data)
Handle a processing instruction. |
void |
startDocument()
Output start of document |
void |
startElement(int nameCode,
Attributes atts,
int[] namespaces,
int nscount)
Output element start tag |
protected void |
writeAttribute(int elCode,
String attname,
String type,
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 |
Field Detail |
---|
static HashMap emptyTags
Constructor Detail |
---|
public HTMLEmitter()
Method Detail |
---|
protected static boolean isEmptyTag(String tag)
public static boolean isUrlAttribute(String element, String attribute)
public void startDocument() throws TransformerException
startDocument
in class XMLEmitter
TransformerException
public void startElement(int nameCode, Attributes atts, int[] namespaces, int nscount) throws TransformerException
startElement
in class XMLEmitter
namespaces
- Array of namespace codes identifying the namespace prefix/uri
pairs associated with this elementnscount
- Number of significant entries within namespaces array
TransformerException
protected void writeAttribute(int elCode, String attname, String type, String value) throws TransformerException
writeAttribute
in class XMLEmitter
TransformerException
protected void writeEscape(char[] ch, int start, int length, boolean inAttribute) throws IOException
writeEscape
in class XMLEmitter
ch
- The character array containing the stringstart
- The start position of the input string within the character arraylength
- The length of the input string within the character array
This method converts the XML special characters (such as < and &) into their
predefined entities.
IOException
public void endElement(int nameCode) throws TransformerException
endElement
in class XMLEmitter
name
- The element name (tag)
TransformerException
public void characters(char[] ch, int start, int length) throws TransformerException
characters
in class XMLEmitter
TransformerException
public void processingInstruction(String target, String data) throws TransformerException
processingInstruction
in class XMLEmitter
TransformerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |