On 15/01/2014, Dirk Kirsten dk@basex.org wrote:
Hi,
based on your recent questions I would really recommend that you try to understand RESTXQ in more detail. Apart from our documentation at https://docs.basex.org/wiki/RESTXQ (which Chrisdtian already pointed out), there was also a Talk given by Arve and Sabine named "How to develop RESTXQ-based web applications with BaseX", you can find the slides and the example code at https://files.basex.org/publications/xmlprague2013/.
This presentation does seem connected to my set up. For example it states that webapp must be run using maven via port 9876, but I am using 'basexhttp' which I access via a web browser and url 'localhost:8984'.
All the details are given in the Spec at http://exquery.github.io/exquery/exquery-restxq-specification/restxq-1.0-spe...
You are using an annotation %rest:path("{$x}")
This means, your URL can be basically be any atomic type (see http://exquery.github.io/exquery/exquery-restxq-specification/restxq-1.0-spe...) and this value will be bound to the variable $x. This is also the reason why you have to declare $x as argument of the function. Within your function you never actually use this value, so probably you don't really intend to use a template in your path, so you might simply want to remove this. Of course, this is mostly guessing as we don't know what you actually want to do.
The objective is to use basex to query an xml database using and html select form and return the result in a web page (see: http://www.mail-archive.com/basex-talk@mailman.uni-konstanz.de/msg03469.html).
When the list item 'every day italian' is selected, a new web page should be created which displays the 'title', 'author', 'year', 'price' elements of the parent element 'book'.