Problem accessing /. Reason: No function found that matches the request.
404 indicates that your XQuery code is correct, but that no mapping for your URL is found. What are the values for..
- your URL? - your %rest:path argument? - your RESTXQ url-pattern in web.xml?
Usually, the easiest way is to start off with the given examples (in the BaseX zip/exe distribution or the ones shown in the Wiki) and modify them to your needs.
Powered by Jetty://
Then I tried:
... function page:bookstore($x) {...
which produces the same error result shown above. Then tried:
... function page:bookstore($x) <bookstore> { let $x := fn:doc("xmldatabasefile.xml")/bookstore/book/title[contains(text(),'Everyday Italian')]/parent::* return $x } </bookstore>
The result:
HTTP ERROR 400
Problem accessing /. Reason: Stopped at /path/to/webapp/restxq.xqm, 59/2: [XPST0003] Expecting '{', found '<'.
Powered by Jetty://
What next must I try, please?