|
||||||||||
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.AbstractXMLPipe org.apache.cocoon.xml.EmbeddedXMLPipe
public class EmbeddedXMLPipe
This class implements a ContentHandler for embedding a full SAX event stream into an existing stream of SAX events. An instance of this class will pass unmodified all the SAX events to the linked ContentHandler, but it will ignore the startDocument/endDocument and startDTD/endDTD events, as well as all comment events within the DTD.
Field Summary |
---|
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Constructor Summary | |
---|---|
EmbeddedXMLPipe(ContentHandler handler)
Creates an EmbeddedXMLPipe that writes into the given ContentHandler. |
|
EmbeddedXMLPipe(ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Creates an EmbeddedXMLPipe that writes into the given ContentHandler. |
|
EmbeddedXMLPipe(XMLConsumer consumer)
Creates an EmbeddedXMLPipe that writes into the given XMLConsumer. |
Method Summary | |
---|---|
void |
comment(char[] ch,
int start,
int len)
Ignore all comment events if between
startDTD/endDTD events. |
void |
endDocument()
Ignore the endDocument event: this method does nothing. |
void |
endDTD()
Ignore the endDTD event: this method does nothing. |
void |
startDocument()
Ignore the startDocument event: this method does nothing. |
void |
startDTD(String name,
String publicId,
String systemId)
Ignore the startDTD event: this method does nothing. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
---|
characters, endCDATA, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startElement, startEntity, startPrefixMapping |
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 |
Methods inherited from interface org.apache.cocoon.xml.XMLProducer |
---|
setConsumer |
Constructor Detail |
---|
public EmbeddedXMLPipe(XMLConsumer consumer)
public EmbeddedXMLPipe(ContentHandler handler)
public EmbeddedXMLPipe(ContentHandler contentHandler, LexicalHandler lexicalHandler)
Method Detail |
---|
public void startDocument() throws SAXException
startDocument
event: this method does nothing.
startDocument
in interface ContentHandler
startDocument
in class AbstractXMLPipe
SAXException
- if an error occurspublic void endDocument() throws SAXException
endDocument
event: this method does nothing.
endDocument
in interface ContentHandler
endDocument
in class AbstractXMLPipe
SAXException
- if an error occurspublic void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
event: this method does nothing.
startDTD
in interface LexicalHandler
startDTD
in class AbstractXMLPipe
name
- The document type name.publicId
- The declared public identifier for the external DTD
subset, or null if none was declared.systemId
- The declared system identifier for the external DTD
subset, or null if none was declared.
SAXException
- if an error occurspublic void endDTD() throws SAXException
endDTD
event: this method does nothing.
endDTD
in interface LexicalHandler
endDTD
in class AbstractXMLPipe
SAXException
- if an error occurspublic void comment(char[] ch, int start, int len) throws SAXException
comment
events if between
startDTD/endDTD events.
comment
in interface LexicalHandler
comment
in class AbstractXMLPipe
ch
- An array holding the characters in the comment.start
- The starting position in the array.len
- The number of characters to use from the array.
SAXException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |