|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.helpers.XMLFilterImpl | +--com.simonstl.namespace.elements.ElementAnnotNamespaceFilter
A filter which adds context namespace information to unqualified elements according to a set of inclusion or exclusion rules. If no rules are set, all namespaces are annotated.
Context will be indicated in the form of an attribute:
<unqual an:lastNSContext="http://www.example.com xmlns:anlc="http://simonstl.com/ns/namespaces/elements/lastContext/">
Constructor Summary | |
ElementAnnotNamespaceFilter()
An empty constructor that requires the use of setParent before starting I don't think this works. |
|
ElementAnnotNamespaceFilter(org.xml.sax.XMLReader parent)
A constructor that takes the parser which will feed it SAX events |
Method Summary | |
org.xml.sax.Attributes |
addAtt(org.xml.sax.Attributes atts)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
NamespaceRules |
getRules()
in case you ever need to get the rules out of NamespaceFilter |
void |
setRules(NamespaceRules newRules)
sets up the rules, read in from a config file by RulesLoader or otherwise concocted in Java using the NamespaceRules class. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Check at startElement for names which should be qualified. |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
characters, 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 |
public ElementAnnotNamespaceFilter()
public ElementAnnotNamespaceFilter(org.xml.sax.XMLReader parent)
Method Detail |
public void setRules(NamespaceRules newRules)
NamespaceRules
class.newRules
- the set of rules the NamespaceFilter will apply to contentpublic NamespaceRules getRules()
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in class org.xml.sax.helpers.XMLFilterImpl
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in class org.xml.sax.helpers.XMLFilterImpl
public org.xml.sax.Attributes addAtt(org.xml.sax.Attributes atts)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |