Dear Sebastian,
a quick supplement to Lukas' answer: due to the abstraction of the JAX-RX interface and our implementation, the XQuery output parameters cannot be passed on to JAX-RX.
One of our future plans, however (middle term, 2011-12), is to bring BaseX and REST closer together. JAX-RX will then be discarded, and all output parameters specified in XQuery will directly influence the HTTP response.
Hope this helps, Christian ___________________________
On Fri, Aug 12, 2011 at 10:05 AM, Lukas Lewandowski lukas.lewandowski@uni-konstanz.de wrote:
Hey Sebastian, In our REST interface we currently support only media-type declaration as HTTP query parameter as in one of your examples:
<html>
<head><title>Testserver</title></head>
<body>
<p><a href="http://127.0.0.1:8984/basex/jax-rx/DBNAME?run=index.html&output=media-type=text/html">Testme!</a></p>
</body>
</html>
regards Lukas
Am 12.08.2011 um 08:43 schrieb Sebastian.Wiemer@Bertelsmann.de:
Hello,
I tried to use basex 6.7.1 as a web application server through the jax-rx API:
If you put the following file in the jax-rx directory of basex, then you have a simple web application:
[c:\Programme\BaseX\jax-rx\index.html]
declare option output:method "xhtml";
declare option output:media-type "text/html";
<html>
<head><title>Testserver</title></head>
<body>
<p><a href="http://127.0.0.1:8984/basex/jax-rx/DBNAME?run=index.html">Testme!</a></p>
</body>
</html>
(DBNAME is you context for the xquery)
Here comes the problem: the declare option output:media-type "text/html";
does not seem to work L
But if you specify the serialization option directly in the URI:
<html>
<head><title>Testserver</title></head>
<body>
<p><a href="http://127.0.0.1:8984/basex/jax-rx/DBNAME?run=index.html&output=media-type=text/html">Testme!</a></p>
</body>
</html>
Then this works and is a very simple example of using BaseX as a web application server.
Is it me or basex? Can anybody tell me, why the media-type=text/html output option did not work, when declared in the XQuery?
Regards,
Sebastian
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk