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