W3C home > Mailing lists > Public > public-media-fragment@w3.org > March 2009

Re: More syntax issues

From: Yves Lafon <ylafon@w3.org>
Date: Fri, 27 Mar 2009 09:19:17 -0400 (EDT)
To: Jack Jansen <Jack.Jansen@cwi.nl>
cc: Media Fragment <public-media-fragment@w3.org>
Message-ID: <Pine.LNX.4.64.0903270916030.16786@ubzre.j3.bet>
On Thu, 26 Mar 2009, Jack Jansen wrote:

> Another possible issue with the syntax:
> xywhunit allows "%" or "pixel" as production, and since xywhunit itself is 
> optional, this gives us the following ways to specify spatial fragments 
> (ignoring aspect, for now):
>
> 	xywh=10,20,30,40
> 	xywh=pixel:10,20,30,40
> 	xywh=%:10,20,30,40
>
> The last one looks weird: if I'm reading this I'm expecting a percent-escaped 
> string but it isn't. According to our grammar there's no problem (pct-encoded 
> isn't allowed here) but I can imagine that it could lead to implementation 
> problems (if people do percent-escape processing on the URL early). I think I 
> would be in favor of spelling out "percent".

Very good catch! Thanks Jack!
Yes indeed % is not allowed there, and escaping it would be more confusing 
than anything else. I vote also for 'percent'.


> A somewhat related issue is with utf8string (in addition to the more serious 
> issue with single quote I noted in a previous mail): because it consists of a 
> sequence of pchar it is allowed to use sub-delims in there. My fragment 
> parser starts by splitting the fragment on '&', then splitting the results of 
> these on '=', then parsing the resulting (prefix, value) lists with regular 
> expressions. This failed when I got
>
> 	id='a&b'
>
> Again, according to the syntax there is no problem, but for implementations 
> we might make life easier if inside utf8string we would disallow sub-delims.

We could, but as you say it's implementation dependant, for instance you 
may first extract the strings, then split instead of doing the split and 
get the arguments. But it wouldn't be a huge issue to teach people to 
%-encode most of what's in the UTF8-string.

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Friday, 27 March 2009 13:19:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 21 September 2011 12:13:32 GMT