Hi Omar,
Thanks for the reminder. Yes, we still plan to improve support for quality factors in our RESTXQ implementation. We’ll probably need to find out how this has been resolved in JAX-RS, and define an equivalent solution for RESTXQ. I have updated the initial comment in Issue 1220 [1].
I am also passing this on to Adam Retter, the initiator of RESTXQ: Adam, did you think about adding support for quality factors in the RESTXQ implementation of eXist-db?
And, Omar, I assume you would like to have chosen the function that matches the first content types given in the Accept header?
Thanks everyone, Christian
[1] https://github.com/BaseXdb/basex/issues/1220
On Tue, Jul 4, 2017 at 1:17 PM, Omar Siam Omar.Siam@oeaw.ac.at wrote:
Hi list!
I like my oXygen editor to request raw XML data from my RESTxq endpoints to test XSL stylesheets. When I do this with RESTxq paths that have different %rest:produces it fails with the BASX0003 multiple functions error.
Turns out oXygen sends application/xml, */* as Accept header without any quality.
I understand that as documented in https://github.com/BaseXdb/basex/issues/1220 this is known not to work.
My/our workaround is to branch in a single XQuery function using sth. like: if (some $a in tokenize(request:header("ACCEPT"), ',') satisfies $a = ('text/xml', 'application/xml')) then $xml else $xhtml
I hope this is still on the agenda for 8.7.
Best regards
Omar Siam