public class NamespaceContextImpl extends java.lang.Object implements javax.xml.namespace.NamespaceContext, NamespaceResolver
Constructor and Description |
---|
NamespaceContextImpl(NamespaceResolver resolver)
Constructor: wrap a Saxon NamespaceResolver as a JAXP NamespaceContext
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Implement the JAXP getNamespaceURI() method in terms of the Saxon-specific methods
|
java.lang.String |
getPrefix(java.lang.String uri)
Get the prefix bound to a particular namespace URI, if there is one, or null if not (JAXP method)
|
java.util.Iterator<java.lang.String> |
getPrefixes(java.lang.String uri)
Get all the prefixes mapped to a given namespace URI (JAXP method)
|
java.lang.String |
getURIForPrefix(java.lang.String prefix,
boolean useDefault)
Get the namespace URI corresponding to a given prefix.
|
java.util.Iterator<java.lang.String> |
iteratePrefixes()
Get an iterator over all the prefixes declared in this namespace context.
|
public NamespaceContextImpl(NamespaceResolver resolver)
resolver
- the Saxon NamespaceResolverpublic 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<java.lang.String> iteratePrefixes()
iteratePrefixes
in interface NamespaceResolver
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.namespace.NamespaceContext
prefix
- a namespace prefixpublic java.lang.String getPrefix(java.lang.String uri)
getPrefix
in interface javax.xml.namespace.NamespaceContext
uri
- the namespace URIpublic java.util.Iterator<java.lang.String> getPrefixes(java.lang.String uri)
getPrefixes
in interface javax.xml.namespace.NamespaceContext
uri
- the namespace URICopyright (c) 2004-2018 Saxonica Limited. All rights reserved.