Re: URLs in HTML5

Dan Brickley wrote:
> 
> Anne van Kesteren wrote:
>>
>> Re: http://www.w3.org/2001/tag/2008/09/23-minutes#item08
>>
>> HTML5 does define what a valid URL is versus how it should be parsed 
>> by user agents. Also, a valid URL is either a "valid" URI reference or 
>> "valid" IRI reference. Specifically, valid URL does not allow more 
>> productions than RFC3986 and RFC3987 do.
>>
>> http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#valid-url 
>> has the details.
> 
> Interesting. Does this mean that URNs are URLs now? That'll be a fun one 
> to explain :)

URNs are URIs (see RFC3986, Section 1.1.3). The term URL, as used in 
HTML5, refers to URIs and IRIs; so this is not really a change from HTML 
4.01 (which said "URI").

The problems with HTML5's definition of "URL" are IMHO:

- potentially causes confusion by using the term "URL"

- makes validity of URLs dependent on the document encoding they appear in

- uses the wrong approach for explaining how to handle invalid stuff 
(the prose currently suggests extending the RFC3986/7 grammar 
productions, while a simple mapping would be poissible without ever 
talking about those productions)

BR, Julian

Received on Saturday, 11 October 2008 10:58:12 UTC