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, getPrefixespublic String doGetNamespaceURI(String prefix)
doGetNamespaceURI in class BaseNsContextprefix - Non-null, non-empty prefix (base-class verifies these
constraints) to find namespace URI for.public String doGetPrefix(String nsURI)
doGetPrefix in class BaseNsContextpublic Iterator<String> doGetPrefixes(String nsURI)
doGetPrefixes in class BaseNsContextpublic Iterator<Namespace> getNamespaces()
getNamespaces in class BaseNsContextpublic 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 BaseNsContextIOExceptionpublic void outputNamespaceDeclarations(XMLStreamWriter w) throws XMLStreamException
outputNamespaceDeclarations in class BaseNsContextXMLStreamExceptionCopyright © 2024 FasterXML. All rights reserved.