|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xsl.result.SerializerImpl com.novell.xsl.result.XMLSerializer com.novell.xsl.result.HTMLSerializer
Class to implement "html" output method of xsl:output element
Field Summary |
Fields inherited from class com.novell.xsl.result.XMLSerializer |
attributeNames, attributeValues, cdataOutput, children, currentNamespaces, elementCount, elementName, forceDTD, indentLevel, nodeType, noEscape, startTagOpen, stateStack, XML_SPACE_DEFAULT, XML_SPACE_PRESERVE, xmlSpace, xmlSpaceDefault, xmlSpacePreserve |
Fields inherited from class com.novell.xsl.result.SerializerImpl |
actualEncoding, options, stream, writer |
Constructor Summary | |
HTMLSerializer()
Construct a default HTML serializer |
|
HTMLSerializer(OutputStream stream)
Construct an XML serializer that will output to the passed stream |
Method Summary | |
void |
characters(String data)
Receive notification of character data. |
protected void |
closeStartTag()
Close any open element start tag |
protected void |
doIndent(int level)
Indent up to indent level HTML output method doesn't do tabs |
protected void |
encodeHTML(String value,
String specials,
boolean isAttribute)
encodes the passed string in HTML-format: '<', and '&' are replaced by "<" and "&" except when '&' is followed by '{', and except when '<' appears in an attribute value Any chars in value found in specials String will be replaced by character references In addition, any two-char UTF-16 surrogate chars are replaced by character references |
protected void |
initState()
Initialize the state at the start of a document |
protected void |
outputHTMLAttributes()
Output an HTML element's attribute |
protected void |
popState()
Restore the last element state |
void |
processingInstruction(String target,
String value)
Receive notification of a processing instruction. |
protected void |
pushState()
Save the current element state |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String name,
String namespaceURI)
Receive notification of the beginning of an element. |
protected void |
writeDTD(String name)
Write a DTD declaration. |
protected void |
writeHTMLattribute(String value)
Writes the passed string as an HTML attribute |
protected void |
writeMeta()
Write a META tag indicating content type and charset |
protected void |
writeURIattribute(String value)
Perform recommended URI encoding for HTML 4.0 |
Methods inherited from class com.novell.xsl.result.XMLSerializer |
attribute, comment, endDocument, endElement, getExpandedName, injectWhitespace, namespace, noTextEscaping, outputXMLAttribute, useCdataOutput |
Methods inherited from class com.novell.xsl.result.SerializerImpl |
getOptions, getStream, initWriter, setOptions, setStream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.novell.xsl.result.Serializer |
getOptions, getStream, setOptions, setStream |
Constructor Detail |
public HTMLSerializer()
public HTMLSerializer(OutputStream stream)
Method Detail |
public void startDocument() throws ResultException
startDocument
in interface ResultHandler
startDocument
in class XMLSerializer
ResultException
- if an implementation-dependent error occurspublic void startElement(String name, String namespaceURI) throws IllegalNameException, IllegalNodeException, ResultException
startElement
in interface ResultHandler
startElement
in class XMLSerializer
name
- the element's namenamespaceURI
- the element's namespace uri
IllegalNameException
- if the specified element name is illegal
IllegalNodeException
- if the current node cannot contain elements
ResultException
- if an implementation-dependent error occurspublic void characters(String data) throws IllegalNodeException, ResultException
characters
in interface ResultHandler
characters
in class XMLSerializer
data
- the character data
IllegalNodeException
- if the current node cannot contain character data
ResultException
- if an implementation-dependent error occurspublic void processingInstruction(String target, String value) throws IllegalNameException, IllegalNodeException, ResultException
processingInstruction
in interface ResultHandler
processingInstruction
in class XMLSerializer
target
- the processing instruction's targetvalue
- the processing instruction's value, or null
if there is no value
IllegalNameException
- if the specified target name is illegal
IllegalNodeException
- if the current node cannot contain processing
instructions
ResultException
- if an implementation-dependent error occursprotected void writeDTD(String name) throws IOException
writeDTD
in class XMLSerializer
name
- The name for the DTD
IOException
protected void writeMeta() throws IOException
IOException
protected void closeStartTag() throws IOException, ResultException
closeStartTag
in class XMLSerializer
IOException
ResultException
protected void outputHTMLAttributes() throws IOException
IOException
protected void writeHTMLattribute(String value) throws IOException
value
- The value to write
IOException
protected void encodeHTML(String value, String specials, boolean isAttribute) throws IOException
value
- string to convert to HTML formatspecials
- collection of chars to use char references for
IOException
protected void writeURIattribute(String value) throws IOException
value
- The attribute value
IOException
protected void initState()
initState
in class XMLSerializer
protected void doIndent(int level) throws IOException
doIndent
in class XMLSerializer
level
- Number of tabs to output
IOException
protected void pushState()
pushState
in class XMLSerializer
protected void popState()
popState
in class XMLSerializer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |