However, it should work if your path annotation is:
%rest:path("xmldatabasefile.xml/bookstore/book")
With this applied, and the url 'http://localhost:8984/xmldatabasefile.xml/bookstore/book' loaded into the web browser, I finally have a desirable result!
Giada De Laurentiis 2005 30.00
However, it is noticed that the web browser window title has changed to:
'Everyday Italian - Opera'
What has caused this behaviour?
We can't control this, this is done by your browser. Quite likely it handles the <title /> node the same it would normally handle the <title /> node within an HTML head element.
Also for the web browser url 'http://localhost:8984/test', the html form is visible, but submitting the 'get' request does not return the result of the query.
Your <form /> element needs an action attribute, otherwise it sends it to the some URL. So it should be <form method='get' name='databasequeryform' action="xmldatabasefile.xml/bookstore/book" >
Please be also aware that this has nothing to do with BaseX, XQuery or XPath, but is standard HTML. So your question might be more appropriate at other places, e.g. StackOverflow. There are also great debugging tools integrated into modern browsers (Firebug for Firefox, Developer toolbar for Chrome, ...) where you can see all your requests and you could immediately spot that your request is going to the wrong address.
Cheers, Dirk