public class MergedNsContext extends BaseNsContext
NamespaceContext implementation used when constructing
event and namespace information explicitly via
XMLEventFactory,
not by a stream reader.
TODO:
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<javax.xml.stream.events.Namespace> |
mNamespaces
List of
Namespace instances. |
(package private) java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> |
mNsByPrefix |
(package private) java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> |
mNsByURI |
(package private) javax.xml.namespace.NamespaceContext |
mParentCtxt |
UNDECLARED_NS_URI| Modifier | Constructor and Description |
|---|---|
protected |
MergedNsContext(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List<javax.xml.stream.events.Namespace> localNs) |
| Modifier and Type | Method and Description |
|---|---|
private java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> |
buildByNsURIMap() |
private java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> |
buildByPrefixMap() |
static BaseNsContext |
construct(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List<javax.xml.stream.events.Namespace> localNs) |
java.lang.String |
doGetNamespaceURI(java.lang.String prefix) |
java.lang.String |
doGetPrefix(java.lang.String nsURI) |
java.util.Iterator<java.lang.String> |
doGetPrefixes(java.lang.String nsURI) |
java.util.Iterator<javax.xml.stream.events.Namespace> |
getNamespaces()
Method that returns information about namespace definition declared
in this scope; not including ones declared in outer scopes.
|
void |
outputNamespaceDeclarations(java.io.Writer w)
Method called by the matching start element class to
output all namespace declarations active in current namespace
scope, if any.
|
void |
outputNamespaceDeclarations(javax.xml.stream.XMLStreamWriter w)
Method called by the matching start element class to
output all namespace declarations active in current namespace
scope, if any.
|
getNamespaceURI, getPrefix, getPrefixesfinal javax.xml.namespace.NamespaceContext mParentCtxt
final java.util.List<javax.xml.stream.events.Namespace> mNamespaces
Namespace instances.java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> mNsByPrefix
java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> mNsByURI
protected MergedNsContext(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List<javax.xml.stream.events.Namespace> localNs)
public static BaseNsContext construct(javax.xml.namespace.NamespaceContext parentCtxt, java.util.List<javax.xml.stream.events.Namespace> localNs)
public java.lang.String doGetNamespaceURI(java.lang.String prefix)
doGetNamespaceURI in class BaseNsContextpublic java.lang.String doGetPrefix(java.lang.String nsURI)
doGetPrefix in class BaseNsContextpublic java.util.Iterator<java.lang.String> doGetPrefixes(java.lang.String nsURI)
doGetPrefixes in class BaseNsContextpublic java.util.Iterator<javax.xml.stream.events.Namespace> getNamespaces()
getNamespaces in class BaseNsContextpublic void outputNamespaceDeclarations(java.io.Writer w)
throws java.io.IOException
BaseNsContextoutputNamespaceDeclarations in class BaseNsContextjava.io.IOExceptionpublic void outputNamespaceDeclarations(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
outputNamespaceDeclarations in class BaseNsContextjavax.xml.stream.XMLStreamExceptionprivate java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> buildByPrefixMap()
private java.util.Map<java.lang.String,javax.xml.stream.events.Namespace> buildByNsURIMap()