|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.xml.Namespaces
public final class Namespaces
A class for handling Namespace declaration and scoping
| Field Summary | |
|---|---|
static String |
XML_NAMESPACE
The reserved XML 1.0 Namespace URI |
static 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(String prefix,
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(AttributeListImpl atts,
boolean localOnly)
Declare the namespaces of this stack in as attributes. |
Enumeration |
getLocalNamespacePrefixes()
Returns all namespace prefixes declared locally |
Enumeration |
getLocalNamespaces()
Returns an Enumeration of local namespace URIs for this Namespaces. |
String |
getNamespacePrefix(String nsURI)
Returns the Namespace prefix associated with the given URI. |
String[] |
getNamespacePrefixes(String nsURI)
Returns all namespace prefixes associated with the given URI, including those from parent scopes. |
String[] |
getNamespacePrefixes(String nsURI,
boolean local)
Returns the Namespace prefixes associated with the given URI. |
String |
getNamespaceURI(String prefix)
Returns the Namespace URI associated with the given prefix |
String |
getNonDefaultNamespacePrefix(String nsURI)
Returns the Namespace prefix associated with the given URI. |
Namespaces |
getParent()
Returns the parent Namespaces for this Namespaces instance. |
boolean |
removeNamespace(String prefix)
Removes the namespace declaration for the given prefix. |
void |
sendEndEvents(ContentHandler handler)
Calls the given ContentHandler's endPrefixMapping method for each locally declared namespace |
void |
sendStartEvents(ContentHandler handler)
Calls the given ContentHandler's startPrefixMapping method for each locally declared namespace |
void |
setParent(Namespaces namespaces)
Sets the parent Namespaces for this Namespaces instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String XML_NAMESPACE_PREFIX
public static final String XML_NAMESPACE
| Constructor Detail |
|---|
public Namespaces()
public Namespaces(Namespaces parent)
| Method Detail |
|---|
public void addNamespace(String prefix,
String uri)
prefix - the namespace prefixuri - the namespace URI to be associated with the given prefixpublic Namespaces createNamespaces()
public Enumeration getLocalNamespaces()
public String getNamespaceURI(String prefix)
prefix - the namespace prefix to lookup
public String getNamespacePrefix(String nsURI)
#getNamespacePrefixes.
nsURI - the namespace URI to lookup
public Enumeration getLocalNamespacePrefixes()
public String[] getNamespacePrefixes(String nsURI)
nsURI - the namespace URI to lookup
public String[] getNamespacePrefixes(String nsURI,
boolean local)
nsURI - the namespace URI to lookuplocal - a boolean that when true indicates only the local
scope is searched.
public String getNonDefaultNamespacePrefix(String nsURI)
nsURI - the namespace URI to lookup
public Namespaces getParent()
public boolean removeNamespace(String prefix)
prefix - the namespace prefix to remove the binding of
public void setParent(Namespaces namespaces)
namespaces - the parent Namespaces
public void sendEndEvents(ContentHandler handler)
throws SAXException
handler - the ContentHandler
SAXException
public void sendStartEvents(ContentHandler handler)
throws SAXException
handler - the ContentHandler
SAXException
public void declareAsAttributes(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 | |||||||||