Hi Christian
I did try to write my ideas, but landed at reading what is REST and what not - and run out of time.

So here is draft of some of ideas - unfortunately without clear proposal for next action, but someone will probably take it over and move on.

Jan

JAX-RX and BaseX



2011/2/24 Christian Grün <christian.gruen@gmail.com>
> OK, I understand, that REST allows to perform the (SET) command, but to use
> it with a query, I have to send the query in another, following, request.
> Will this second request keep enough context at the server side to know, it
> shall use that timeout?

Just recently, I've thought about extending the JAX-RX Interface to
allow more than a single query or command, or to allow both commands
and queries; regarding the syntax, this could be easily realized for
the GET method:

  http://localhost:8984/basex/jax-rx/factbook?query=1&query=2
  http://localhost:8984/basex/jax-rx/factbook?command=set+timeout+1&query=1&command=info

On the other hand, I haven't decided yet how to best realize it for
the POST method without giving up compatibility. One solution could be
to introduce alternative "request" root elements:

 <request xmlns="http://jax-rx.sourceforge.net">
   <command>
     <text>set timeout 1</text>
   </command>
   <query>
     <text>//name</text>
     <parameter name="count" value="5"/>
   </query>
 </request>

What does everyone think?
Christian
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk



--
Ing. Jan Vlčinský
CAD programy
Slunečnicová 338/3, 734 01 Karviná Ráj, Czech Republic
tel: +420-597 602 024; mob: +420-608 979 040
skype: janvlcinsky; GoogleTalk: jan.vlcinsky@gmail.com
http://cz.linkedin.com/in/vlcinsky