org.weborganic.schematron
Class SVRLHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.weborganic.schematron.SVRLHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public final class SVRLHandler
extends DefaultHandler

A simple handler which parses the SRVL result and stores TEXT_ELT is not just under FAILED_ASSERT_ELT and SUCCESSFUL_REPORT_ELT.

in schematron will also be copied to SVRL as TEXT_ELT


Constructor Summary
SVRLHandler()
          Constructor for SVRLHandler.
SVRLHandler(List<String> failedAssertions, List<String> successfulReports)
          Constructor for SVRLHandler that require reference of failedAssertions and successfulReports.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String namespaceURL, String localName, String rawName)
           
 void startElement(String uri, String localName, String rawName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVRLHandler

public SVRLHandler()
Constructor for SVRLHandler.


SVRLHandler

public SVRLHandler(List<String> failedAssertions,
                   List<String> successfulReports)
Constructor for SVRLHandler that require reference of failedAssertions and successfulReports.

Parameters:
failedAssertions - & successfulReports to store validation message result.
Throws:
NullPointerException - if either parameter is null.
Method Detail

startElement

public void startElement(String uri,
                         String localName,
                         String rawName,
                         Attributes attributes)
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler

endElement

public void endElement(String namespaceURL,
                       String localName,
                       String rawName)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler