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