[Bug 5197] warning about nonexistent content-type for XHTML 1.1 doctype with html mime type

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5197


ot@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from ot@w3.org  2007-10-15 06:21 -------
(In reply to comment #0)
> The URL 'http://www.enhanceability.com/strategies/7X05.html' contains the
> following types:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> 
> <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8"
> />
> 
> 
> Because the document is valid XHTML 1.1 and also because the 'http-equiv'
> 'content-type' ACTUALLY IS "application/xhtml+xml", this looks like a validator
> bug.

No. 
- what the validator is talking about is the HTTP Content-Type header
- the HTTP Content-Type header always has precedence over the <meta>
information (which, at least for the media type, some might argue is plain
useless).

$ HEAD http://www.enhanceability.com/strategies/7X05.html
200 OK
Connection: close
Date: Mon, 15 Oct 2007 06:19:39 GMT
Accept-Ranges: bytes
ETag: "9edb46-3d8e-4702a77f"
Content-Length: 15758
Content-Type: text/html
Last-Modified: Tue, 02 Oct 2007 20:18:07 GMT
Client-Date: Mon, 15 Oct 2007 06:19:45 GMT
Client-Peer: 216.39.58.63:80
Client-Response-Num: 1




> At the same time, are browsers and web servers ready for '.xhtml', '.xht', or
> '.xml' file extensions? Some preliminary tests show some inconsistent results
> for more than a few recent version browsers.

Extensions don't matter, and servers can be configured. Browsers are another
story, and indeed serving XHTML as application/xhtml+xml doesn't work for IE.

If you don't need ruby annotation, stick to XHTML 1.0 (which can be served as
text/html, although browsers will then parse it as "legacy" HTML) or HTML 4.01.

Received on Monday, 15 October 2007 06:21:57 UTC