public class SessionNamespaceResolver extends Object implements NamespaceResolver
NamespaceResolver
interface on a Session
.Constructor and Description |
---|
SessionNamespaceResolver(Session session)
Creates a new namespace resolver based on a session
|
Modifier and Type | Method and Description |
---|---|
String |
getPrefix(String uri)
Returns the prefix which is mapped to the given URI.
|
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped.
|
public SessionNamespaceResolver(Session session)
session
- public String getPrefix(String uri) throws NamespaceException
getPrefix
in interface NamespaceResolver
uri
- namespace URINamespaceException
- if the URI is unknown.public String getURI(String prefix) throws NamespaceException
getURI
in interface NamespaceResolver
prefix
- namespace prefixNamespaceException
- if the prefix is unknown.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.