|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.xml.AbstractXMLProducer org.apache.cocoon.xml.DocumentHandlerAdapter
public class DocumentHandlerAdapter
This class is an utility class "adapting" a SAX version 1.0
DocumentHandler
, to SAX version 2 ContentHandler
.
This class fully supports XML namespaces, converting xmlns
and
xmlns:...
element attributes into appropriate
startPrefixMapping(...)
and endPrefixMapping(...)
calls.
Field Summary |
---|
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Constructor Summary | |
---|---|
DocumentHandlerAdapter()
Create a new DocumentHandlerAdapter instance. |
|
DocumentHandlerAdapter(ContentHandler content)
Create a new DocumentHandlerAdapter instance. |
|
DocumentHandlerAdapter(XMLConsumer consumer)
Create a new DocumentHandlerAdapter instance. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int len)
Receive notification of character data. |
void |
endDocument()
Receive notification of the end of a document. |
void |
endElement(String name)
Receive notification of the end of an element. |
void |
ignorableWhitespace(char[] ch,
int start,
int len)
Receive notification of ignorable whitespace in element content. |
void |
processingInstruction(String target,
String data)
Receive notification of a processing instruction. |
void |
setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events. |
void |
startDocument()
Receive notification of the beginning of a document. |
void |
startElement(String name,
AttributeList a)
Receive notification of the beginning of an element. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
recycle, setConsumer, setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentHandlerAdapter()
DocumentHandlerAdapter
instance.
public DocumentHandlerAdapter(XMLConsumer consumer)
DocumentHandlerAdapter
instance.
public DocumentHandlerAdapter(ContentHandler content)
DocumentHandlerAdapter
instance.
Method Detail |
---|
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface DocumentHandler
public void startDocument() throws SAXException
startDocument
in interface DocumentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface DocumentHandler
SAXException
public void startElement(String name, AttributeList a) throws SAXException
startElement
in interface DocumentHandler
SAXException
public void endElement(String name) throws SAXException
endElement
in interface DocumentHandler
SAXException
public void characters(char[] ch, int start, int len) throws SAXException
characters
in interface DocumentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int len) throws SAXException
ignorableWhitespace
in interface DocumentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface DocumentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |