public class NamespaceOracle extends ContentProxy
NamespaceEmbedder
. startPrefixMapping(String, String)
and
endPrefixMapping(String)
calls in the stream, but they will
be added by this filter.
Modifier and Type | Field and Description |
---|---|
static String |
ns_prefix_xml |
static String |
ns_uri_xml |
protected Stack<Integer> |
prefixLevels
DOC el1 el2
0 1 2
|
protected String |
prefixPrefix |
protected List<String> |
uris |
protected boolean |
useEmptyPrefix |
out
Constructor and Description |
---|
NamespaceOracle(ContentHandler out) |
NamespaceOracle(ContentHandler out,
boolean useEmptyPrefix) |
NamespaceOracle(ContentHandler out,
boolean useEmptyPrefix,
Collection<String> initialUris) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkUri(String uri) |
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) |
characters, endDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument
public static final String ns_uri_xml
public static final String ns_prefix_xml
protected final boolean useEmptyPrefix
protected String prefixPrefix
public NamespaceOracle(ContentHandler out)
public NamespaceOracle(ContentHandler out, boolean useEmptyPrefix)
public NamespaceOracle(ContentHandler out, boolean useEmptyPrefix, Collection<String> initialUris)
protected String makePrefix(int i)
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class ContentProxy
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class ContentProxy
SAXException
protected void checkUri(String uri)
public void startPrefixMapping(String prefix, String uri)
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class ContentProxy
public void endPrefixMapping(String prefix)
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class ContentProxy
see also the complete user documentation .