On 15/01/2014, Christian GrĂ¼n <christian.gruen@gmail.com> wrote:
So your URL should probably look sth like..
I had to enclosedthe url in quotation marks: ... declare %rest:GET %rest:path("http://localhost:8984/xmldatabasefile.xml/bookstore/book") %rest:form-param("booktitle","{$x}") %rest:produces("text/html") %output:method("xhtml") 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 404 Problem accessing /. Reason: No function found that matches the request. Powered by Jetty:// With the quotation marks removed around the url, the server result: HTTP ERROR 400 Problem accessing /. Reason: Stopped at /path/to/webapp/restxq.xqm, 54/12: [XPST0003] Literal expected after annotation. Powered by Jetty://
I've tried using the wiki page suggested, without any success in understanding (!)
What are the problems?
It is incomplete, to my usage scenario. For example, the wiki page does not show an example with the localhost as part of the url.