net.sf.saxon.xom

Class XomUriResolver

Implemented Interfaces:
NonDelegatingURIResolver, Serializable, URIResolver

public class XomUriResolver
extends StandardURIResolver

This class is a URI resolver that loads an XML document found at the relevant URI and builds a XOM tree from it; the XOM tree is then returned as a source object. The main purpose of this class is for testing: any application that works with a Saxon tinytree can be tested against XOM merely by selecting this URIResolver.
Author:
Michael H. Kay

Field Summary

Fields inherited from class net.sf.saxon.StandardURIResolver

recognizeQueryParameters

Constructor Summary

XomUriResolver(Configuration config)

Method Summary

Source
resolve(String href, String base)
Resolve a URI

Methods inherited from class net.sf.saxon.StandardURIResolver

getConfiguration, getPTreeSource, getPlatform, queryParametersAreRecognized, resolve, setConfiguration, setRecognizeQueryParameters, setSAXInputSource

Constructor Details

XomUriResolver

public XomUriResolver(Configuration config)

Method Details

resolve

public Source resolve(String href,
                      String base)
            throws XPathException
Resolve a URI
Overrides:
resolve in interface StandardURIResolver
Parameters:
href - The relative or absolute URI. May be an empty string. May contain a fragment identifier starting with "#", which must be the value of an ID attribute in the referenced XML document.
base - The base URI that should be used. May be null if uri is absolute.
Returns:
a Source object representing an XML document