public final class CompactNsContext extends BaseNsContext
Note about implementation: Location information is only needed (and only needs to passed) if access is made via extended interface; one that can return information about actual Namespace event objects.
UNDECLARED_NS_URI
Constructor and Description |
---|
CompactNsContext(Location loc,
String[] namespaces,
int nsLen,
int firstLocal) |
Modifier and Type | Method and Description |
---|---|
String |
doGetNamespaceURI(String prefix) |
String |
doGetPrefix(String nsURI) |
Iterator<String> |
doGetPrefixes(String nsURI) |
Iterator<Namespace> |
getNamespaces() |
void |
outputNamespaceDeclarations(Writer w)
Method called by
CompactStartElement
to output all 'local' namespace declarations active in current
namespace scope, if any. |
void |
outputNamespaceDeclarations(XMLStreamWriter w) |
getNamespaceURI, getPrefix, getPrefixes
public String doGetNamespaceURI(String prefix)
doGetNamespaceURI
in class BaseNsContext
prefix
- Non-null, non-empty prefix (base-class verifies these
constraints) to find namespace URI for.public String doGetPrefix(String nsURI)
doGetPrefix
in class BaseNsContext
public Iterator<String> doGetPrefixes(String nsURI)
doGetPrefixes
in class BaseNsContext
public Iterator<Namespace> getNamespaces()
getNamespaces
in class BaseNsContext
public void outputNamespaceDeclarations(Writer w) throws IOException
CompactStartElement
to output all 'local' namespace declarations active in current
namespace scope, if any. Local means that declaration was done in
scope of current element, not in a parent element.outputNamespaceDeclarations
in class BaseNsContext
IOException
public void outputNamespaceDeclarations(XMLStreamWriter w) throws XMLStreamException
outputNamespaceDeclarations
in class BaseNsContext
XMLStreamException
Copyright © 2018 FasterXML. All rights reserved.