public class RegistryNamespaceResolver extends Object implements NamespaceResolver
Constructor and Description |
---|
RegistryNamespaceResolver(NamespaceRegistry registry)
Creates a new namespace resolver based on the given namespace registry.
|
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 RegistryNamespaceResolver(NamespaceRegistry registry)
registry
- namespace registrypublic String getPrefix(String uri) throws NamespaceException
NamespaceResolver
getPrefix
in interface NamespaceResolver
uri
- namespace URINamespaceException
- if the URI is unknown.public String getURI(String prefix) throws NamespaceException
NamespaceResolver
getURI
in interface NamespaceResolver
prefix
- namespace prefixNamespaceException
- if the prefix is unknown.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.