The XML Resolver. The resolver maps external identifiers (document type declarations and external parsed entities) and URIs found in XML documents to local resources. This implementation supports a new interface to perform redirection through RDDL documents and automated caching of resources retrieved from the web.

Performing resolution

For most users, the principle entry points to this API will be the Resolver class. Programmers may also want to take advantage of the NamespaceResolver interface.

The Resolver Class

The Resolver class implements the EntityResolver interface (from org.xml.sax), the URIResolver interface (from javax.xml.Transformer), and the NamespaceResolver (described above).

Use instances of this class as the resolvers for parsers you create. (Or construct parsers with the utility classes in the org.xmlresolvers.tools package which perform catalog resolution automatically.)

The NamespaceResolver Interface

The NamespaceResolver interface is an extension of the URIResolver interface from the JAXP Transformer package. It provides a single method:

public Source resolveNamespace(String uri, String nature, String purpose)

Use this 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.

Accessing the resolver

Applications that wish to take advantage of the resolver more directly may wish to interact with the remaining classes in the API: