public final class NamespaceBinding extends java.lang.Object implements NamespaceBindingSet
| Modifier and Type | Field and Description |
|---|---|
static NamespaceBinding |
DEFAULT_UNDECLARATION |
static NamespaceBinding[] |
EMPTY_ARRAY |
static NamespaceBinding |
XML |
| Constructor and Description |
|---|
NamespaceBinding(java.lang.String prefix,
java.lang.String uri)
Create a binding of a prefix to a URI
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Test if this namespace binding is the same as another
|
java.lang.String |
getPrefix()
Get the prefix part of the binding
|
java.lang.String |
getURI()
Get the URI part of the binding
|
int |
hashCode() |
boolean |
isDefaultUndeclaration()
Ask whether this is an undeclaration of the default prefix, that is, a namespace binding
corresponding to
xmlns="" |
boolean |
isXmlNamespace()
Ask whether this is a binding for the XML namespace
|
java.util.Iterator<NamespaceBinding> |
iterator()
Returns an iterator over this singleton set of namespace bindings.
|
static NamespaceBinding |
makeNamespaceBinding(java.lang.CharSequence prefix,
java.lang.CharSequence uri)
Create a binding of a prefix to a URI.
|
public static final NamespaceBinding XML
public static final NamespaceBinding DEFAULT_UNDECLARATION
public static final NamespaceBinding[] EMPTY_ARRAY
public NamespaceBinding(java.lang.String prefix,
java.lang.String uri)
prefix - the prefix: either an NCName, or a zero-length string to bind the default namespace.
Must not be null.uri - the namespace URI: either a URI, or a zero-length string to unbind the prefix. Must
not be null.public static NamespaceBinding makeNamespaceBinding(java.lang.CharSequence prefix, java.lang.CharSequence uri)
prefix - the prefix: either an NCName, or a zero-length string to bind the default namespace.
Must not be null.uri - the namespace URI: either a URI, or a zero-length string to unbind the prefix. Must
not be null.public java.lang.String getPrefix()
public java.lang.String getURI()
public boolean isXmlNamespace()
public boolean isDefaultUndeclaration()
xmlns=""xmlns=""public java.util.Iterator<NamespaceBinding> iterator()
iterator in interface java.lang.Iterable<NamespaceBinding>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the comparandpublic int hashCode()
hashCode in class java.lang.ObjectCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.