public class HTMLEmitter extends XMLEmitter
| Modifier and Type | Field and Description |
|---|---|
(package private) static HTMLTagHashSet |
emptyTags
Table of HTML tags that have no closing tag
|
declarationIsWritten, elementCode, elementStack, openStartTag, preferHex, specialInAtt, specialInText, started, startedElement, undeclareNamespacesallCharactersEncodable, characterSet, namePool, outputProperties, outputStream, pipelineConfig, streamResult, systemId, writer| Constructor and Description |
|---|
HTMLEmitter()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(java.lang.CharSequence chars,
int locationId,
int properties)
Character data.
|
void |
endElement()
Output an element end tag.
|
protected static boolean |
isEmptyTag(java.lang.String tag) |
void |
open()
Output start of document
|
protected void |
openDocument()
Do the real work of starting the document.
|
void |
processingInstruction(java.lang.String target,
java.lang.CharSequence data,
int locationId,
int properties)
Handle a processing instruction.
|
void |
startContent()
Notify the start of the content, that is, the completion of all attributes and namespaces.
|
void |
startElement(int nameCode,
int typeCode,
int locationId,
int properties)
Output element start tag
|
protected void |
writeAttribute(int elCode,
java.lang.String attname,
java.lang.CharSequence value,
int properties)
Write attribute name=value pair.
|
protected void |
writeDocType(java.lang.String type,
java.lang.String systemId,
java.lang.String publicId)
Output the document type declaration
|
protected void |
writeEscape(java.lang.CharSequence chars,
boolean inAttribute)
Escape characters.
|
attribute, close, closeStartTag, comment, emptyElementTagCloser, endDocument, getCachedName, namespace, outputCharacterReference, putCachedName, startDocument, testCharacters, usesTypeAnnotations, writeCharSequence, writeDeclarationgetConfiguration, getOutputProperties, getOutputStream, getPipelineConfiguration, getSystemId, getWriter, makeOutputStream, makeWriter, setOutputProperties, setOutputStream, setPipelineConfiguration, setStreamResult, setSystemId, setUnparsedEntity, setWriter, usesWriterstatic HTMLTagHashSet emptyTags
protected static boolean isEmptyTag(java.lang.String tag)
public void open()
throws XPathException
open in interface Receiveropen in class XMLEmitterXPathExceptionprotected void openDocument()
throws XPathException
XMLEmitteropenDocument in class XMLEmitterXPathExceptionprotected void writeDocType(java.lang.String type,
java.lang.String systemId,
java.lang.String publicId)
throws XPathException
writeDocType in class XMLEmittertype - The element namesystemId - The DOCTYP system identifierpublicId - The DOCTYPE public identifierXPathExceptionpublic void startElement(int nameCode,
int typeCode,
int locationId,
int properties)
throws XPathException
startElement in interface ReceiverstartElement in class XMLEmitternameCode - integer code identifying the name of the element within the name pool.typeCode - integer code identifying the element's type within the name pool. The value -1
indicates the default type, xs:untyped.locationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - bit-significant properties of the element node. If there are no revelant
properties, zero is supplied. The definitions of the bits are in class ReceiverOptionsXPathExceptionpublic void startContent()
throws XPathException
ReceiverstartContent in interface ReceiverstartContent in class XMLEmitterXPathExceptionprotected void writeAttribute(int elCode,
java.lang.String attname,
java.lang.CharSequence value,
int properties)
throws XPathException
writeAttribute in class XMLEmitterelCode - The element name is not used in this version of the
method, but is used in the HTML subclass.attname - The attribute name, which has already been validated to ensure
it can be written in this encodingvalue - The value of the attributeproperties - Any special properties of the attributeXPathExceptionprotected void writeEscape(java.lang.CharSequence chars,
boolean inAttribute)
throws java.io.IOException,
XPathException
writeEscape in class XMLEmitterchars - The character sequence containing the stringinAttribute - Set to true if the text is in an attribute valuejava.io.IOExceptionXPathExceptionpublic void endElement()
throws XPathException
endElement in interface ReceiverendElement in class XMLEmitterXPathExceptionpublic void characters(java.lang.CharSequence chars,
int locationId,
int properties)
throws XPathException
characters in interface Receivercharacters in class XMLEmitterchars - The characterslocationId - an integer which can be interpreted using a LocationProvider
to return information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Bit significant value. The following bits are defined:
XPathExceptionpublic void processingInstruction(java.lang.String target,
java.lang.CharSequence data,
int locationId,
int properties)
throws XPathException
processingInstruction in interface ReceiverprocessingInstruction in class XMLEmittertarget - The PI name. This must be a legal name (it will not be checked).data - The data portion of the processing instructionlocationId - an integer which can be interpreted using a LocationProvider to return
information such as line number and system ID. If no location information is available,
the value zero is supplied.properties - Additional information about the PI.XPathException