Class DOMUtilities.NSMap
java.lang.Object
org.apache.batik.dom.util.DOMUtilities.NSMap
- Enclosing class:
DOMUtilities
A node in a linked list of prefix to namespace name mappings.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DOMUtilities.NSMapThe next namespace prefix mapping in the list.private intThe next number to use when generating prefixes.private StringThe namespace name that the prefix maps to.private StringThe prefix to map. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DOMUtilities.NSMapcreate()Constructs a new namespace prefix mapping object with the XML and XMLNS namespaces predeclared.Declares a new prefix mapping by returning a newNSMapobject that links to this one.getNamespace(String prefix) Returns the namespace URI that the specified prefix maps to, ornullif the prefix has not been declared.Returns a new, generated namespace prefix.Returns the prefix appropriate for an attribute that maps to specified namespace URI.Returns the prefix appropriate for an element that maps to specified namespace URI.
-
Field Details
-
prefix
The prefix to map. -
ns
The namespace name that the prefix maps to. The empty string is used to represent no namespace. -
next
The next namespace prefix mapping in the list. -
nextPrefixNumber
private int nextPrefixNumberThe next number to use when generating prefixes. A prefix of the form"a" + numberis generated when serializing a node whose namespace URI does not correspond to a prefix in scope.
-
-
Constructor Details
-
NSMap
private NSMap()Creates a newNSMapobject.
-
-
Method Details
-
create
Constructs a new namespace prefix mapping object with the XML and XMLNS namespaces predeclared. -
declare
Declares a new prefix mapping by returning a newNSMapobject that links to this one. -
getNewPrefix
Returns a new, generated namespace prefix. -
getNamespace
-
getPrefixForElement
Returns the prefix appropriate for an element that maps to specified namespace URI. If the specified namespace is the default namespace (i.e., it has an empty string prefix mapping to it), then the empty string is returned. If there is no appropriate prefix,nullis returned. -
getPrefixForAttr
-