Saxon.Api

 

 

Saxon.Api

Interface IQueryResolver


public interface IQueryResolver

Interface defining a user-supplied class used to retrieve XQuery library modules listed in an import module declaration in the query prolog.

Method Summary

 object GetEntity(Uri absoluteUri)

Dereference a URI returned by GetModules to retrieve a Stream containing the actual query text.

 Uri[] GetModules(string moduleUri, Uri baseUri, string[] locationHints)

Given a module URI and a set of location hints, return a set of query modules.

 

Method Detail

GetEntity

public object GetEntity(Uri absoluteUri)

Dereference a URI returned by GetModules to retrieve a Stream containing the actual query text.

Parameters:

absoluteUri - A URI returned by the GetModules method.

Returns:

Either a Stream or a String containing the query text. The supplied URI will be used as the base URI of the query module.

GetModules

public Uri[] GetModules(string moduleUri,
Uri baseUri,
string[] locationHints)

Given a module URI and a set of location hints, return a set of query modules.

Parameters:

moduleUri - The URI of the required library module as written in the import module declaration
baseUri - The base URI of the module containing the import module declaration
locationHints - The sequence of URIs (if any) listed as location hints in the import module declaration in the query prolog.

Returns:

A set of absolute URIs identifying the query modules to be loaded. There is no requirement that these correspond one-to-one with the URIs defined in the locationHints. The returned URIs will be dereferenced by calling the GetEntity method.