public class NSStack extends Object
Constructor and Description |
---|
NSStack() |
Modifier and Type | Method and Description |
---|---|
String |
add(String uri)
Add a new declaration to the current scope using a unique prefix
and return the prefix.
|
void |
add(String prefix,
String uri)
Add a new declaration to the current scope.
|
String |
getPrefix(String uri)
Return the prefix associated with the given namespace name by
looking thru all the namespace declarations that are in scope.
|
String |
getURI(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(String prefix, String uri)
prefix
- the prefix to be used for this namespaceuri
- the namespace name of this namespace.public String add(String uri)
uri
- the namespace name of this namespacepublic String getPrefix(String uri)
uri
- the namespace name for whom a declared prefix is desiredpublic String getURI(String prefix)
prefix
- the prefix for whom a declared namespace name is desiredCopyright © 2017 JBoss by Red Hat. All rights reserved.