The Namespace Prefix Service allows to provide and manage namespace prefix mappings. Prefixes are unique however multiple prefixes might be used for the same namespace.
This module defines two services:
User level service used to lookup namespace prefixes. It also allows to set prefix mappings
:::java NamespacePrefixService /** bidi mapping prefix - namespace */ getNamespace(String prefix) : String getPrefix(String namespace) : String /** A namespace may be mapped to multiple prefixes */ getPrefixes(String namespace) : List<String> /** adds an new Prefix and returns the old mapping */ setPrefix(String prefix, String namespace) : String /** converts prefix:localName to full URIs */ getFullName(String shortName) : String /** converts URIs to prefix:localName */ getShortName(String uri) : String
Service that provides namespace prefix mappings. Multiple of such services can be registered and will be used by the NamespacePrefixService. If a provider can not provide a mapping for a prefix/namespace, than it is expected to return null. The NamespacePrefixService will call provider in the order of their service.ranking when looking for mappings.
:::java NamespacePrefixProvider getNamespace(String prefix) : String getPrefix(String namespace) : String /** A namespace may be mapped to multiple prefixes */ getPrefixes(String namespace) : List<String>