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
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
Hi Christian,
thanks for the tipp. I tried, but get the message "Module not found: http://kleist-digital.de/ns/kleist%E2%80%9C
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%E2%80%9C;
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
Ignoring the repo.. I can replicate this with the default config
If I create webapp/test.xq with just static-base-uri() then /rest?rest?run=test.xq returns the expected
file:///C:/Program%20Files%20(x86)/BaseX/webapp/test.xq
If I change the module to import module namespace df = 'ns' at "another.xqm"; static-base-uri()
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?
/Andy
On 1 April 2016 at 20:55, kleist-digital kleist@mail.dunzwolff.de wrote:
Hi Christian,
thanks for the tipp. I tried, but get the message "Module not found: http://kleist-digital.de/ns/kleist%E2%80%9C
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%E2%80%9C;
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
Hi Günter,
You’ll have to move your module to the correct sub-directory [1]:
URL: http://kleist-digital.de/ns/kleist File location: /Applications/basex/repo/de/kleist-digital/ns/kleist.xqm
Hope this helps Christian
[1] http://docs.basex.org/wiki/Repository#URI_Rewriting
On Fri, Apr 1, 2016 at 9:55 PM, kleist-digital kleist@mail.dunzwolff.de wrote:
Hi Christian,
thanks for the tipp. I tried, but get the message "Module not found: http://kleist-digital.de/ns/kleist%E2%80%9C
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%E2%80%9C;
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
Hi all, hi Christian,
in BaseX-specific cases, the Oxygen XQuery-Validation doesn’t work based on the Saxon-Engine, for example
import module namespace kleist = "http://kleist-digital.de/ns/kleist%E2%80%9C;
gives feedback: Failed to resolve URI of imported module: Cannot locate module for namespace http://kleist-digital.de/ns/kleist
Is there any way, to use the basex-XQuery-Parser inside of Oxygen?
Best regards, Günter
Hi Günter,
feel free to have a look at the Argon project [1]. For basic oXygen integration, our Wiki page may be of interest as well [2].
Cheers, Christian
[1] http://argon-author.com/ [2] http://docs.basex.org/wiki/Integrating_oXygen
On Sat, Apr 2, 2016 at 2:25 PM, kleist-digital kleist@mail.dunzwolff.de wrote:
Hi all, hi Christian,
in BaseX-specific cases, the Oxygen XQuery-Validation doesn’t work based on the Saxon-Engine, for example
import module namespace kleist = "http://kleist-digital.de/ns/kleist%E2%80%9C;
gives feedback: Failed to resolve URI of imported module: Cannot locate module for namespace http://kleist-digital.de/ns/kleist
Is there any way, to use the basex-XQuery-Parser inside of Oxygen?
Best regards, Günter
basex-talk@mailman.uni-konstanz.de