org.iso_relax.verifier.impl

Class VerifierFilterImpl

Implemented Interfaces:
VerifierFilter, XMLFilter

public class VerifierFilterImpl
extends XMLFilterImpl
implements VerifierFilter

plain vanilla VerifierFilter implementation.

A verifier implementation can use this class to support VerifierFilter functionality.

To use this class, implement the Verifier.getVerifierFilter() method as follows:

 public VerifierFilter getVerifierFilter() throws SAXException {
   return new VerifierFilterImpl(getVerifierHandler());
 }
 

Also, usually you may want to override setErrorHandler method so that your VerifierHandler will send errors to that handler.

Version:
$Id: VerifierFilterImpl.java,v 1.5 2003/05/30 23:46:33 kkawa Exp $
Author:
Kohsuke KAWAGUCHI

Constructor Summary

VerifierFilterImpl(Verifier _verifier)

Method Summary

void
characters(ch[] , int start, int length)
void
endDocument()
void
endElement(String uri, String localName, String qName)
void
endPrefixMapping(String prefix)
void
ignorableWhitespace(ch[] , int start, int length)
boolean
isValid()
checks if the document was valid.
void
processingInstruction(String target, String data)
void
setDocumentLocator(Locator locator)
void
setEntityResolver(EntityResolver resolver)
void
setErrorHandler(ErrorHandler handler)
void
skippedEntity(String name)
void
startDocument()
void
startElement(String uri, String localName, String qName, Attributes attributes)
void
startPrefixMapping(String prefix, String uri)

Constructor Details

VerifierFilterImpl

public VerifierFilterImpl(Verifier _verifier)
            throws SAXException

Method Details

characters

public void characters(ch[] ,
                       int start,
                       int length)
            throws SAXException

endDocument

public void endDocument()
            throws SAXException

endElement

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

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException

ignorableWhitespace

public void ignorableWhitespace(ch[] ,
                                int start,
                                int length)
            throws SAXException

isValid

public boolean isValid()
checks if the document was valid.

This method can be only called after this handler receives the endDocument event.

Specified by:
isValid in interface VerifierFilter
Returns:
true if the document was valid, false if not.

processingInstruction

public void processingInstruction(String target,
                                  String data)
            throws SAXException

setDocumentLocator

public void setDocumentLocator(Locator locator)

setEntityResolver

public void setEntityResolver(EntityResolver resolver)

setErrorHandler

public void setErrorHandler(ErrorHandler handler)

skippedEntity

public void skippedEntity(String name)
            throws SAXException

startDocument

public void startDocument()
            throws SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
            throws SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException