-------- Original-Nachricht --------
Betreff: Re: [basex-talk] Fwd: Re: How to retrieve HTTP request parameters and use them in XQuery with BaseX
Datum: Wed, 5 Jan 2011 09:51:07 +0000
Von: software developer <computer.software.developer@gmail.com>
An: Andreas Weiler <andreas.weiler@uni-konstanz.de>


Hi Andreas,

Wonderful, thanks a lot!!

Great work.


On Mon, Jan 3, 2011 at 10:02 AM, Andreas Weiler <andreas.weiler@uni-konstanz.de> wrote:
Hi there,

i fixed the bug and attached the newest version of our api.

Don't hesitate to ask for more help,
Kind regards

Am 31.12.10 16:52, schrieb Andreas Weiler:
Hi,

this feature isnt enabled for the run command yet.
We put that on our todo-list and get it done as fast as possible.
You could also have a look into our language bindings (for other ways then REST) [1], here you can
also bind variables to queries.
If your query is not to large, i guess the network traffic for sending the query for each request should not be too much.

Kind regards,
Andreas

[1] http://www.inf.uni-konstanz.de/dbis/basex/bindings

Am 31.12.10 16:18, schrieb software developer:
Hi,

The parameters are not bound to variables when a query is invoked via the run parameter.

For example, I store my query in myquery.xq on the server side; if the query contains
current-time()

invocation of the URL
http://localhost:8984/basex/jax-rx?wrap=no&run=myquery.xq&var=$x=21%01$y=2 <http://localhost:8984/basex/jax-rx?wrap=no&run=myquery.xq&var=$x=21%01$y=2>
results in display of current date-time

but if the query contains
declare variable $x as xs:integer external;
declare variable $y as xs:integer external;
$x*$y

I get the error
Stopped at line 1, column 34 in myquery.xq:
[XQDY0002] No value defined for "$x as xs:integer".

The parameters are correctly bound to variables when a query is invoked via the query parameter named query as you described, but that is not what I am after.  Is this a bug?  Is there a workaround?


_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk