com.sun.xml.messaging.saaj.util
Class RejectDoctypeSaxFilter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by com.sun.xml.messaging.saaj.util.RejectDoctypeSaxFilter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

public class RejectDoctypeSaxFilter
extends org.xml.sax.helpers.XMLFilterImpl
implements org.xml.sax.XMLReader, org.xml.sax.ext.LexicalHandler

Users of this class see a SAX2 XMLReader (via XMLFilterImpl). This class creates a parent XMLReader via JAXP and installs itself as a SAX2 extension LexicalHandler which rejects document type declarations because they are not legal in SOAP. If the user of this class sets a LexicalHandler, then it forwards events to that handler.


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
RejectDoctypeSaxFilter(javax.xml.parsers.SAXParser saxParser)
           
 
Method Summary
 void comment(char[] ch, int start, int length)
           
 void endCDATA()
           
 void endDTD()
           
 void endEntity(java.lang.String name)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 void startCDATA()
           
 void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 void startEntity(java.lang.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, skippedEntity, startDocument, 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.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, parse, parse, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setFeature
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

RejectDoctypeSaxFilter

public RejectDoctypeSaxFilter(javax.xml.parsers.SAXParser saxParser)
                       throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException
Method Detail

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Specified by:
setProperty in interface org.xml.sax.XMLReader
Overrides:
setProperty in class org.xml.sax.helpers.XMLFilterImpl
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startEntity

public void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endEntity

public void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException

comment

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

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
Throws:
org.xml.sax.SAXException