Dear BaseX team,

I think that the resolving of module import hints does not work properly if the importing module has a relative base URI declaration.

In the example below, module1 and module2 both are located in a directory "tt". As module 1 has a base URI declaration setting the base URI to "..", its import of module2 should require the following import hint: "tt/module2.xq", rather than "module2.xq". However, this produces an error; the error is not thrown when the import hint is erroneously set to "module" - which is, of course, also wrong behaviour.

Compare: http://www.w3.org/TR/xquery-30/#id-base-uri-decl

Cheers,
Hans-Jürgen

PS
call: basex -b uri=dummy.xml main.xq
=>
[XQST0059] Could not retrieve module 'C:/projects/infospace/pcol/tmp/tt/module2.xq'.

main.xq:
=======
import module namespace m="http://www.ttools.org/xquery-functions" at "tmp/module1.xq";
declare variable $uri external;
m:foo($uri)

module1.xq:
=========
module namespace m="http://www.ttools.org/xquery-functions";
import module namespace i="http://www.ttools.org/xquery-functions" at "tt/module2.xq";
declare base-uri "..";
declare function m:foo($uri as xs:string) {i:bar($uri)};

module2.xq:
==========
module namespace m="http://www.ttools.org/xquery-functions";
declare base-uri "..";
declare function m:bar($uri as xs:string) {doc($uri)};