net.sf.saxon.serialize
Class XHTMLEmitter

java.lang.Object
  extended by net.sf.saxon.serialize.Emitter
      extended by net.sf.saxon.serialize.XMLEmitter
          extended by net.sf.saxon.serialize.XHTMLEmitter
All Implemented Interfaces:
Result, Receiver

public class XHTMLEmitter
extends XMLEmitter

XHTMLEmitter is an Emitter that generates XHTML 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.XMLEmitter
characterReferenceGenerator, declarationIsWritten, elementCode, elementStack, indentForNextAttribute, openStartTag, started, startedElement, undeclareNamespaces
 
Fields inherited from class net.sf.saxon.serialize.Emitter
allCharactersEncodable, characterSet, namePool, outputProperties, outputStream, pipelineConfig, streamResult, systemId, writer
 
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
 
Constructor Summary
XHTMLEmitter()
           
 
Method Summary
protected  String emptyElementTagCloser(String displayName, NodeName nameCode)
          Close an empty element tag.
 
Methods inherited from class net.sf.saxon.serialize.XMLEmitter
attribute, characters, close, closeStartTag, comment, endDocument, endElement, getAttributeIndentString, namespace, open, openDocument, processingInstruction, setCharacterReferenceGenerator, setEscapeNonAscii, setIndentForNextAttribute, startContent, startDocument, startElement, testCharacters, usesTypeAnnotations, writeAttribute, writeCharSequence, writeDeclaration, writeDocType, writeEscape
 
Methods inherited from class net.sf.saxon.serialize.Emitter
getConfiguration, getOutputProperties, getOutputStream, getPipelineConfiguration, getSystemId, getWriter, makeOutputStream, makeWriter, setOutputProperties, setOutputStream, setPipelineConfiguration, setStreamResult, setSystemId, setUnparsedEntity, setWriter, usesWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XHTMLEmitter

public XHTMLEmitter()
Method Detail

emptyElementTagCloser

protected String emptyElementTagCloser(String displayName,
                                       NodeName nameCode)
Close an empty element tag.

Overrides:
emptyElementTagCloser in class XMLEmitter
Parameters:
displayName - the name of the empty element
nameCode - the fingerprint of the name of the empty element
Returns:
the string used to close an empty element tag.


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.