net.sf.saxon.event
Class HTMLEmitter

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

public class HTMLEmitter
extends XMLEmitter

This class generates HTML output

Author:
Michael H. Kay

Constructor Summary
HTMLEmitter()
          Constructor
 
Method Summary
 void characters(CharSequence chars, int locationId, int properties)
          Character data.
 void endElement()
          Output an element end tag.
 void open()
          Output start of document
 void processingInstruction(String target, 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
 
Methods inherited from class net.sf.saxon.event.XMLEmitter
attribute, close, closeStartTag, comment, endDocument, namespace, startDocument, writeCharSequence, writeDeclaration
 
Methods inherited from class net.sf.saxon.event.Emitter
getConfiguration, getOutputProperties, getOutputStream, getPipelineConfiguration, getSystemId, getWriter, setOutputProperties, setOutputStream, setPipelineConfiguration, setStreamResult, setSystemId, setUnparsedEntity, setWriter, usesWriter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLEmitter

public HTMLEmitter()
Constructor

Method Detail

open

public void open()
          throws XPathException
Output start of document

Specified by:
open in interface Receiver
Overrides:
open in class XMLEmitter
Throws:
XPathException

startElement

public void startElement(int nameCode,
                         int typeCode,
                         int locationId,
                         int properties)
                  throws XPathException
Output element start tag

Specified by:
startElement in interface Receiver
Overrides:
startElement in class XMLEmitter
Parameters:
nameCode - 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 ReceiverOptions
Throws:
XPathException

startContent

public void startContent()
                  throws XPathException
Description copied from interface: Receiver
Notify the start of the content, that is, the completion of all attributes and namespaces. Note that the initial receiver of output from XSLT instructions will not receive this event, it has to detect it itself. Note that this event is reported for every element even if it has no attributes, no namespaces, and no content.

Specified by:
startContent in interface Receiver
Overrides:
startContent in class XMLEmitter
Throws:
XPathException

endElement

public void endElement()
                throws XPathException
Output an element end tag.

Specified by:
endElement in interface Receiver
Overrides:
endElement in class XMLEmitter
Throws:
XPathException

characters

public void characters(CharSequence chars,
                       int locationId,
                       int properties)
                throws XPathException
Character data.

Specified by:
characters in interface Receiver
Overrides:
characters in class XMLEmitter
Parameters:
chars - The characters
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 value. The following bits are defined:
DISABLE_ESCAPING
Disable escaping for this text node
USE_CDATA
Output as a CDATA section
Throws:
XPathException

processingInstruction

public void processingInstruction(String target,
                                  CharSequence data,
                                  int locationId,
                                  int properties)
                           throws XPathException
Handle a processing instruction.

Specified by:
processingInstruction in interface Receiver
Overrides:
processingInstruction in class XMLEmitter
Parameters:
target - The PI name. This must be a legal name (it will not be checked).
data - The data portion of the processing instruction
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 - Additional information about the PI. The following bits are defined:
CHECKED
Data is known to be legal (e.g. doesn't contain "?>")
Throws:
XPathException


Copyright (C) Michael H. Kay. All rights reserved.