|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.commons.schema.docpath.XmlSchemaNamespaceContext
public final class XmlSchemaNamespaceContext
Implemented as a series of scope-based stacks, one per prefix.
| Constructor Summary | |
|---|---|
XmlSchemaNamespaceContext()
Constructs a new XmlSchemaNamespaceContext with the
following initial mappings:
xml -> http://www.w3.org/1999/namespace
xmlns -> http://www.w3.org/2000/xmlns/
|
|
| Method Summary | |
|---|---|
void |
addNamespace(String prefix,
String namespaceUri)
Adds a new prefix mapping to the context. |
void |
clear()
Clears the given namespace stack, restoring it to the original mappings defined by the constructor. |
String[] |
getDeclaredPrefixes()
|
String |
getNamespaceURI(String prefix)
|
String |
getPrefix(String namespaceUri)
|
Iterator |
getPrefixes(String namespaceUri)
|
void |
removeNamespace(String prefix)
Removes the most recent prefix-to-namespace mapping for the provided prefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlSchemaNamespaceContext()
XmlSchemaNamespaceContext with the
following initial mappings:
xml -> http://www.w3.org/1999/namespacexmlns -> http://www.w3.org/2000/xmlns/
| Method Detail |
|---|
public String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextNamespaceContext.getNamespaceURI(String)public String getPrefix(String namespaceUri)
getPrefix in interface NamespaceContextNamespaceContext.getPrefix(String)public Iterator getPrefixes(String namespaceUri)
getPrefixes in interface NamespaceContextNamespaceContext.getPrefixes(String)public String[] getDeclaredPrefixes()
getDeclaredPrefixes in interface NamespacePrefixListNamespacePrefixList.getDeclaredPrefixes()
public void addNamespace(String prefix,
String namespaceUri)
prefix - The prefix to represent the namespace URI.namespaceUri - the namespace URI represented by the prefix.
IllegalArgumentException - if the prefix is null, or if the
namespace URI is null or empty.public void removeNamespace(String prefix)
prefix - The prefix to remove the current prefix-to-namespace
mapping of.
IllegalStateException - If there is no current mapping for that
prefix.public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||