Re: Validation error frequencies

On Feb 1, 2008, at 01:52, Sam Ruby wrote:

> Henri Sivonen wrote:
>> I think we should allow the old internal encoding declaration  
>> syntax for text/html as an alternative to the more elegant syntax.  
>> Not declaring the encoding is bad, so we shouldn't send a negative  
>> message to the authors who are declaring the encoding. Moreover,  
>> this is interoperable stuff.
>> I think we shouldn't allow this for application/xhtml+xml, though,  
>> because authors might think it has an effect.
>
> By that reasoning, a meta charset encoding declaration should not be  
> allowed if a charset is specified on the Content-Type HTTP header.

No, by this reasoning it should be an error if the external and  
internal declaration disagree.

[...]
> Serving XHTML as text/html, with BOTH a charset specified on the  
> HTTP header AND a meta charset specified just in case is more common  
> than you might think.

I'm quite aware that it is common. I wasn't suggesting that it weren't.

[...]
> A much more useful restriction -- spanning both the HTML5 and XHTML5  
> serializations -- would be to issue an error if multiple sources for  
> encoding information were explicitly specified and if they differ.

I agree. I had already implemented this as a warning on the XML side.  
(Not as an error because I'm not aware of any spec that I could  
justify for calling it an error.)

I had forgotten to do the same on the text/html side. Now fixed.  
Thanks for reminding me. (Again, only a warning because the spec does  
not make this condition an error at the moment.)

While I was at it, I noticed that the spec (as well as Gecko) don't  
require http-equiv='content-type' when looking for a content attribute  
that looks like an internal encoding declaration. Therefore, I also  
added a warning that fires if the value of a content attribute would  
be sniffed as an internal character encoding declaration but a http- 
equiv='content-type' is missing.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Monday, 11 February 2008 15:48:12 UTC