W3C home > Mailing lists > Public > public-html@w3.org > November 2007

Format for type attribute value

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 19 Nov 2007 14:07:36 +0200
Message-Id: <452D8905-CC1F-42D9-8D01-B47DE8942BD9@iki.fi>
To: "public-html@w3.org List" <public-html@w3.org>

Quoting the spec:
> The type attribute gives the MIME type of the linked resource. It is  
> purely advisory. The value must be a valid MIME type, optionally  
> with parameters. [RFC2046]

For attributes that take "a valid MIME type, optionally with  
parameters", the spec references RFC 2046. I think this normative  
reference doesn't meet the level of quality expected of HTML5.

First, the syntax spec is awfully fragmented. First one has to follow  
a normative reference to RFC 2045. Then one has to look up additional  
rules from the future from RFC 2822. Moreover, the syntax doesn't  
define the syntax for MIME types as such. Instead, it defines the  
entire Content-Type header for Internet email.

The syntax for the entire header is gratuitously complex: white space  
is allowed between tokens in surprising places and there's even syntax  
for comments hidden in the specs! Preliminary evidence from #whatwg  
suggests that the full syntax is not interoperably implemented in the  
browser context.

Also, the requirement for the MIME type to be "valid" is problematic,  
because the registration mechanism is dysfunctional. Requiring  
conformance checkers to know about the IANA registry for e.g. language  
tags is feasible (and implemented :-). However, it would be unhelpful  
to flag unregistered MIME types as HTML5 conformance errors, since  
unregistered types are commonly used interoperably on the Web.

It seems to me that the spec should refer to section 3.7 of RFC 2616  
instead. I also suggest not implying that HTML5 conformance depended  
on the IANA media type registry.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Monday, 19 November 2007 12:07:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:09 GMT