Package eu.bandm.tools.util.xml
Class NamespaceOracle
java.lang.Object
eu.bandm.tools.util.xml.ContentProxy
eu.bandm.tools.util.xml.NamespaceOracle
- All Implemented Interfaces:
ContentHandler
Invents new prefices for new NSUris and inserts the prefix mapping events.
ASSUME output is piped into a
The SAX event stream reaching this api must adhere to the following criteria
NamespaceEmbedder. The SAX event stream reaching this api must adhere to the following criteria
- All names are by "uri" and "localname", --- the "qname" field is ignored.
- There are no
startPrefixMapping(String, String)andendPrefixMapping(String)calls in the stream, but they will be added by this filter.
-
Field Summary
FieldsFields inherited from class eu.bandm.tools.util.xml.ContentProxy
out -
Constructor Summary
ConstructorsConstructorDescriptionNamespaceOracle(ContentHandler out, boolean useEmptyPrefix) NamespaceOracle(ContentHandler out, boolean useEmptyPrefix, Collection<String> initialUris) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidendElement(String uri, String localName, String qName) voidendPrefixMapping(String prefix) protected StringmakePrefix(int i) voidstartElement(String uri, String localName, String qName, Attributes attrs) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class eu.bandm.tools.util.xml.ContentProxy
characters, endDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocumentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
useEmptyPrefix
protected final boolean useEmptyPrefix -
uris
-
prefixLevels
DOC el1 el2 0 1 2 -
prefixPrefix
-
-
Constructor Details
-
NamespaceOracle
-
NamespaceOracle
-
NamespaceOracle
-
-
Method Details
-
makePrefix
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classContentProxy- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classContentProxy- Throws:
SAXException
-
checkUri
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classContentProxy
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classContentProxy
-