com.simonstl.fragment
Class RulesLoader
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.simonstl.fragment.RulesLoader
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class RulesLoader
- extends org.xml.sax.helpers.DefaultHandler
This class loads the information stored in a rules document for use in fragment
filtering. It's based on Ethan Cerami's Xerces Quickstart, available at:
http://ecerami.com/xerces/
Future versions will remove the explicit reliance on the Xerces parser.
Version 0.05 added support for the chars element
and the before and after attributes,
and modified how support for the skip element
worked. Elements with empty nsURI and localName attributes
are now treated as chars elements, not
skip elements.
Version 0.04 added support for the pattern attribute, replacing matchPattern,
and added support for the split attribute
of the fragmentRule element.
Version 0.03 added support for the skipFirst and repeat attributes
of the fragmentRule element.
Version 0.02 added support for the skip element, which permits rules to skip portions
of a match. (By default the first match is skipped.)
- Version:
- 0.05 29 June 2001
- Author:
- Simon St.Laurent
|
Constructor Summary |
RulesLoader(java.lang.String xmlFile)
|
|
Method Summary |
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String qName)
|
static void |
main(java.lang.String[] args)
|
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.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rules
public FragmentRules rules
appliesTo
protected static java.util.ArrayList appliesTo
RulesLoader
public RulesLoader(java.lang.String xmlFile)
startElement
public void startElement(java.lang.String uri,
java.lang.String local,
java.lang.String qName,
org.xml.sax.Attributes atts)
- Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(java.lang.String uri,
java.lang.String local,
java.lang.String qName)
- Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
main
public static void main(java.lang.String[] args)