Package eu.bandm.tools.util2
Class NamespaceOracle
java.lang.Object
eu.bandm.tools.util.ContentProxy
eu.bandm.tools.util2.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
Fields inherited from class eu.bandm.tools.util.ContentProxy
out
-
Constructor Summary
ConstructorDescriptionNamespaceOracle
(ContentHandler out, boolean useEmptyPrefix) NamespaceOracle
(ContentHandler out, boolean useEmptyPrefix, Collection<String> initialUris) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
endElement
(String uri, String localName, String qName) void
endPrefixMapping
(String prefix) protected String
makePrefix
(int i) void
startElement
(String uri, String localName, String qName, Attributes attrs) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class eu.bandm.tools.util.ContentProxy
characters, endDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classContentProxy
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classContentProxy
- Throws:
SAXException
-
checkUri
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classContentProxy
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classContentProxy
-