Package net.sf.saxon.serialize
Class XHTML5Emitter
- java.lang.Object
- 
- net.sf.saxon.event.SequenceReceiver
- 
- net.sf.saxon.serialize.Emitter
- 
- net.sf.saxon.serialize.XMLEmitter
- 
- net.sf.saxon.serialize.XHTML5Emitter
 
 
 
 
- 
- All Implemented Interfaces:
- javax.xml.transform.Result,- Receiver,- ReceiverWithOutputProperties
 
 public class XHTML5Emitter extends XMLEmitter XHTML5Emitter is an Emitter that generates XHTML 5 output. It is the same as XMLEmitter except that it follows the legacy HTML browser compatibility rules: for example, generating empty elements such as [BR /], and using [p][/p] for empty paragraphs rather than [p/]
- 
- 
Field Summary- 
Fields inherited from class net.sf.saxon.serialize.XMLEmitterattSpecials, canonical, characterReferenceGenerator, declarationIsWritten, delimiter, DOCTYPE, elementCode, elementStack, indentForNextAttribute, internalSubset, openStartTag, RIGHT_ANGLE_NEWLINE, specialInAtt, specialInAttSingle, specialInText, started, startedElement, undeclareNamespaces, unfailing
 - 
Fields inherited from class net.sf.saxon.serialize.EmitterallCharactersEncodable, characterSet, outputProperties, writer
 - 
Fields inherited from class net.sf.saxon.event.SequenceReceiverpipelineConfiguration, previousAtomic, systemId
 
- 
 - 
Constructor SummaryConstructors Constructor Description XHTML5Emitter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(UnicodeString chars, Location locationId, int properties)Character data.protected voidwriteDocType(NodeName name, java.lang.String displayName, java.lang.String systemId, java.lang.String publicId)Output the document type declarationprotected booleanwriteDocTypeWithNullSystemId()protected voidwriteEmptyElementTagCloser(java.lang.String displayName, NodeName name)Close an empty element tag.- 
Methods inherited from class net.sf.saxon.serialize.XMLEmitterclose, closeStartTag, comment, convertToAscii, endDocument, endElement, isStarted, namespace, open, openDocument, processingInstruction, setCharacterReferenceGenerator, setEscapeNonAscii, setIndentForNextAttribute, startDocument, startElement, testCharacters, usesTypeAnnotations, writeAttribute, writeAttributeIndentString, writeCodePoint, writeDeclaration, writeEscape
 - 
Methods inherited from class net.sf.saxon.serialize.Emitterappend, getOutputProperties, setMustClose, setOutputProperties, setUnicodeWriter, setUnparsedEntity
 - 
Methods inherited from class net.sf.saxon.event.SequenceReceiverappend, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getNamePool, getPipelineConfiguration, getSystemId, handlesAppend, setPipelineConfiguration, setSystemId
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface net.sf.saxon.event.Receiverappend, getPipelineConfiguration, handlesAppend, setPipelineConfiguration
 
- 
 
- 
- 
- 
Method Detail- 
writeDocTypeprotected void writeDocType(NodeName name, java.lang.String displayName, java.lang.String systemId, java.lang.String publicId) throws XPathException Output the document type declaration- Overrides:
- writeDocTypein class- XMLEmitter
- Parameters:
- name- the qualified name of the element
- displayName- The element name as displayed
- systemId- The DOCTYPE system identifier
- publicId- The DOCTYPE public identifier
- Throws:
- XPathException- if an error occurs writing to the output
 
 - 
writeDocTypeWithNullSystemIdprotected boolean writeDocTypeWithNullSystemId() - Overrides:
- writeDocTypeWithNullSystemIdin class- XMLEmitter
 
 - 
writeEmptyElementTagCloserprotected void writeEmptyElementTagCloser(java.lang.String displayName, NodeName name) throws java.io.IOExceptionClose an empty element tag.- Overrides:
- writeEmptyElementTagCloserin class- XMLEmitter
- Parameters:
- displayName- the name of the empty element
- name- the fingerprint of the name of the empty element
- Throws:
- java.io.IOException- if an IO exception occurs
 
 - 
characterspublic void characters(UnicodeString chars, Location locationId, int properties) throws XPathException Character data.- Specified by:
- charactersin interface- Receiver
- Overrides:
- charactersin class- XMLEmitter
- Parameters:
- chars- The characters
- locationId- provides information such as line number and system ID.
- properties- Bit significant value. The following bits are defined:- DISABLE_ESCAPING
- Disable escaping for this text node
- USE_CDATA
- Output as a CDATA section
 
- Throws:
- XPathException- if an error occurs
 
 
- 
 
-