Christian,
I am trying to set up Basex HTTP server and run some xquery scripts through REST style.
In http://docs.basex.org/wiki/REST#Usage_Examples, we have example http://localhost:8984/rest/factbook/index.xq to run index.xq scripts.
Where are we keeping xquery scripts?
In .basex configuration file, we have
DBPATH = /Users/xxx/BaseXData HTTPPATH = /Users/xxx/BaseXHTTP REPOPATH = /Users/xx/BaseXRepo
Which one is for folder that keeps xquery scripts? Above query returns "Path does not exist." error. I have compiled the recent version of Basex and use it on Mac OSX Lion 64 bit.
Thanks
Erol Akarsu
Hi,
these queries load scripts from the database and execute them. To execute scripts from HTTPPATH, use something like http://localhost:8984/rest?run=filename.xq
Kind regards, Ralf
On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote:
Christian,
I am trying to set up Basex HTTP server and run some xquery scripts through REST style.
In http://docs.basex.org/wiki/REST#Usage_Examples, we have example http://localhost:8984/rest/factbook/index.xq to run index.xq scripts.
Where are we keeping xquery scripts?
In .basex configuration file, we have
DBPATH = /Users/xxx/BaseXData HTTPPATH = /Users/xxx/BaseXHTTP REPOPATH = /Users/xx/BaseXRepo
Which one is for folder that keeps xquery scripts? Above query returns "Path does not exist." error. I have compiled the recent version of Basex and use it on Mac OSX Lion 64 bit.
Thanks
Erol Akarsu
Thanks Ralf,
What If I would like to pass some arguments to xquery script http://localhost:8984/rest?run=mult.xqhttp://localhost:8984/rest?run=filename.xq
Let suppose mult.xq has 2 external variables $a and $b defined and like to pass their values when we call it.
The url will be
http://localhost:8984/rest?run=filename.xq?$a=444&$b=3333
?
This is giving error "ile or directory "mult.xq?a=21" not found."
What is correct way of passing external variable values through rest url?
mult.xq: =======
declare variable $a as xs:integer external; declare variable $b as xs:integer external;
return <a> {$a * $b}</a>
On Thu, Oct 6, 2011 at 11:09 AM, Ralf Jung ralfjung-e@gmx.de wrote:
Hi,
these queries load scripts from the database and execute them. To execute scripts from HTTPPATH, use something like http://localhost:8984/rest?run=filename.xq
Kind regards, Ralf
On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote:
Christian,
I am trying to set up Basex HTTP server and run some xquery scripts
through
REST style.
In http://docs.basex.org/wiki/REST#Usage_Examples, we have example http://localhost:8984/rest/factbook/index.xq to run index.xq scripts.
Where are we keeping xquery scripts?
In .basex configuration file, we have
DBPATH = /Users/xxx/BaseXData HTTPPATH = /Users/xxx/BaseXHTTP REPOPATH = /Users/xx/BaseXRepo
Which one is for folder that keeps xquery scripts? Above query returns "Path does not exist." error. I have compiled the recent version of Basex and use it on Mac OSX Lion 64 bit.
Thanks
Erol Akarsu
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Hi,
You can not have multiple ? in a query, just pass the variables as additional parameters: http://localhost:8984/rest?run=filename.xq&$a=444&$b=3333
Kind regards, Ralf
On Thursday 06 October 2011 20:00:15 Erol Akarsu wrote:
Thanks Ralf,
What If I would like to pass some arguments to xquery script http://localhost:8984/rest?run=mult.xqhttp://localhost:8984/rest?run=filen ame.xq
Let suppose mult.xq has 2 external variables $a and $b defined and like to pass their values when we call it.
The url will be
http://localhost:8984/rest?run=filename.xq?$a=444&$b=3333
?
This is giving error "ile or directory "mult.xq?a=21" not found."
What is correct way of passing external variable values through rest url?
mult.xq:
declare variable $a as xs:integer external; declare variable $b as xs:integer external;
return <a> {$a * $b}</a>
On Thu, Oct 6, 2011 at 11:09 AM, Ralf Jung ralfjung-e@gmx.de wrote:
Hi,
these queries load scripts from the database and execute them. To execute scripts from HTTPPATH, use something like http://localhost:8984/rest?run=filename.xq
Kind regards, Ralf
On Thursday 06 October 2011 17:00:17 Erol Akarsu wrote:
Christian,
I am trying to set up Basex HTTP server and run some xquery scripts
through
REST style.
In http://docs.basex.org/wiki/REST#Usage_Examples, we have example http://localhost:8984/rest/factbook/index.xq to run index.xq scripts.
Where are we keeping xquery scripts?
In .basex configuration file, we have
DBPATH = /Users/xxx/BaseXData HTTPPATH = /Users/xxx/BaseXHTTP REPOPATH = /Users/xx/BaseXRepo
Which one is for folder that keeps xquery scripts? Above query returns "Path does not exist." error. I have compiled the recent version of Basex and use it on Mac OSX Lion 64 bit.
Thanks
Erol Akarsu
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de