|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.joost.emitter.StxEmitterBase
net.sf.joost.emitter.StreamEmitter
net.sf.joost.emitter.HtmlEmitter
This class implements an emitter for html code.
| Field Summary | |
private static HashSet |
emptyHTMLElements
Empty HTML 4.01 elements according to http://www.w3.org/TR/1999/REC-html401-19991224/index/elements.html |
private boolean |
insideCDATA
|
private boolean |
propOmitXmlDeclaration
output property: omit-xml-declaration |
| Fields inherited from class net.sf.joost.emitter.StreamEmitter |
charsetEncoder, encoding, writer |
| Fields inherited from class net.sf.joost.emitter.StxEmitterBase |
|
| Fields inherited from interface net.sf.joost.Constants |
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
| Constructor Summary | |
HtmlEmitter(Writer writer,
String encoding)
Constructor |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
SAX2-Callback - Constructs characters. |
void |
comment(char[] ch,
int start,
int length)
SAX2-Callback - Outputs a comment |
void |
endCDATA()
Does nothing |
void |
endDocument()
SAX2-Callback - Closing OutputStream. |
void |
endElement(String uri,
String lName,
String qName)
SAX2-Callback - Outputs the element-tag. |
void |
setOmitXmlDeclaration(boolean flag)
Defines whether the XML declaration should be omitted, default is false. |
void |
startCDATA()
CDATA sections act as "disable-otput-escaping" replacement in HTML (which is of course a kind of a "hack" ...) |
void |
startDocument()
SAX2-Callback - Outputs XML-Deklaration with encoding. |
void |
startElement(String uri,
String lName,
String qName,
Attributes attrs)
SAX2-Callback |
| Methods inherited from class net.sf.joost.emitter.StreamEmitter |
endDTD, endEntity, endPrefixMapping, ignorableWhitespace, newEmitter, newEmitter, newEmitter, newXMLEmitter, processingInstruction, setDocumentLocator, skippedEntity, startDTD, startEntity, startPrefixMapping |
| Methods inherited from class net.sf.joost.emitter.StxEmitterBase |
getSystemId, setSystemId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean propOmitXmlDeclaration
private boolean insideCDATA
private static final HashSet emptyHTMLElements
| Constructor Detail |
public HtmlEmitter(Writer writer,
String encoding)
| Method Detail |
public void setOmitXmlDeclaration(boolean flag)
false.
setOmitXmlDeclaration in class StreamEmitterflag - true: the XML declaration will be omitted;
false: the XML declaration will be output
public void startDocument()
throws SAXException
SAXException
public void endDocument()
throws SAXException
SAXException
public void startElement(String uri,
String lName,
String qName,
Attributes attrs)
throws SAXException
SAXException
public void endElement(String uri,
String lName,
String qName)
throws SAXException
SAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
SAXException
public void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlercomment in class StreamEmitterSAXException
public void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerstartCDATA in class StreamEmitterSAXException
public void endCDATA()
throws SAXException
StreamEmitter
endCDATA in interface LexicalHandlerendCDATA in class StreamEmitterSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||