eXide icon indicating copy to clipboard operation
eXide copied to clipboard

Add 'generate xqdoc'

Open dizzzz opened this issue 12 years ago • 6 comments

It would be nice if eXide could generate for xquery schrips/modules xqdoc compatible documentation (skeleton) based on the function signature.

This will encourage writing documentation, and saves lots of typing :-)

dizzzz avatar Jul 30 '13 08:07 dizzzz

can this modification include capacity to operate with restxq scripts? The current xqdoc fails with the '%' char of the restxq annotation

pwin avatar Jul 22 '17 21:07 pwin

@pwin I think I may have seen similar problems. Could you post a small example that reproduces the error you're seeing?

joewiz avatar Jul 24 '17 15:07 joewiz

There are more problems with how special characters within xqdoc annotations get parsed

duncdrum avatar Jul 24 '17 16:07 duncdrum

Hi JoeIf I have a small sample file ('/db/apps/sports-api/example-restxq-file.xql') likexquery version "3.0";module namespace demo="http://exist-db.org/apps/restxq/demo";(:~ : List all addresses and return them as XML. :)declare    %rest:GET    %rest:path("/address")    %rest:produces("application/xml", "text/xml")function demo:addresses() {                };and scan as follows:xquery version "3.1";xqdm:scan(xs:anyURI('xmldb:exist:///db/apps/sports-api/example-restxq-file.xql'))I get an error stating that at line 9:5 there was an unexpected character '%'This is part of the restxq annotationI'm using exist-db 3.3.0 Any thoughts?Peter -----Original Message-----From: [email protected]: Mon, 24 Jul 2017 15:41:13 +0000 (UTC)To: [email protected]: Re: [wolfgangmm/eXide] Add 'generate xqdoc' (#31)@pwin I think I may have seen similar problems. Could you post a small example that reproduces the error you're seeing?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

pwin avatar Jul 25 '17 20:07 pwin

I think the formatting got mangled in your email. Let me try to get that into markdown. Is this right?

xquery version "3.0";

module namespace demo="http://exist-db.org/apps/restxq/demo";

(:~ : List all addresses and return them as XML. :)

declare 
    %rest:GET
    %rest:path("/address")    
    %rest:produces("application/xml", "text/xml") 
function demo:addresses() {
    <addresses>
        <myaddress/>
    </addresses>
};

And:

xquery version "3.1";

xqdm:scan(xs:anyURI('xmldb:exist:///db/apps/sports-api/example-restxq-file.xql'))

Did I get that correctly?

joewiz avatar Jul 26 '17 01:07 joewiz

 Yes.Any typical restxq function will do. The xqdoc fails at the percentage sign of the annotation-----Original Message-----From: [email protected]: Wed, 26 Jul 2017 01:48:32 +0000 (UTC)To: [email protected]: Re: [wolfgangmm/eXide] Add 'generate xqdoc' (#31)I think the formatting got mangled in your email. Let me try to get that into markdown. Is this right? xquery version "3.0";

module namespace demo="http://exist-db.org/apps/restxq/demo";

(:~ : List all addresses and return them as XML. :)

declare %rest:GET %rest:path("/address")
%rest:produces("application/xml", "text/xml") function demo:addresses() { }; And: xquery version "3.1";

xqdm:scan(xs:anyURI('xmldb:exist:///db/apps/sports-api/example-restxq-file.xql')) Did I get that correctly?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

pwin avatar Jul 26 '17 06:07 pwin