Package relaxngcc.parser

# Class ForeignElementFilter

java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
relaxngcc.parser.ForeignElementFilter

All Implemented Interfaces:
  `ContentHandler`, `DTDHandler`, `EntityResolver`, `ErrorHandler`, `XMLFilter`, `XMLReader`

public class ForeignElementFilter extends XMLFilterImpl
Filters 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(XMLReader parent)`

## Method Summary

Modifier and Type
Method
Description
`void`
`characters(char[] buf, int start, int len)`
`void`
`endElement(String uri, String localName, String qname)`
`void`
`ignorableWhitespace(char[] buf, int start, int len)`
`void`
`startElement(String uri, String localName, String qname, 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`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.xml.sax.ContentHandler

`declaration`

## Constructor Details

### ForeignElementFilter

public ForeignElementFilter(XMLReader parent)

## Method Details

### startElement

public void startElement(String uri, String localName, String qname, Attributes atts) throws SAXException

Specified by:
  `startElement` in interface `ContentHandler`
Overrides:
  `startElement` in class `XMLFilterImpl`
Throws:
  `SAXException`

### endElement

public void endElement(String uri, String localName, String qname) throws SAXException

Specified by:
  `endElement` in interface `ContentHandler`
Overrides:
  `endElement` in class `XMLFilterImpl`
Throws:
  `SAXException`

### characters

public void characters(char[] buf, int start, int len) throws SAXException

Specified by:
  `characters` in interface `ContentHandler`
Overrides:
  `characters` in class `XMLFilterImpl`
Throws:
  `SAXException`

### ignorableWhitespace

public void ignorableWhitespace(char[] buf, int start, int len) throws SAXException

Specified by:
  `ignorableWhitespace` in interface `ContentHandler`
Overrides:
  `ignorableWhitespace` in class `XMLFilterImpl`
Throws:
  `SAXException`