public abstract class AbstractEnhancementHandler extends AbstractLogEnabled implements ContentHandler, LexicalHandler
Modifier and Type | Field and Description |
---|---|
protected ContentHandler |
_contentHandler
The content handler where to write
|
protected boolean |
_inUnmodifiableContent
True if the current HTML should not be modified
Use to prevent to apply transformation on sax events (eg: HTML expert)
|
protected LexicalHandler |
_lexicalHandler
The lexical handler where to write
|
static String |
PROCESSING_INSTRUCTION_UNMODIFIABLE
Processing instruction for unmodifiable content
|
Constructor and Description |
---|
AbstractEnhancementHandler() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] ch,
int start,
int length) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(String uri,
String localName,
String qName) |
void |
endEntity(String name) |
void |
endPrefixMapping(String prefix) |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
processingInstruction(String target,
String data) |
protected void |
saxError(I18nizableText title,
I18nizableText message,
String absoluteIconPath)
SAX an error message in content.
|
void |
setContentHandler(ContentHandler contentHandler)
Set the target content handler
|
void |
setDocumentLocator(Locator locator) |
void |
setLexicalHandler(LexicalHandler lexicalHandler)
Set the target lexical handler
|
void |
skippedEntity(String name) |
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(String name,
String publicId,
String systemId) |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startEntity(String name) |
void |
startPrefixMapping(String prefix,
String uri) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String PROCESSING_INSTRUCTION_UNMODIFIABLE
protected ContentHandler _contentHandler
protected LexicalHandler _lexicalHandler
protected boolean _inUnmodifiableContent
public AbstractEnhancementHandler()
public void setContentHandler(ContentHandler contentHandler)
contentHandler
- the target content handlerpublic void setLexicalHandler(LexicalHandler lexicalHandler)
lexicalHandler
- the target lexical handlerprotected void saxError(I18nizableText title, I18nizableText message, String absoluteIconPath) throws SAXException
title
- the error title. Can be null.message
- the error message. Can be null.absoluteIconPath
- the absolute path of the icon. Can be null.SAXException
- if an error occurred while SAXingpublic void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startEntity(String name) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String name) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException