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

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 UTC