On 15/01/2014, Christian GrĂ¼n christian.gruen@gmail.com wrote:
What is my mistake for the declaration:
function page:bookstore() as element(bookstore) {
The error message may serve as inspiration:
[BASX0003] Variable $x is not specified as argument.
I don't understand.
The examples in our documentation may be helpful, too:
The query component is the xquery function below, correct? :
let $x := fn:doc("xmldatabasefile.xml")/bookstore/book/title[contains(text(),'Everyday Italian')]/parent::*
The result of this query is selection of all the sibling elements for this book title element.
In the documentation example:
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) }"/> };
It is not seen where '$value' and '$answer' originate. In my example, I have only one variable, '$x'.