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(javax.xml.stream.Location loc,
java.lang.String defaultNsURI,
java.lang.String[] namespaces,
int nsLen,
int firstLocal) |
Modifier and Type | Method and Description |
---|---|
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() |
void |
outputNamespaceDeclarations(java.io.Writer w)
Method called by
CompactStartElement
to output all 'local' namespace declarations active in current
namespace scope, if any. |
void |
outputNamespaceDeclarations(javax.xml.stream.XMLStreamWriter w) |
getNamespaceURI, getPrefix, getPrefixes
public CompactNsContext(javax.xml.stream.Location loc, java.lang.String defaultNsURI, java.lang.String[] namespaces, int nsLen, int firstLocal)
public java.lang.String doGetNamespaceURI(java.lang.String prefix)
doGetNamespaceURI
in class BaseNsContext
public java.lang.String doGetPrefix(java.lang.String nsURI)
doGetPrefix
in class BaseNsContext
public java.util.Iterator doGetPrefixes(java.lang.String nsURI)
doGetPrefixes
in class BaseNsContext
public java.util.Iterator getNamespaces()
getNamespaces
in class BaseNsContext
public void outputNamespaceDeclarations(java.io.Writer w) throws java.io.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
java.io.IOException
public void outputNamespaceDeclarations(javax.xml.stream.XMLStreamWriter w) throws javax.xml.stream.XMLStreamException
outputNamespaceDeclarations
in class BaseNsContext
javax.xml.stream.XMLStreamException