public final class SavedNamespaceContext extends java.lang.Object implements java.io.Serializable, NamespaceResolver
Constructor and Description |
---|
SavedNamespaceContext(int[] nscodes,
NamePool pool)
Create a NamespaceContext object
|
Modifier and Type | Method and Description |
---|---|
int[] |
getNamespaceCodes()
Get the list of in-scope namespaces held in this NamespaceContext
|
java.lang.String |
getURIForPrefix(java.lang.String prefix,
boolean useDefault)
Get the namespace URI corresponding to a given prefix.
|
java.util.Iterator |
iteratePrefixes()
Get an iterator over all the prefixes declared in this namespace context.
|
public SavedNamespaceContext(int[] nscodes, NamePool pool)
nscodes
- an array of namespace codes. Each namespace code is an integer
in which the first 16 bits represent the prefix (zero if it's the default namespace)
and the next 16 bits represent the uri. These are codes held in the NamePool. The
list will be searched from the "high" end.public int[] getNamespaceCodes()
public java.lang.String getURIForPrefix(java.lang.String prefix, boolean useDefault)
getURIForPrefix
in interface NamespaceResolver
prefix
- the namespace prefixuseDefault
- true if the default namespace is to be used when the
prefix is ""public java.util.Iterator iteratePrefixes()
iteratePrefixes
in interface NamespaceResolver