com.ctc.wstx.evt
Class MergedNsContext
java.lang.Object
com.ctc.wstx.util.BaseNsContext
com.ctc.wstx.evt.MergedNsContext
- All Implemented Interfaces:
- javax.xml.namespace.NamespaceContext
public class MergedNsContext
- extends BaseNsContext
Hierarchic NamespaceContext
implementation used when constructing
event and namespace information explicitly via
XMLEventFactory
,
not by a stream reader.
TODO:
- Figure out a way to check for namespace masking; tricky but not
impossible to determine
Constructor Summary |
protected |
MergedNsContext(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List localNs)
|
Method Summary |
static BaseNsContext |
construct(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List localNs)
|
java.lang.String |
doGetNamespaceURI(java.lang.String prefix)
|
java.lang.String |
doGetPrefix(java.lang.String nsURI)
|
java.util.Iterator |
doGetPrefixes(java.lang.String nsURI)
|
java.util.Iterator |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MergedNsContext
protected MergedNsContext(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List localNs)
construct
public static BaseNsContext construct(javax.xml.namespace.NamespaceContext parentCtxt,
java.util.List localNs)
doGetNamespaceURI
public java.lang.String doGetNamespaceURI(java.lang.String prefix)
- Specified by:
doGetNamespaceURI
in class BaseNsContext
doGetPrefix
public java.lang.String doGetPrefix(java.lang.String nsURI)
- Specified by:
doGetPrefix
in class BaseNsContext
doGetPrefixes
public java.util.Iterator doGetPrefixes(java.lang.String nsURI)
- Specified by:
doGetPrefixes
in class BaseNsContext
getNamespaces
public java.util.Iterator getNamespaces()
- Method that returns information about namespace definition declared
in this scope; not including ones declared in outer scopes.
- Specified by:
getNamespaces
in class BaseNsContext
outputNamespaceDeclarations
public void outputNamespaceDeclarations(java.io.Writer w)
throws java.io.IOException
- Description copied from class:
BaseNsContext
- Method called by the matching start element class to
output all namespace declarations active in current namespace
scope, if any.
- Specified by:
outputNamespaceDeclarations
in class BaseNsContext
- Throws:
java.io.IOException
outputNamespaceDeclarations
public void outputNamespaceDeclarations(javax.xml.stream.XMLStreamWriter w)
throws javax.xml.stream.XMLStreamException
- Method called by the matching start element class to
output all namespace declarations active in current namespace
scope, if any.
- Specified by:
outputNamespaceDeclarations
in class BaseNsContext
- Throws:
javax.xml.stream.XMLStreamException