Package relaxngcc.parser
Class ForeignElementFilter
- java.lang.Object
-
- org.xml.sax.helpers.XMLFilterImpl
-
- relaxngcc.parser.ForeignElementFilter
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler,org.xml.sax.XMLFilter,org.xml.sax.XMLReader
public class ForeignElementFilter extends org.xml.sax.helpers.XMLFilterImplFilters out those elements which do not belong to neither RELAX NG or RelaxNGCC.We need to have this filter between XMLReader and our parser because our parser is not built to accept foreign elements.
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
-
Constructor Summary
Constructors Constructor Description ForeignElementFilter(org.xml.sax.XMLReader parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] buf, int start, int len)voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qname)voidignorableWhitespace(char[] buf, int start, int len)voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes atts)-
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname) throws org.xml.sax.SAXException- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] buf, int start, int len) throws org.xml.sax.SAXException- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Overrides:
charactersin classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] buf, int start, int len) throws org.xml.sax.SAXException- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.ContentHandler- Overrides:
ignorableWhitespacein classorg.xml.sax.helpers.XMLFilterImpl- Throws:
org.xml.sax.SAXException
-
-