Package net.sf.saxon.serialize
Class HTML40Emitter
java.lang.Object
net.sf.saxon.event.SequenceReceiver
net.sf.saxon.serialize.Emitter
net.sf.saxon.serialize.XMLEmitter
net.sf.saxon.serialize.HTMLEmitter
net.sf.saxon.serialize.HTML40Emitter
- All Implemented Interfaces:
Result,Receiver,ReceiverWithOutputProperties
This class generates HTML 4.0 output
-
Field Summary
Fields inherited from class net.sf.saxon.serialize.HTMLEmitter
versionFields inherited from class net.sf.saxon.serialize.XMLEmitter
attSpecials, canonical, characterReferenceGenerator, declarationIsWritten, delimiter, DOCTYPE, elementCode, elementStack, indentForNextAttribute, internalSubset, openStartTag, RIGHT_ANGLE_NEWLINE, specialInAtt, specialInAttSingle, specialInText, started, startedElement, undeclareNamespaces, unfailingFields inherited from class net.sf.saxon.serialize.Emitter
allCharactersEncodable, characterSet, outputProperties, writerFields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemIdFields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisHTMLElement(NodeName name) Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specificationprotected voidDo the real work of starting the document.protected booleanAsk whether control characters should be rejected: true for HTML4, false for HTML5voidstartElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) Output element start tagMethods inherited from class net.sf.saxon.serialize.HTMLEmitter
characters, endElement, isEmptyTag, open, processingInstruction, setEmptyTag, setEscapeNonAscii, startContentOLD, writeAttribute, writeDocType, writeEmptyElementTagCloser, writeEscapeMethods inherited from class net.sf.saxon.serialize.XMLEmitter
close, closeStartTag, comment, convertToAscii, endDocument, isStarted, namespace, setCharacterReferenceGenerator, setIndentForNextAttribute, startDocument, testCharacters, usesTypeAnnotations, writeAttributeIndentString, writeCodePoint, writeDeclaration, writeDocTypeWithNullSystemIdMethods inherited from class net.sf.saxon.serialize.Emitter
append, getOutputProperties, setMustClose, setOutputProperties, setUnicodeWriter, setUnparsedEntityMethods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, setPipelineConfiguration, setSystemIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.event.Receiver
append, getPipelineConfiguration, handlesAppend, setPipelineConfigurationMethods inherited from interface javax.xml.transform.Result
getSystemId, setSystemId
-
Constructor Details
-
HTML40Emitter
public HTML40Emitter()Constructor
-
-
Method Details
-
isHTMLElement
Decide whether an element is "serialized as an HTML element" in the language of the 3.0 specification- Specified by:
isHTMLElementin classHTMLEmitter- Parameters:
name- the name of the element- Returns:
- true if the element is to be serialized as an HTML element
-
openDocument
Description copied from class:XMLEmitterDo the real work of starting the document. This happens when the first content is written.- Overrides:
openDocumentin classHTMLEmitter- Throws:
XPathException- if an error occurs opening the output file
-
startElement
public void startElement(NodeName elemName, SchemaType type, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException Output element start tag- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classHTMLEmitter- Parameters:
elemName- the name of the elementtype- the type annotation of the elementattributes- the attributes of this elementnamespaces- the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elementslocation- an object providing information about the module, line, and column where the node originatedproperties- bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in classReceiverOption- Throws:
XPathException- if an error occurs
-
rejectControlCharacters
protected boolean rejectControlCharacters()Ask whether control characters should be rejected: true for HTML4, false for HTML5- Specified by:
rejectControlCharactersin classHTMLEmitter- Returns:
- true if control characters should be rejected
-