Thanks Ralf,

What If I would like to pass some arguments to xquery script
http://localhost:8984/rest?run=mult.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