mailman.uni-konstanz.de
Sign In Sign Up
  • Sign In
  • Sign Up
  • Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

2025

  • July
  • June
  • May
  • April
  • March
  • February
  • January

2024

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2023

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2022

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2021

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2020

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2019

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2018

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2017

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2016

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2015

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2014

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2013

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2012

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2011

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January

2010

  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
List overview
Download
thread

None

None
28 Jan 2025 28 Jan '25
9:38 a.m.

parameter applies only where wrap=3Dyes (it is ignored when wrap=3Dno)

output does allow media-type to be specified...interestingly, the spec you refer to says the media-type can contain a value in line with RFC2046, that RFC happens to include textual media-types as well (e.g., text/plain) as XM= L media-types. So, I would propose to use a) the situation as it is today (wrap=3Dno, wrap=3Dyes dictating whether jax-rx:result and jax-rx:results are used to wrap) but also b) to be able to override the media-type independently of wrap parameter's value using output=3Dmedia-type=3Dtext%2Fplain or output=3Dmedia-type=3Dapplication%2fxml for example. Whether to use text/p= lain for wrap=3Dno becomes non-critical then (because of the ability to override it) and leaving it at text/plain as default is probably fine.

Thanks.

On Mon, Jan 31, 2011 at 11:01 AM, Christian Gr=FCn christian.gruen@gmail.comwrote:

...
...

Okay, I thought setting output to application/xml but wrap=3Dno will me=

an

...

the

...

person writing the query is taking the responsibility that they do not

want

...

results to be wrapped but know the result is xml so forcing the output =

to

...

be

...

application/xml (so that the response mime-type is set to application/x=

ml

...

in

...

this case)...what are the valid values for output parameter?

All parameters are defined in the W3 specs: http://www.w3.org/TR/xslt-xquery-serialization/

Please browse our JAX-RX docs for some usage examples: http://docs.basex.org/wiki/JAX-RX_API

...

An invocation like http://localhost:8984/basex/jax-rx?wrap=3Dno&query=3D1+to+10&output=...

ext/xmlor

...
...

http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1+to+10&output...

xt/xml

...
...

(or text%2Fxml) results in:

Yes, I see that there's some need to work on the response media type. I have two solutions in mind:

a) All textual results of "query" and "run" could be returned as application/xml, no matter what value has been assigned to "wrap". This would mean that all non-XML query results (e.g., resulting from a XQuery like "1 to 10") would be handles as XML, too.

b) This is one is similar to your approach: an additional JAX-RX parameter could be introduced to explicitly overwrite the resulting media type. Example:

http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1&media=3Dappl...

ion/xml

...

What do you, and others, think?

Both changes are not BaseX-centric, but have to be made in the JAX-RX interface, so this might take some more time; but I'll definitely add this to our internal issue tracker.

Christian

--0016e64c2a1a56ee16049b22f778 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

The scope of this posting is only xquery.<br><br>From your discussion on ou= tput parameter, it appears to me that that parameter applies only where wra= p=3Dyes (it is ignored when wrap=3Dno)<br><br>output does allow media-type = to be specified...interestingly, the spec you refer to says the media-type = can contain a value in line with RFC2046, that RFC happens to include textu= al media-types as well (e.g., text/plain) as XML media-types.<br> So, I would propose to use a) the situation as it is today (wrap=3Dno, wrap= =3Dyes dictating whether jax-rx:result and jax-rx:results are used to wrap)= but also b) to be able to override the media-type independently of wrap pa= rameter&#39;s value using output=3Dmedia-type=3Dtext%2Fplain or output=3Dme= dia-type=3Dapplication%2fxml for example.=A0 Whether to use text/plain for = wrap=3Dno becomes non-critical then (because of the ability to override it)= and leaving it at text/plain as default is probably fine.<br> <br>Thanks.<br><br><br><br><div class=3D"gmail_quote">On Mon, Jan 31, 2011 = at 11:01 AM, Christian Gr=FCn <span dir=3D"ltr">&lt;<a href=3D"mailto:chris= tian.gruen@gmail.com">christian.gruen@gmail.com</a>&gt;</span> wrote:<br><b= lockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-= left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div class=3D"im">&gt; Okay, I thought setting output to application/xml bu= t wrap=3Dno will mean the<br> &gt; person writing the query is taking the responsibility that they do not= want<br> &gt; results to be wrapped but know the result is xml so forcing the output= to be<br> &gt; application/xml (so that the response mime-type is set to application/= xml in<br> &gt; this case)...what are the valid values for output parameter?<br> <br> </div>All parameters are defined in the W3 specs:<br> =A0<a href=3D"http://www.w3.org/TR/xslt-xquery-serialization/" target=3D"_= blank">http://www.w3.org/TR/xslt-xquery-serialization/</a><br> <br> Please browse our JAX-RX docs for some usage examples:<br> =A0<a href=3D"http://docs.basex.org/wiki/JAX-RX_API" target=3D"_blank">htt= p://docs.basex.org/wiki/JAX-RX_API</a><br> <div class=3D"im"><br> &gt; An invocation like<br> &gt; <a href=3D"http://localhost:8984/basex/jax-rx?wrap=3Dno&query=3D1+= to+10&amp;output=3Dtext/xml" target=3D"_blank">http://localhost:8984/basex/= jax-rx?wrap=3Dno&amp;query=3D1+to+10&amp;output=3Dtext/xml</a> or<br> &gt; <a href=3D"http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1= +to+10&amp;output=3Dtext/xml" target=3D"_blank">http://localhost:8984/basex= /jax-rx?wrap=3Dyes&amp;query=3D1+to+10&amp;output=3Dtext/xml</a><br> &gt; (or text%2Fxml) results in:<br> <br> </div>Yes, I see that there&#39;s some need to work on the response media t= ype.<br> I have two solutions in mind:<br> <br> a) All textual results of &quot;query&quot; and &quot;run&quot; could be re= turned as<br> application/xml, no matter what value has been assigned to &quot;wrap&quot;= .<br> This would mean that all non-XML query results (e.g., resulting from a<br> XQuery like &quot;1 to 10&quot;) would be handles as XML, too.<br> <br> b) This is one is similar to your approach: an additional JAX-RX<br> parameter could be introduced to explicitly overwrite the resulting<br> media type. Example:<br> <br> =A0<a href=3D"http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1&= amp;media=3Dapplication/xml" target=3D"_blank">http://localhost:8984/basex/= jax-rx?wrap=3Dyes&amp;query=3D1&amp;media=3Dapplication/xml</a><br> <br> What do you, and others, think?<br> <br> Both changes are not BaseX-centric, but have to be made in the JAX-RX<br> interface, so this might take some more time; but I&#39;ll definitely add<b= r> this to our internal issue tracker.<br> <font color=3D"#888888"><br> Christian<br> </font></blockquote></div><br>

--0016e64c2a1a56ee16049b22f778--

0 0
Reply

Back to the thread

Back to the list

Powered by HyperKitty version 1.3.7.