|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.exolab.castor.xml.Namespaces
A class for handling Namespace declaration and scoping
Field Summary | |
static java.lang.String |
XML_NAMESPACE
The reserved XML 1.0 Namespace URI |
static java.lang.String |
XML_NAMESPACE_PREFIX
The reserved XML Namespace Prefix |
Constructor Summary | |
Namespaces()
Creates a new Namespaces instance |
|
Namespaces(Namespaces parent)
Creates a new Namespaces instance |
Method Summary | |
void |
addNamespace(java.lang.String prefix,
java.lang.String uri)
Adds the given namespace declaration to this Namespaces |
Namespaces |
createNamespaces()
Creates a new Namespaces instance with this Namespaces as the parent |
void |
declareAsAttributes(org.xml.sax.helpers.AttributeListImpl atts,
boolean localOnly)
Declare the namespaces of this stack in as attributes. |
java.util.Enumeration |
getLocalNamespacePrefixes()
Returns all namespace prefixes declared locally |
java.util.Enumeration |
getLocalNamespaces()
Returns an Enumeration of local namespace URIs for this Namespaces. |
java.lang.String |
getNamespacePrefix(java.lang.String nsURI)
Returns the Namespace prefix associated with the given URI. |
java.lang.String[] |
getNamespacePrefixes(java.lang.String nsURI)
Returns all namespace prefixes associated with the given URI, including those from parent scopes. |
java.lang.String[] |
getNamespacePrefixes(java.lang.String nsURI,
boolean local)
Returns the Namespace prefixes associated with the given URI. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the Namespace URI associated with the given prefix |
java.lang.String |
getNonDefaultNamespacePrefix(java.lang.String nsURI)
Returns the Namespace prefix associated with the given URI. |
Namespaces |
getParent()
Returns the parent Namespaces for this Namespaces instance. |
boolean |
removeNamespace(java.lang.String prefix)
Removes the namespace declaration for the given prefix. |
void |
setParent(Namespaces namespaces)
Sets the parent Namespaces for this Namespaces instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_NAMESPACE_PREFIX
public static final java.lang.String XML_NAMESPACE
Constructor Detail |
public Namespaces()
public Namespaces(Namespaces parent)
Method Detail |
public void addNamespace(java.lang.String prefix, java.lang.String uri)
prefix
- the namespace prefixuri
- the namespace URI to be associated with the given prefixpublic Namespaces createNamespaces()
public java.util.Enumeration getLocalNamespaces()
public java.lang.String getNamespaceURI(java.lang.String prefix)
prefix
- the namespace prefix to lookup
public java.lang.String getNamespacePrefix(java.lang.String nsURI)
#getNamespacePrefixes
.
nsURI
- the namespace URI to lookup
public java.util.Enumeration getLocalNamespacePrefixes()
public java.lang.String[] getNamespacePrefixes(java.lang.String nsURI)
nsURI
- the namespace URI to lookup
public java.lang.String[] getNamespacePrefixes(java.lang.String nsURI, boolean local)
nsURI
- the namespace URI to lookuplocal
- a boolean that when true indicates only the local
scope is searched.
public java.lang.String getNonDefaultNamespacePrefix(java.lang.String nsURI)
nsURI
- the namespace URI to lookup
public Namespaces getParent()
public boolean removeNamespace(java.lang.String prefix)
prefix
- the namespace prefix to remove the binding of
public void setParent(Namespaces namespaces)
namespaces
- the parent Namespacespublic void declareAsAttributes(org.xml.sax.helpers.AttributeListImpl atts, boolean localOnly)
atts
- the Attribute List to fill in.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |