Stopped at ., 2/1: [XQST0059] Could not retrieve module: C:/Program Files (x86)/basex/bin/another.xqm.Suggesting it maybe resolving against the working directory?
Hi Christian,
thanks for the tipp. I tried, but get the message "Module not found: http://kleist-digital.de/ns/kleist“
The working solution with absolute path is:
import module namespace kleist = "http://kleist-digital.de/ns/kleist" at "file:///Users/gdunzwolff/Documents/kleist/BaseXWeb/modules/kleist-functions.xqm“;
My RepoPath is:
REPOPATH = /Applications/basex/repo
The module is now in Applications/basex/repo and is called kleist-functions.xqm.
In the module importing file the header is:
import module namespace kleist = "http://kleist-digital.de/ns/kleist“;
With http://localhost/rest?run=xqs/list_ba_flyer.xq I get
Module not found: http://kleist-digital.de/ns/kleist. There is no more ask for kleist-functions.xqm.
How do I have to name the module in repo, so that it will be found. Or do I have to change the import-statement?
Günter
> Am 01.04.2016 um 17:58 schrieb Christian Grün <christian.gruen@gmail.com>:
>
> Hi Günter,
>
> You may be generally better off moving all your modules to the repo
> directory. This way, there will be no need anymore to specify the
> module location. Did you already think about it?
>
> Christian
>
>
> On Fri, Apr 1, 2016 at 12:26 PM, Günter Dunz-Wolff
> <kleist@mail.dunzwolff.de> wrote:
>> Hi all,
>>
>> in my queries I have to import module namespace, for example in the file test.xq something like
>> import module namespace kleist = "http://kleist-digital.de/ns/kleist" at "../modules/kleist-functions.xqm";
>>
>> I'm calling the query via REST like
>> http://localhost/rest?run=xqs/test.xq
>>
>> The webpath is configured like
>> # HTTP Services
>> WEBPATH = /Users/xxx/Documents/kleist/BaseXWeb
>> RESTPATH =
>>
>> When I'm using the absolute path, everything works fine:
>> import module namespace kleist = "http://kleist-digital.de/ns/kleist" at "file:///Users/xxx/Documents/kleist/BaseXWeb/modules/kleist-functions.xqm";
>>
>> When I'm using the relative path for importing the module namespace like
>> import module namespace kleist = "http://kleist-digital.de/ns/kleist" at "../modules/kleist-functions.xqm";
>> I'll get the following error:
>> "Could not retrieve module: /Users/modules/kleist-functions.xqm"
>> The correct address should be: Users/xxx/Documents/kleist/BaseXWeb/modules/kleist-functions.xqm
>>
>> What's wrong in my configuration? Btw, I need the relative path for portability to my remote server.
>>
>> Any help would be great, thanks a lot,
>> Best regards, Günter
>