|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgnu.xml.pipeline.EventFilter
gnu.xml.pipeline.WellFormednessFilter
This filter reports fatal exceptions in the case of event streams that are not well formed. The rules currently tested include:
Other checks for event stream correctness may be provided in the future. For example, insisting that entity boundaries nest correctly, namespace scopes nest correctly, namespace values never contain relative URIs, attributes don't have "<" characters; and more.
| Field Summary |
| Fields inherited from class gnu.xml.pipeline.EventFilter |
DECL_HANDLER, FEATURE_URI, LEXICAL_HANDLER, PROPERTY_URI |
| Constructor Summary | |
WellFormednessFilter()
Swallows all events after performing well formedness checks. |
|
WellFormednessFilter(EventConsumer consumer)
Passes events through to the specified consumer, after first processing them. |
|
| Method Summary | |
void |
characters(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
void |
comment(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
void |
endCDATA()
SAX2: passes this callback to the next consumer, if any |
void |
endDocument()
SAX2: passes this callback to the next consumer, if any |
void |
endDTD()
SAX2: passes this callback to the next consumer, if any |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
SAX2: passes this callback to the next consumer, if any |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
SAX2: passes this callback to the next consumer, if any |
void |
notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
SAX1: passes this callback to the next consumer, if any |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
SAX2: passes this callback to the next consumer, if any |
void |
reset()
Resets state as if any preceding event stream was well formed. |
void |
setDocumentLocator(Locator locator)
Throws an exception when called after startDocument. |
void |
startCDATA()
SAX2: passes this callback to the next consumer, if any |
void |
startDocument()
SAX2: passes this callback to the next consumer, if any |
void |
startDTD(java.lang.String root,
java.lang.String publicId,
java.lang.String systemId)
SAX2: passes this callback to the next consumer, if any |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
SAX2: passes this callback to the next consumer, if any |
void |
unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
SAX1: passes this callback to the next consumer, if any |
| Methods inherited from class gnu.xml.pipeline.EventFilter |
attributeDecl, bind, chainTo, elementDecl, endEntity, endPrefixMapping, externalEntityDecl, getContentHandler, getDocumentLocator, getDTDHandler, getErrorHandler, getNext, getProperty, internalEntityDecl, setContentHandler, setDTDHandler, setErrorHandler, setProperty, skippedEntity, startEntity, startPrefixMapping |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WellFormednessFilter()
public WellFormednessFilter(EventConsumer consumer)
| Method Detail |
public void reset()
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class EventFilterlocator - the locator, to be used in error reporting or relative
URI resolution.
java.lang.IllegalStateException - when called after the document
has already been started
public void startDocument()
throws SAXException
EventFilter
startDocument in interface ContentHandlerstartDocument in class EventFilterSAXException
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
Attributes atts)
throws SAXException
EventFilter
startElement in interface ContentHandlerstartElement in class EventFilterSAXException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws SAXException
EventFilter
endElement in interface ContentHandlerendElement in class EventFilterSAXException
public void endDocument()
throws SAXException
EventFilter
endDocument in interface ContentHandlerendDocument in class EventFilterSAXException
public void startDTD(java.lang.String root,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
EventFilter
startDTD in interface LexicalHandlerstartDTD in class EventFilterSAXException
public void notationDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
throws SAXException
EventFilter
notationDecl in interface DTDHandlernotationDecl in class EventFilterSAXException
public void unparsedEntityDecl(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId,
java.lang.String notationName)
throws SAXException
EventFilter
unparsedEntityDecl in interface DTDHandlerunparsedEntityDecl in class EventFilterSAXException
public void endDTD()
throws SAXException
EventFilter
endDTD in interface LexicalHandlerendDTD in class EventFilterSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
EventFilter
characters in interface ContentHandlercharacters in class EventFilterSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
EventFilter
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class EventFilterSAXException
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws SAXException
EventFilter
processingInstruction in interface ContentHandlerprocessingInstruction in class EventFilterSAXException
public void comment(char[] ch,
int start,
int length)
throws SAXException
EventFilter
comment in interface LexicalHandlercomment in class EventFilterSAXException
public void startCDATA()
throws SAXException
EventFilter
startCDATA in interface LexicalHandlerstartCDATA in class EventFilterSAXException
public void endCDATA()
throws SAXException
EventFilter
endCDATA in interface LexicalHandlerendCDATA in class EventFilterSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2008-04-13.