textbender.g.xml.sax.helpers
Class XMLFilterImplX

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by XMLFilterImplX
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler, XMLFilter, XMLReader, XMLFilterCH

public class XMLFilterImplX
extends XMLFilterImpl
implements XMLFilterCH, LexicalHandler

XMLFilterImpl extension. Adds a passthrough field as a convenience for passing events to underlying handlers.

Also adds support for lexical events. It follows the same pattern as for content events. In the base implementation (this class) events are passed unfiltered to the underlying content handler (which is assumed to be a LexicalHandler). Subclasses may modify this behaviour, to do the actual filtering.


Field Summary
protected  ContentHandlerL passthrough
          Passes events through to the XMLFilterImpl implementation, which passes them to the attached handler, unmodified.
 
Constructor Summary
XMLFilterImplX()
           
 
Method Summary
 void comment(char[] ch, int start, int length)
           
 void endCDATA()
           
 void endDTD()
           
 void endEntity(String name)
           
 void startCDATA()
           
 void startDTD(String name, String publicId, String systemId)
           
 void startEntity(String name)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.XMLFilter
getParent, setParent
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 

Field Detail

passthrough

protected final ContentHandlerL passthrough
Passes events through to the XMLFilterImpl implementation, which passes them to the attached handler, unmodified. This is the same for an XMLFilterImpl subclass as invoking super.event(), but it will work for sub-subclasses too, and sub-sub-subclasses, and so on. [And so will super.event(), so this is pointless. FIX.]

Constructor Detail

XMLFilterImplX

public XMLFilterImplX()
Method Detail

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
Specified by:
comment in interface LexicalHandler
Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
Specified by:
endCDATA in interface LexicalHandler
Throws:
SAXException

endDTD

public void endDTD()
            throws SAXException
Specified by:
endDTD in interface LexicalHandler
Throws:
SAXException

endEntity

public void endEntity(String name)
               throws SAXException
Specified by:
endEntity in interface LexicalHandler
Throws:
SAXException

startCDATA

public void startCDATA()
                throws SAXException
Specified by:
startCDATA in interface LexicalHandler
Throws:
SAXException

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
Specified by:
startDTD in interface LexicalHandler
Throws:
SAXException

startEntity

public void startEntity(String name)
                 throws SAXException
Specified by:
startEntity in interface LexicalHandler
Throws:
SAXException