On the documentation page on RESTXQ [1], the following example is given in the section headed 'Query parameters': declare %rest:path("/params") %rest:query-param("id", "{$id}") %rest:query-param("add", "{$add}", 42, 43, 44) function page:params($value as xs:string?, $answer as xs:integer+) { <result id="{ $id }" sum="{ sum($add) }"/> }; Is it really the case that %rest:query-param("id", "{$id}") %rest:query-param("add", "{$add}", 42, 43, 44) will cause variables named $id and $add to be in scope in the function, even though there are no arguments with either of these two names? (And what values will $value and $answer have?) Or is there a typo in the example? If there is a typo in the example, it would be nice to fix it; if there is no typo in the example, it would be nice to explain to the user what is going on. I can't find any mention of rest:query-param in the draft RESTXQ spec [2], and where I do find mentions of rest:query-param, I have not yet found any explicit statement about what it does, in formal terms. I have been guessing, based on the other examples in [1] and on the statement there that "The following annotations can be used to bind request values to function arguments", that an annotation of the form rest:query-param(X, "{$Y}", Z) binds the value of the query parameter X in the URI to $Y, where $Y is the name of a parameter of the function being annotated. I apologize for not simply tying the example to see if it works. Michael [1] http://docs.basex.org/wiki/RESTXQ [2] http://exquery.github.com/exquery/exquery-restxq-specification/restxq-1.0-sp... -- **************************************************************** * C. M. Sperberg-McQueen, Black Mesa Technologies LLC * http://www.blackmesatech.com * http://cmsmcq.com/mib * http://balisage.net ****************************************************************