|
||||||||||
| 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()
|
|
| Method Summary | |
|---|---|
void |
addNamespace(String prefix,
String uri)
Adds the given namespace declaration to this Namespaces instance |
void |
declareAsAttributes(AttributeListImpl atts)
Declare the namespaces of this stack in as attributes. |
Enumeration<String> |
getLocalNamespacePrefixes()
Returns all namespace prefixes declared locally |
Enumeration<String> |
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 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. |
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 |
| 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()
| Method Detail |
|---|
public void addNamespace(String prefix,
String uri)
prefix - the namespace prefixuri - the namespace URI to be associated with the given prefix
IllegalArgumentException - if uri is nullpublic Enumeration<String> getLocalNamespaces()
public String getNamespaceURI(String prefix)
prefix - the namespace prefix to lookup
public String getNamespacePrefix(String nsURI)
#getNamespacePrefixes.
nsURI - the namespace URI to lookup
IllegalArgumentException - if nsURI is nullpublic Enumeration<String> getLocalNamespacePrefixes()
public String[] getNamespacePrefixes(String nsURI)
nsURI - the namespace URI to lookuplocal - a boolean that when true indicates only the local scope is
searched.
IllegalArgumentException - if nsURI is nullpublic String getNonDefaultNamespacePrefix(String nsURI)
nsURI - the namespace URI to lookup
IllegalArgumentException - if nsURI is nullpublic boolean removeNamespace(String prefix)
prefix - the namespace prefix to remove the binding of
public void sendEndEvents(ContentHandler handler)
throws SAXException
handler - the ContentHandler
SAXException
public void sendStartEvents(ContentHandler handler)
throws SAXException
handler - the ContentHandler
SAXExceptionpublic void declareAsAttributes(AttributeListImpl atts)
atts - the Attribute List to fill in.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||