Re: [basex-talk] I am confused how to specify multiple possible reponses in RestXQ with %rest:produces

2020-05-12 Thread Christian Grün
Ok, I have done some further minor edits.

Everyone… Edits in our Wiki are welcome. Feel free to get an account!


On Tue, May 12, 2020 at 12:33 PM Omar Siam  wrote:
>
> That is much better now.
>
> There are two further improvement: I think %rest:consumes and
> %rest:produces can be specified pretty much alike so for both the
> statement "Multiple types can either be specified by a single or by
> multiple annotations." is true. Unfortunately you only say that in the
> subparagraph about Pruducing Data. If I only care about Consuming Data
> right now I probably will not read this.
>
> Besides the example for consuming data really needs a function parameter
> else I would start wondering by what magic the content I send in the
> body is represented in the function.
>
> Best regards
>
> Omar Siam
>
> Am 11.05.2020 um 18:31 schrieb Christian Grün:
> > Hi Omar,
> >
> > Your question was if multiple mime types need to be specified via a
> > single or multiple annotations, right?
> >
> > I have added some examples to the Content Negotiation section; I hope
> > it’s more comprehensible now.
> >
> > Hope this helps,
> > Christian
> >
> >
> >
> > On Mon, May 11, 2020 at 3:54 PM Omar Siam  wrote:
> >> Hi,
> >>
> >> Today someone on the exist-open mailing list pointed out how they
> >> interpret %rest:produces: If your function produces more types of
> >> responses you specify all mime types just the same as with
> >> %rest:consumes: %rest:poroduces("application/xml", "application/json",
> >> ...) That is as a list of possible reponses all in one annotation.
> >>
> >> The BaseX docs at https://docs.basex.org/wiki/RESTXQ#Content_Negotiation
> >> however are ambigous about this I think. There is an example there with
> >> just two %rest:produces annotations on two lines with only one mime type
> >> (and a qs value). I think that lead me to belief that to specify
> >> multiple possible responses of different mime types you repeat
> >> %rest:produces.
> >>
> >> Rereading the section these two example annotations could also ilustrate
> >> the use of %rest:produces in two different functions.
> >>
> >> Can you please clarify this if possible?
> >>
> >> Best regards
> >>
> >> Omar Siam


Re: [basex-talk] I am confused how to specify multiple possible reponses in RestXQ with %rest:produces

2020-05-12 Thread Omar Siam

That is much better now.

There are two further improvement: I think %rest:consumes and 
%rest:produces can be specified pretty much alike so for both the 
statement "Multiple types can either be specified by a single or by 
multiple annotations." is true. Unfortunately you only say that in the 
subparagraph about Pruducing Data. If I only care about Consuming Data 
right now I probably will not read this.


Besides the example for consuming data really needs a function parameter 
else I would start wondering by what magic the content I send in the 
body is represented in the function.


Best regards

Omar Siam

Am 11.05.2020 um 18:31 schrieb Christian Grün:

Hi Omar,

Your question was if multiple mime types need to be specified via a
single or multiple annotations, right?

I have added some examples to the Content Negotiation section; I hope
it’s more comprehensible now.

Hope this helps,
Christian



On Mon, May 11, 2020 at 3:54 PM Omar Siam  wrote:

Hi,

Today someone on the exist-open mailing list pointed out how they
interpret %rest:produces: If your function produces more types of
responses you specify all mime types just the same as with
%rest:consumes: %rest:poroduces("application/xml", "application/json",
...) That is as a list of possible reponses all in one annotation.

The BaseX docs at https://docs.basex.org/wiki/RESTXQ#Content_Negotiation
however are ambigous about this I think. There is an example there with
just two %rest:produces annotations on two lines with only one mime type
(and a qs value). I think that lead me to belief that to specify
multiple possible responses of different mime types you repeat
%rest:produces.

Rereading the section these two example annotations could also ilustrate
the use of %rest:produces in two different functions.

Can you please clarify this if possible?

Best regards

Omar Siam


[basex-talk] I am confused how to specify multiple possible reponses in RestXQ with %rest:produces

2020-05-11 Thread Omar Siam
Hi,

Today someone on the exist-open mailing list pointed out how they
interpret %rest:produces: If your function produces more types of
responses you specify all mime types just the same as with
%rest:consumes: %rest:poroduces("application/xml", "application/json",
...) That is as a list of possible reponses all in one annotation.

The BaseX docs at https://docs.basex.org/wiki/RESTXQ#Content_Negotiation
however are ambigous about this I think. There is an example there with
just two %rest:produces annotations on two lines with only one mime type
(and a qs value). I think that lead me to belief that to specify
multiple possible responses of different mime types you repeat
%rest:produces.

Rereading the section these two example annotations could also ilustrate
the use of %rest:produces in two different functions.

Can you please clarify this if possible?

Best regards

Omar Siam