W3C home > Mailing lists > Public > public-media-fragment@w3.org > August 2010

ABNF for name-value pairs

From: Philip Jägenstedt <philipj@opera.com>
Date: Wed, 25 Aug 2010 13:18:46 +0200
To: "Media Fragment" <public-media-fragment@w3.org>
Message-ID: <op.vhzq1kllsr6mfa@philip-pc.gothenburg.osa>
Hi all,

The summer is over, when will work on the spec continue? When we left off,  
we had a bit of a standstill on the issue of parsing and error handling.  
I'm looking at perhaps making a demo implementation of MF in Opera and  
would like to get this issue hammered out. Here's a snippet of ABNF I  
wrote for myself back then for how I think the structure should be defined  
in ABNF.

# fragment from URI

name = fragment - "&" - "="
value = fragment - "&"
namevalue = name [ "=" value ]
namevalues = namevalue *( "&" namevalue )

This is equivalent to first splitting on & and then splitting again on the  
first =, which is nice and simple and matches how query strings work in  
many existing server-side languages.

Philip Jägenstedt
Core Developer
Opera Software
Received on Wednesday, 25 August 2010 11:19:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:45 UTC