basex 7.2.1 html5 serialization
Monday, 9 April 2012 · 4 messages
AB
Andy Bunce9 Apr 2012 01:15 #
Hi,
The html5 serialization adds a doctype <!DOCTYPE html> but unlike method "html" it outputs empty tags for script.
Looks wrong to me. example below
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
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>CG
Christian Grün9 Apr 2012 14:52 #
Hi Andy,
Quoted text · Andy Bunce · 2 lines
> 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.
Quoted text · Andy Bunce · 3 lines
> 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/
Quoted text · Andy Bunce · 24 lines
On Mon, Apr 9, 2012 at 1:15 AM, Andy Bunce <bunce.andy at 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 at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
AB
Andy Bunce9 Apr 2012 18:54 #
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 at gmail.com>wrote:
Quoted text · Christian Grün · 90 lines
> > 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 at 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 at 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 at mailman.uni-konstanz.de > >> > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >> > > > > > >
CG
Christian Grün9 Apr 2012 19:08 #
I have just updated the latest snapshot [1]; The html5 serializer now extends the html serialization method. I hope that causes less problems?
Christian
[1] http://files.basex.org/releases/latest/
Quoted text · Andy Bunce · 99 lines
On Mon, Apr 9, 2012 at 6:54 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > 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 at gmail.com> > wrote: >> >> > 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 at 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 at 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 at mailman.uni-konstanz.de >> >> > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> > >> > >> > > >
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery