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
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?