Thanks, I will give it a go. 
My motivation is to find a restxq config that avoids the "parsing tax". I am thinking of trying setting RESTXQPATH to restxq. 
Then using this structure:
webapp
-app1
--mod2.xqm
 
-restxq
--app1
---restmod1.xqm

-static
--app1
---index.html

Where restxq/app/restmod1.xqm etc all have declare base-uri "../../app";

Unless there is another imminent solution to this in the works :-)?
 
/Andy


On 16 June 2014 14:14, Christian Grün <christian.gruen@gmail.com> wrote:
Hi Andy,

I agree that relative base-uri declarations should always refer to the
location of the current query file, no matter in which context. This
should be fixed in the latest snapshot [1].

Thanks,
Christian


On Sun, Jun 15, 2014 at 12:25 AM, Andy Bunce <bunce.andy@gmail.com> wrote:
> Hi,
> It seems that in restxq mode relative paths for declare base-uri are
> resolved differently  [1]. If I have
>
> -webapp
> --folder1
> ---mod1.xqm (which has import module namespace xm='test' at 'mod2.xqm';)
> ---mod2.xqm
> The import works. If I add
> declare base-uri ".";
> to mod1. the import fails, running the same code not via restxq and it
> works.
> Is this intended behavior?
> /Andy
>
>  [1]
> http://www.w3.org/TR/2014/REC-xquery-30-20140408/#id-base-uri-decl