duplicate xmlns in wadl o/p

Monday, 27 January 2014 · 3 messages
AB
Andy Bunce27 Jan 2014 00:29 #
given a function commented like: (:~ : return search results : <hit> : <entity>country</entity> : <name>name</name> : <url>...</url> : </hit> :) declare %rest:GET %rest:path("where4/api/search") %restxq:query-param("q", "{$q}") %output:method("json") function search($q){ The wadl function [1] produces:
<wadl:resource path="/where4/api/search/">
      <wadl:method name="GET">
        <wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search results
<hit xmlns="" xmlns="http://www.w3.org/1999/xhtml">
<entity xmlns="">country</entity>
<name xmlns="">name</name>
<url xmlns="">...</url>
</hit>
        </wadl:doc>
        <wadl:request>
          <wadl:param name="q" style="query"/>
        </wadl:request>
        <wadl:response>
          <wadl:representation mediaType="application/json"/>
        </wadl:response>
      </wadl:method>
    </wadl:resource>
CG
Christian Grün27 Jan 2014 10:52 #
I’m getting the correct result:
    <wadl:resource path="/where4/api/search/">
      <wadl:method name="GET">
        <wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search results
<hit>
<entity>country</entity>
<name>name</name>
<url>...</url>
</hit>
        </wadl:doc>
        <wadl:request>
...
I guess you also ran this with a 7.8 snapshot? Christian
Quoted text · Andy Bunce · 47 lines
On Mon, Jan 27, 2014 at 12:29 AM, Andy Bunce <bunce.andy at gmail.com> wrote: > given a function commented like: > > (:~ > : return search results > : <hit> > : <entity>country</entity> > : <name>name</name> > : <url>...</url> > : </hit> > :) > declare > %rest:GET %rest:path("where4/api/search") > %restxq:query-param("q", "{$q}") > %output:method("json") > function search($q){ > > The wadl function [1] produces: > > <wadl:resource path="/where4/api/search/"> > <wadl:method name="GET"> > <wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search results > <hit xmlns="" xmlns="http://www.w3.org/1999/xhtml"> > <entity xmlns="">country</entity> > <name xmlns="">name</name> > <url xmlns="">...</url> > </hit> > </wadl:doc> > <wadl:request> > <wadl:param name="q" style="query"/> > </wadl:request> > <wadl:response> > <wadl:representation mediaType="application/json"/> > </wadl:response> > </wadl:method> > </wadl:resource> > > Regards > /Andy > > [1] http://docs.basex.org/wiki/RESTXQ_Module#rest:wadl > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
AB
Andy Bunce27 Jan 2014 13:10 #
I am using 7.8 beta 88825ee On Mon, Jan 27, 2014 at 9:52 AM, Christian Grün <christian.gruen at gmail.com>wrote:
Quoted text · Christian Grün · 69 lines
> I’m getting the correct result: > > <wadl:resource path="/where4/api/search/"> > <wadl:method name="GET"> > <wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search > results > <hit> > <entity>country</entity> > <name>name</name> > <url>...</url> > </hit> > </wadl:doc> > <wadl:request> > ... > > I guess you also ran this with a 7.8 snapshot? > Christian > > > > On Mon, Jan 27, 2014 at 12:29 AM, Andy Bunce <bunce.andy at gmail.com> wrote: > > given a function commented like: > > > > (:~ > > : return search results > > : <hit> > > : <entity>country</entity> > > : <name>name</name> > > : <url>...</url> > > : </hit> > > :) > > declare > > %rest:GET %rest:path("where4/api/search") > > %restxq:query-param("q", "{$q}") > > %output:method("json") > > function search($q){ > > > > The wadl function [1] produces: > > > > <wadl:resource path="/where4/api/search/"> > > <wadl:method name="GET"> > > <wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search > results > > <hit xmlns="" xmlns="http://www.w3.org/1999/xhtml"> > > <entity xmlns="">country</entity> > > <name xmlns="">name</name> > > <url xmlns="">...</url> > > </hit> > > </wadl:doc> > > <wadl:request> > > <wadl:param name="q" style="query"/> > > </wadl:request> > > <wadl:response> > > <wadl:representation mediaType="application/json"/> > > </wadl:response> > > </wadl:method> > > </wadl:resource> > > > > Regards > > /Andy > > > > [1] http://docs.basex.org/wiki/RESTXQ_Module#rest:wadl > > > > _______________________________________________ > > BaseX-Talk mailing list > > BaseX-Talk at mailman.uni-konstanz.de > > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > >

⚡Generated with XQuery