|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.xml.NamespacesStack
public class NamespacesStack
This class is an actual namespace stack implementation, responsible for adding and removing namespace scopes, as well as resolving namespace urls and prefixes by traversing all the namespace stack.
| Constructor Summary | |
|---|---|
NamespacesStack()
|
|
| Method Summary | |
|---|---|
void |
addDefaultNamespace(String namespaceUri)
Adds the default namespace to current scope. |
void |
addNamespace(String namespacePrefix,
String namespaceUri)
Adds a namespace to current scope. |
void |
addNewNamespaceScope()
Adds a new namespace scope. |
void |
declareAsAttributes(AttributeListImpl attributeList,
boolean localOnly)
Declares the namespaces using the attribute list. |
Namespaces |
getCurrentNamespaceScope()
Retrieves the current namespace scope. |
String |
getDefaultNamespaceURI()
Retrieves the default namespace namespace uri. |
Enumeration<String> |
getLocalNamespacePrefixes()
Retrieves the namespace prefixes registered in current scope. |
String |
getNamespacePrefix(String namespaceUri)
Retrieves the namespace prefix for the given namespace uri. |
String |
getNamespaceURI(String namespacePrefix)
Retrieves the namespace uri bound to specified prefix. |
String |
getNonDefaultNamespacePrefix(String namespaceUri)
Retrieves the non default namespace prefix for the given namespace uri. |
void |
removeNamespace(String namespacePrefix)
Removes the namespace from current scope using the namespace prefix |
void |
removeNamespaceScope()
Removes the namespace scope. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NamespacesStack()
| Method Detail |
|---|
public void addNamespace(String namespacePrefix,
String namespaceUri)
namespacePrefix - the namespace prefixnamespaceUri - the namespace uripublic void addDefaultNamespace(String namespaceUri)
namespaceUri - the namespace uripublic void removeNamespace(String namespacePrefix)
namespacePrefix - the prefix of the namespace to removepublic String getNamespaceURI(String namespacePrefix)
namespacePrefix - the namespace prefix
public void declareAsAttributes(AttributeListImpl attributeList,
boolean localOnly)
attributeList - the list of attributes containing the namespaceslocalOnly - whether the namespaces will only registered in current namespace
context or in entire stackpublic String getDefaultNamespaceURI()
public String getNamespacePrefix(String namespaceUri)
namespaceUri - the namespace uri
public String getNonDefaultNamespacePrefix(String namespaceUri)
namespaceUri - the namespace uri
public Enumeration<String> getLocalNamespacePrefixes()
public void addNewNamespaceScope()
public void removeNamespaceScope()
public Namespaces getCurrentNamespaceScope()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||