W3C home > Mailing lists > Public > uri@w3.org > February 2003

RFC2396bis, qualified, a nit

From: Graham Klyne <GK@NineByNine.org>
Date: Wed, 26 Feb 2003 20:09:03 +0000
Message-Id: <5.1.0.14.2.20030226195813.03265ec0@127.0.0.1>
To: "Roy T. Fielding" <fielding@apache.org>
Cc: <uri@w3.org>

Ref:
[[
    hostname      = domainlabel [ qualified ]
    qualified     = *( "." domainlabel ) [ "." toplabel [ "." ] ]
    domainlabel   = alphanum [ 0*61( alphanum | "-" ) alphanum ]
    toplabel      = alpha    [ 0*61( alphanum | "-" ) alphanum ]
    alphanum      = ALPHA / DIGIT
]]

I think the syntax production 'qualified' is ambiguous (i.e. permits more 
than one parse tree for some valid values).

consider:

   .abc.def

is this
   "." <domainlabel> "." <toplabel>
or
   "." <domainlabel> "." <domainlabel>
?

I think the production could be written thus:
    qualified     = *( "." domainlabel ) [ "." toplabel "." ]

...

Looking at this raises another test case for consideration

   http://example.123./aaa/bbb#ccc

is this a relative URI or an invalid URI?  I think the syntax says it's 
relative.

#g


-------------------
Graham Klyne
<GK@NineByNine.org>
Received on Wednesday, 26 February 2003 19:14:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT