- From: Marc Portier <marc.portier@gmail.com>
- Date: Fri, 09 Sep 2011 08:34:12 +0200
- To: "Roy T. Fielding" <fielding@gbiv.com>
- CC: URI <uri@w3.org>
On 09-09-11 00:27, Roy T. Fielding wrote: > On Sep 6, 2011, at 3:49 PM, Roy T. Fielding wrote: >> On Sep 5, 2011, at 12:54 AM, Robbie Gates wrote: >>> I don't understand why the expansions of ? and& include list= for >>> each entry when exploded. The description of the handling for the case >>> of an exploded list makes no mention of the use of the name, and there >>> is no separate section (as there is for the unexploded case). Also, >>> the table makes ; the same as ? and& for named, and yet their >>> handling appears different. The descriptions in 3.2.7 and 3.2.8 / >>> 3.2.9 are likewise similar. In short, i can't see why the examples >>> differ, given the rest of the document, i was expecting >>> >>> {?list*} ?red&green&blue >>> {&list*}&red&green&blue >> >> Hi Robbie, >> >> Yes, you are right -- that is a bug in the new algorithms that >> I added for draft 06. I'll work on a fix. > > Actually, after having tried a fix to the algorithm, I think it > would be more useful to have the result you expect above (and it > would simplify the algorithm). That also would provide a means > to define value-only parameters in the query component, which has > been requested in a private discussion. > Can't say I have a problem with it, but surely the current approach has a very logic reason of existence, no? Following the principle of least surprise (from a uri-template user point of view, not from the implementation side) I would guess the current expansion {?list} ?list=red,green,blue' {?list*} ?list=green&list=red&list=blue is on the side of 80% of the expectations, no? So at the least we make sure this keeps being possible, and (assuming we find a way to provide both renditions) even would be the result of the more naive & spontaneous use of the templates? Of course, I do remember how I ended up finding the ;red;green;blue a quirk expansion compared to ;list=red;list=green;list=blue (the opposite case?) So why not think about having both just more explicit by declaring two kinds of 'explodes' one 'named' (*), the other 'unnamed' (% maybe?) then {?list} ?list=red,green,blue {?list*} ?list=green&list=red&list=blue {?list%} ?green&red&blue {;list} ;list=red,green,blue {;list*} ;list=green;list=red;list=blue {;list%} ;green;red;blue yielding even less surprises? -marc= > ....Roy > >
Received on Friday, 9 September 2011 06:34:52 UTC