| org.openharmonise.commons.xml.namespace.NamespaceResolver
All known Subclasses: org.openharmonise.commons.xml.namespace.AbstractNamespaceResolver,
NamespaceResolver | public interface NamespaceResolver (Code) | | Defines the interface for an XML namespace resolver for looking up namespace/prefix
combinations.
author: Matthew Large version: $Revision: 1.1 $ |
addNamespace | public void addNamespace(String sURI, String sPrefix) throws NamespaceClashException(Code) | | Stores the specified namespace/prefix pair if the prefix is not already stored.
If the prefix is already stored then a NamespaceClashException is thrown.
Parameters: sURI - Namespace URI Parameters: sPrefix - Namespace prefix throws: NamespaceClashException - If the prefix already exists |
getNamespaceByPrefix | public String getNamespaceByPrefix(String sPrefix)(Code) | | Returns the namespace URI that matches the supplied prefix.
Parameters: sPrefix - Namespace prefix Namespace URI, null if none found |
getPrefixByNamespace | public String getPrefixByNamespace(String sURI)(Code) | | Returns the namespace prefix that matches the supplied URI. If the namespace is associated
to more than one prefix then the first found prefix is returned.
If no namespace is found then a new prefix is generated, which does not clash
with any stored prefix, stored and returned.
Parameters: sURI - Namespace URI Namespace prefix |
getPrefixByNode | public String getPrefixByNode(Node node) throws NamespaceClashException(Code) | | Returns the namespace prefix that matches the namespace URI of the supplied Node.
If the Node does not have a namespace URI assigned to it null will be returned.
If the namespace is associated
with more than one prefix then the first found prefix is returned.
If no namespace is found then a new prefix is generated, which does not clash
with any stored prefix, stored and returned.
Parameters: node - DOM Node to be checked Namespace prefix or null if the Node does not have a namespace URI assigned. |
removeNamespace | public void removeNamespace(String sURI)(Code) | | Removes the specified namespace from the resolver if it exists.
Parameters: sURI - Namespace URI |
|
|