[whatwg] New URL Standard

David Sheets kosmo.zb at gmail.com
Mon Sep 24 18:03:58 PDT 2012


On Mon, Sep 24, 2012 at 5:23 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 24 Sep 2012, David Sheets wrote:
>>
>> Is there an issue with defining WHATWG-URL syntax as a grammar extension
>> to the URI syntax in RFC3986?
>
> In general, BNF isn't very useful for defining the parsing rules when you
> also need to handle non-conforming content in a correct manner. Really it
> is only useful for saying whether or not content is conforming.

Your conforming WHATWG-URL syntax will have production rule alphabets
which are supersets of the alphabets in RFC3986. This is what I
propose you define and it does not necessarily have to be in BNF
(though a production rule language of some sort probably isn't a bad
idea).

If you read my mail carefully, you will notice that I address the
non-conforming identifier case in the initial canonicalization
algorithm. This normalization step is separate from the syntax of
conforming WHATWG-URLs and would define how non-conforming strings are
interpreted as conforming strings. The parsing algorithm then provides
a map from these strings into a data structure.

Error recovery and extended syntax for conforming representations are
orthogonal.

How will WHATWG-URLs which use the syntax extended from RFC3986 map
into RFC3986 URI references for systems that only support those?



More information about the whatwg mailing list