W3C home > Mailing lists > Public > www-validator@w3.org > July 2012

Re: [VE][html5] Bad value Content-Type for attribute http-equiv on XHTML element meta

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 23 Jul 2012 21:13:57 +0300
Message-ID: <500D9465.9010807@cs.tut.fi>
To: Ralph Ritoch <rritoch@gmail.com>
CC: www-validator@w3.org
2012-07-23 20:48, Ralph Ritoch wrote:

> The following error does not make sense
>
> Error Line 8, Column 81: Bad value Content-Type for attribute http-equiv
> on XHTML element meta.
>
> …eta http-equiv="Content-Type" content="application/xhtml+xml; />

I suppose you mean

<meta http-equiv="Content-Type" content="application/xhtml+xml" />

(otherwise a different error message is issued).

The message might be somewhat obscure, but it corresponds to the HTML5 
draft. So any complaints should be directed to people working on HTML5 
rather than to the validator. Reference:
http://www.w3.org/TR/html5/the-meta-element.html#pragma-directives

In effect, HTML5 allows such a tag only as a legacy way of specifying 
character encoding.

> These documents are being served with the actual content type of
> application/xhtml+xml but for archival purposes it makes sense to keep
> the meta content type representing this state.

The way in which a document is served is not logically a property of the 
document itself. I suppose this is at least part of the reason for 
rejecting the meta tag in question in HTML5.

> Because of this error,
> the only way to validate the document may be to remove the content type
> from but in doing so you lose the mime type on most current operating
> systems since few filesystems associate files with mime types.

Well, you can always just ignore the error message if you like. There is 
really no army or even police force to *enforce* HTML5 rules.

Declaring the content type inside the document would only help to 
specify that the document is supposed to be sent as 
application/xhtml+xml rather than some other media type for (X)HTML. 
(And this would appear to be futile.) It could not help in classifying a 
file as (X)HTML, since a program must first decide that the content is 
(X)HTML, before it can recognize the meta tag.

Yucca
Received on Monday, 23 July 2012 18:14:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 July 2012 18:14:34 GMT