public class NSStack
extends java.lang.Object
| Constructor and Description |
|---|
NSStack() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
add(java.lang.String uri)
Add a new declaration to the current scope using a unique prefix
and return the prefix.
|
void |
add(java.lang.String prefix,
java.lang.String uri)
Add a new declaration to the current scope.
|
java.lang.String |
getPrefix(java.lang.String uri)
Return the prefix associated with the given namespace name by
looking thru all the namespace declarations that are in scope.
|
java.lang.String |
getURI(java.lang.String prefix)
Return the namespace name associated with the given prefix by
looking thru all the namespace declarations that are in scope.
|
void |
pop()
Leave a scope: this removes any NS declarations that were added
in the last scope.
|
void |
push() |
public void push()
public void pop()
public void add(java.lang.String prefix,
java.lang.String uri)
prefix - the prefix to be used for this namespaceuri - the namespace name of this namespace.public java.lang.String add(java.lang.String uri)
uri - the namespace name of this namespacepublic java.lang.String getPrefix(java.lang.String uri)
uri - the namespace name for whom a declared prefix is desiredpublic java.lang.String getURI(java.lang.String prefix)
prefix - the prefix for whom a declared namespace name is desired