Package com.ctc.wstx.evt
Class MergedNsContext
- java.lang.Object
-
- com.ctc.wstx.util.BaseNsContext
-
- com.ctc.wstx.evt.MergedNsContext
-
- All Implemented Interfaces:
NamespaceContext
public class MergedNsContext extends BaseNsContext
HierarchicNamespaceContext
implementation used when constructing event and namespace information explicitly viaXMLEventFactory
, not by a stream reader.TODO:
- Figure out a way to check for namespace masking; tricky but not impossible to determine
-
-
Field Summary
-
Fields inherited from class com.ctc.wstx.util.BaseNsContext
UNDECLARED_NS_URI
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MergedNsContext(NamespaceContext parentCtxt, List<Namespace> localNs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BaseNsContext
construct(NamespaceContext parentCtxt, List<Namespace> localNs)
String
doGetNamespaceURI(String prefix)
String
doGetPrefix(String nsURI)
Iterator<String>
doGetPrefixes(String nsURI)
Iterator<Namespace>
getNamespaces()
Method that returns information about namespace definition declared in this scope; not including ones declared in outer scopes.void
outputNamespaceDeclarations(Writer w)
Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.void
outputNamespaceDeclarations(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 com.ctc.wstx.util.BaseNsContext
getNamespaceURI, getPrefix, getPrefixes
-
-
-
-
Constructor Detail
-
MergedNsContext
protected MergedNsContext(NamespaceContext parentCtxt, List<Namespace> localNs)
-
-
Method Detail
-
construct
public static BaseNsContext construct(NamespaceContext parentCtxt, List<Namespace> localNs)
-
doGetNamespaceURI
public String doGetNamespaceURI(String prefix)
- Specified by:
doGetNamespaceURI
in classBaseNsContext
-
doGetPrefix
public String doGetPrefix(String nsURI)
- Specified by:
doGetPrefix
in classBaseNsContext
-
doGetPrefixes
public Iterator<String> doGetPrefixes(String nsURI)
- Specified by:
doGetPrefixes
in classBaseNsContext
-
getNamespaces
public Iterator<Namespace> getNamespaces()
Method that returns information about namespace definition declared in this scope; not including ones declared in outer scopes.- Specified by:
getNamespaces
in classBaseNsContext
-
outputNamespaceDeclarations
public void outputNamespaceDeclarations(Writer w) throws 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 classBaseNsContext
- Throws:
IOException
-
outputNamespaceDeclarations
public void outputNamespaceDeclarations(XMLStreamWriter w) throws 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 classBaseNsContext
- Throws:
XMLStreamException
-
-