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
HierarchicNamespaceContextimplementation 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 protectedMergedNsContext(NamespaceContext parentCtxt, List<Namespace> localNs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BaseNsContextconstruct(NamespaceContext parentCtxt, List<Namespace> localNs)StringdoGetNamespaceURI(String prefix)StringdoGetPrefix(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.voidoutputNamespaceDeclarations(Writer w)Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.voidoutputNamespaceDeclarations(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:
doGetNamespaceURIin classBaseNsContext
-
doGetPrefix
public String doGetPrefix(String nsURI)
- Specified by:
doGetPrefixin classBaseNsContext
-
doGetPrefixes
public Iterator<String> doGetPrefixes(String nsURI)
- Specified by:
doGetPrefixesin 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:
getNamespacesin classBaseNsContext
-
outputNamespaceDeclarations
public void outputNamespaceDeclarations(Writer w) throws IOException
Description copied from class:BaseNsContextMethod called by the matching start element class to output all namespace declarations active in current namespace scope, if any.- Specified by:
outputNamespaceDeclarationsin 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:
outputNamespaceDeclarationsin classBaseNsContext- Throws:
XMLStreamException
-
-