Ahh, yes it works for me too when I remember to deploy the code. Thanks /Andy
On Mon, Apr 9, 2012 at 5:19 PM, Christian Grün christian.gruen@gmail.comwrote:
My use is really with RESTXQ and following[1] I tried declare %rest:path("snipsnapx") %output:method("html") %output:doctype-system("about:legacy-compat")
Thanks for the helpful link. With the following RESTXQ module..
module namespace rest = 'http://exquery.org/ns/restxq'; declare %rest:path("") %output:method("html") %output:doctype-system("about:legacy-compat") function rest:start() { <html/> };
..and the following request..
curl "http://admin:admin@localhost:8984/restxq"
..I get the following result..
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html></html>
..so all serializations options should also be supported by RESTXQ. Which result would you expect? Christian
On Mon, Apr 9, 2012 at 1:52 PM, Christian Grün <
christian.gruen@gmail.com>
wrote:
Hi Andy,
The html5 serialization adds a doctype <!DOCTYPE html> but unlike method "html" it outputs empty tags for script.
our announcement for announcing HTML5 was probably a little bit bold. The sections for HTML5 support in the W3 XQuery Serialization Specification [1] are still work in progress and not online yet, which is why it may take a while until we will support all details of the specification.
Also I cant get the REST eval to work. This url , for example, http://localhost:8984/rest/listman/add.xq always downloads rather
than
executes, even though http://localhost:8984/rest/listman
As there were numerous open issues related to the evaluation of XQuery files located in database (such as the correct path resolution of modules to be imported, and the fact that the evaluation of queries is not very RESTful), we decided to get rid of this feature. Instead, we'll soon be adding a richer framework (basex-web) to evaluate queries server-side. In the meanwhile, you can use the RUN command to evaluated queries located in the HTTP directory.
Hope this helps, Christian
[1] http://www.w3.org/TR/xslt-xquery-serialization-30/ ___________________________
On Mon, Apr 9, 2012 at 1:15 AM, Andy Bunce bunce.andy@gmail.com
wrote:
Hi, Looks wrong to me. example below
gives.. <rest:database name="listman" resources="1"><rest:resource type="raw" content-type="application/xquery" size="22">add.xq</rest:resource></rest:database>
/Andy
(: test html serialization :) declare option output:method "html5";
<html> <head> <script src="jquery-1.7.1.min.js" type="text/javascript"/> </head> </html>
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk