Determining file location in module import

When you import an XQuery library module, you specify the namespace on the import line. The Endeca implementation of XQuery also requires the use of a file location hint in library module import.

In the Endeca XQuery implementation, modules are considered concrete files. Therefore, in addition to the required namespace, location hints must be provided to import library module files for that namespace. For example, the file typeahead.xq, downloadable from the Endeca Developer Network at http://eden.endeca.com/wiki/display/feature/XQuery, contains the following import lines. As you can see, a location hint consisting of the module name follows the namespace declarations.
import module namespace http = "http://www.endeca.com/XQuery/http/2008" at "http.xq";
import module namespace mdex = "http://www.endeca.com/XQuery/mdex/2008" at "mdex.xq";
import module namespace eutil = "http://www.endeca.com/XQuery/eutil/2008" at "eutil.xq";
import module namespace esoap = "http://www.endeca.com/XQuery/esoap/2008" at "esoap.xq";
import module namespace typeahead-wsdl = "http://www.endeca.com/XQuery/service/typeahead/wsdl/2008" at "typeahead-wsdl.xq";

Library module files are found by looking up the specified name in the library search path. If --xquery_path is specified, its lib subdirectory is included in the library search path.