Interface NamespaceResolver

All Known Implementing Classes:
Resolver, XercesResolver

public interface NamespaceResolver
Interface for resolving namespace URIs. This interface supports the RDDL notion of a nature and purpose for a namespace.

The NamespaceResolver interface is an extension of the URIResolver interface from the JAXP Transformer package.

Use this resolveNamespace method in your applications (instead of the URIResolver) where you are attempting to find information about a namespace URI.

The intent of this method is that it returns the Source associated with the namespace uri that has the specified RDDL nature and purpose.

The XML Resolver implements catalog extension attributes that allow a user to specify the nature and purpose of a URI. It also parses RDDL (1.0) documents.

  • Method Summary

    Modifier and Type
    Method
    Description
    resolveNamespace(String uri, String nature, String purpose)
    Resolve a namespace URI into a Source.
  • Method Details

    • resolveNamespace

      Source resolveNamespace(String uri, String nature, String purpose) throws TransformerException
      Resolve a namespace URI into a Source.

      This method resolves a namespace URI, returning a resource that is associated with the namespace name and has the specified nature and purpose.

      If no resource with a matching nature and purpose is found, a Source must be created for the namespace URI.

      Parameters:
      uri - The namespace URI.
      nature - The RDDL nature of the resource.
      purpose - The RDDL purpose of the resource.
      Returns:
      A Source object, or null if the href cannot be resolved, and the processor should try to resolve the URI itself.
      Throws:
      TransformerException - If an error occurs