Procesing requirements

Hi working group members,

I have hacked a bit at the spec and would like feedback. I have "been  
bold", to use a Wikipedia phrase, so I expect that not everyone will agree  
with everything. I would have preferred to put this on a branch and not  
commit it directly, but it seems there's no cvs web interface through  
which you could have seen that. I will revert any changes that meet  
objections if we can't agree on an alternative solution quickly.

This is what I've done:

http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#processing-name-value-components
http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#processing-name-value-lists

Note the new reference to ECMAScript, which is the best definition of how  
to decode percent-encoding I could find. I think this *should* be defined  
in the URI spec, but it isn't, so this is the next best thing. The upside  
is that it is by definition compatible with decodeURIComponent, which  
means that implementing the name-value parser in Javacript is trivial.

I've tried to make the name-value component parsing as close as possible  
to existing server-side languages, having set up and run tests on PHP,  
CGI.pm, JSP (Apache Tomcat implementation), ASP (VBScript) and ASP.NET  
(C#). One particular side-effect of this is that the names are also  
percent-encoded, even though MF strictly speaking has no need for this.  
This is just a processing requirement though, we can still make it invalid  
to use percent-encoding where it isn't needed (in fact I think the URI  
spec may already say this).

We might still have to discuss if we want to tolerate some invalid  
percent-encoding and if non-UTF-8 encodings should be possible. (I think  
both are a bad idea.)

In order to write these sections, I needed to break apart the ABNF section  
to make each production linkable. Since other W3C specs seem to use EBNF I  
did this too, which amounted to replacing / with |. If you would rather  
use ABNF I can change that back. Pay special attention to the note at
http://www.w3.org/2008/WebVideo/Fragments/WD-media-fragments-spec/#fragment-structure

Effectively I have broken the connection that existed before between the  
name-value syntax and the syntax of each dimension. We need to go over the  
validity constraints and make sure that they still make sense.

Plenty of cleanup to the ABNF is possible (e.g. the *prefix productions  
are quite useless now), but I've left everything for now. Also, utf8string  
isn't needed, as percent-encoding takes care of whitespace and mandatory  
single quotes aren't really useful as far as I can see.

I hope this reorganization will help when we define how to process some  
HTTP headers, i.e. that we can reuse the #processing-name-value-lists  
algorithm.

I marked some sections that only contained discussion non-normative.

P.S. Should I add my name to the contributor list, or does that have some  
special meaning?

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Sunday, 17 January 2010 13:29:58 UTC