public class NamespaceEmbedder extends ContentProxy
startPrefixMapping(String, String) and
endPrefixMapping(String) calls are properly nested, ...
| Modifier and Type | Class and Description |
|---|---|
protected class |
NamespaceEmbedder.Pref |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
newPrefices |
protected Map<String,String> |
prefix2uri
all currently mapped prefices, INPUT side.
|
protected Map<String,NamespaceEmbedder.Pref> |
uri2prefix
all currently mapped uris, INPUT side.
|
out| Constructor and Description |
|---|
NamespaceEmbedder(ContentHandler out) |
| Modifier and Type | Method and Description |
|---|---|
void |
endElement(String uri,
String localName,
String qName) |
void |
endPrefixMapping(String prefix) |
protected void |
error(String text) |
protected void |
homonymError(String prefix,
String olduri,
String newuri) |
protected String |
makeQname(String uri,
String localname,
boolean isAttribute,
boolean isClose) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attrs) |
void |
startPrefixMapping(String prefix,
String uri)
Establishes explicitly a relation from an uri to a (currently unused!)
prefix.
|
characters, endDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocumentprotected Map<String,NamespaceEmbedder.Pref> uri2prefix
public NamespaceEmbedder(ContentHandler out)
protected void error(String text)
protected String makeQname(String uri, String localname, boolean isAttribute, boolean isClose)
public void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class ContentProxySAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class ContentProxySAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
== "" means assignment to the "default namespace" == "" means refering to the non-name-space uri=="" && prefix!="" is an error.startPrefixMapping in interface ContentHandlerstartPrefixMapping in class ContentProxySAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class ContentProxySAXExceptionsee also the complete user documentation .