com.simonstl.gorille
Class TestCharRules

java.lang.Object
  |
  +--org.xml.sax.helpers.XMLFilterImpl
        |
        +--com.simonstl.gorille.TestCharRules
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 TestCharRules
extends org.xml.sax.helpers.XMLFilterImpl

A test for the XML character rules. See test.xml for a sample of the test file.

Version 0.03 adds support for Chars (characters) testing.

Version 0.02 adds support for Pubid (PUBLIC identifier) testing.

Version:
0.02 3 January 2002
Author:
Simon St.Laurent

Constructor Summary
TestCharRules()
          An empty constructor that requires the use of setParent before starting I don't think this works.
TestCharRules(org.xml.sax.XMLReader parent)
          A constructor that takes the parser which will feed it SAX events
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String local, java.lang.String qName)
           
 CharRules getRules()
          in case you ever need to get the rules out of the tester
 void setRules(CharRules newRules)
          sets up the rules, read in from a config file by CharRulesLoader or otherwise concocted in Java using the CharRules class.
 void startElement(java.lang.String uri, java.lang.String local, 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, ignorableWhitespace, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCharRules

public TestCharRules()
An empty constructor that requires the use of setParent before starting I don't think this works.


TestCharRules

public TestCharRules(org.xml.sax.XMLReader parent)
A constructor that takes the parser which will feed it SAX events

Method Detail

setRules

public void setRules(CharRules newRules)
sets up the rules, read in from a config file by CharRulesLoader or otherwise concocted in Java using the CharRules class.

Parameters:
newRules - the set of rules the class will apply to content

getRules

public CharRules getRules()
in case you ever need to get the rules out of the tester


startElement

public void startElement(java.lang.String uri,
                         java.lang.String local,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String local,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.XMLFilterImpl
org.xml.sax.SAXException