Package org.apache.cocoon.xml.sax
Class EmbeddedSAXPipe
- java.lang.Object
-
- org.apache.cocoon.xml.sax.AbstractSAXProducer
-
- org.apache.cocoon.xml.sax.AbstractSAXPipe
-
- org.apache.cocoon.xml.sax.EmbeddedSAXPipe
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.ext.LexicalHandler
public class EmbeddedSAXPipe extends AbstractSAXPipe
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.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedSAXPipe(org.xml.sax.ContentHandler handler)Creates an EmbeddedXMLPipe that writes into the given ContentHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomment(char[] ch, int start, int len)Ignore allcommentevents if between startDTD/endDTD events.voidendDocument()Ignore theendDocumentevent: this method does nothing.voidendDTD()Ignore theendDTDevent: this method does nothing.voidstartDocument()Ignore thestartDocumentevent: this method does nothing.voidstartDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)Ignore thestartDTDevent: this method does nothing.-
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXPipe
characters, endCDATA, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startElement, startEntity, startPrefixMapping
-
Methods inherited from class org.apache.cocoon.xml.sax.AbstractSAXProducer
recycle, setContentHandler
-
-
-
-
Method Detail
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionIgnore thestartDocumentevent: this method does nothing.- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classAbstractSAXPipe- Throws:
org.xml.sax.SAXException- if an error occurs
-
endDocument
public void endDocument() throws org.xml.sax.SAXExceptionIgnore theendDocumentevent: this method does nothing.- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
endDocumentin classAbstractSAXPipe- Throws:
org.xml.sax.SAXException- if an error occurs
-
startDTD
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXExceptionIgnore thestartDTDevent: this method does nothing.- Specified by:
startDTDin interfaceorg.xml.sax.ext.LexicalHandler- Overrides:
startDTDin classAbstractSAXPipe- Parameters:
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.- Throws:
org.xml.sax.SAXException- if an error occurs
-
endDTD
public void endDTD() throws org.xml.sax.SAXExceptionIgnore theendDTDevent: this method does nothing.- Specified by:
endDTDin interfaceorg.xml.sax.ext.LexicalHandler- Overrides:
endDTDin classAbstractSAXPipe- Throws:
org.xml.sax.SAXException- if an error occurs
-
comment
public void comment(char[] ch, int start, int len) throws org.xml.sax.SAXExceptionIgnore allcommentevents if between startDTD/endDTD events.- Specified by:
commentin interfaceorg.xml.sax.ext.LexicalHandler- Overrides:
commentin classAbstractSAXPipe- Parameters:
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.- Throws:
org.xml.sax.SAXException- if an error occurs
-
-