private static final class DOMUtilities.NSMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private DOMUtilities.NSMap |
next
The next namespace prefix mapping in the list.
|
private int |
nextPrefixNumber
The next number to use when generating prefixes.
|
private java.lang.String |
ns
The namespace name that the prefix maps to.
|
private java.lang.String |
prefix
The prefix to map.
|
Modifier | Constructor and Description |
---|---|
private |
NSMap()
Creates a new
NSMap object. |
Modifier and Type | Method and Description |
---|---|
static DOMUtilities.NSMap |
create()
Constructs a new namespace prefix mapping object with the
XML and XMLNS namespaces predeclared.
|
DOMUtilities.NSMap |
declare(java.lang.String prefix,
java.lang.String ns)
Declares a new prefix mapping by returning a new
NSMap object that links to this one. |
java.lang.String |
getNamespace(java.lang.String prefix)
Returns the namespace URI that the specified prefix
maps to, or
null if the prefix has not
been declared. |
java.lang.String |
getNewPrefix()
Returns a new, generated namespace prefix.
|
java.lang.String |
getPrefixForAttr(java.lang.String ns)
Returns the prefix appropriate for an attribute that maps to
specified namespace URI.
|
java.lang.String |
getPrefixForElement(java.lang.String ns)
Returns the prefix appropriate for an element that maps to specified
namespace URI.
|
private java.lang.String prefix
private java.lang.String ns
private DOMUtilities.NSMap next
private int nextPrefixNumber
"a" + number
is generated when
serializing a node whose namespace URI does not correspond to
a prefix in scope.public static DOMUtilities.NSMap create()
public DOMUtilities.NSMap declare(java.lang.String prefix, java.lang.String ns)
NSMap
object that links to this one.public java.lang.String getNewPrefix()
public java.lang.String getNamespace(java.lang.String prefix)
null
if the prefix has not
been declared.public java.lang.String getPrefixForElement(java.lang.String ns)
null
is returned.public java.lang.String getPrefixForAttr(java.lang.String ns)
null
is returned.