W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2007

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

From: <bugzilla@wiggum.w3.org>
Date: Mon, 15 Oct 2007 06:14:13 +0000
CC:
To: www-validator-cvs@w3.org
Message-Id: <E1IhJDR-0006MG-25@wiggum.w3.org>

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

           Summary: warning about nonexistent content-type for XHTML 1.1
                    doctype with html mime type
           Product: Validator
           Version: 0.8.2
          Platform: Macintosh
               URL: http://www.enhanceability.com/strategies/7X05.html
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Types Registry
        AssignedTo: dave.null@w3.org
        ReportedBy: ron@enhanceability.com
         QAContact: www-validator-cvs@w3.org


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.

That the '.html' file extension (mime type) is used for an XHTML 1.1 doctype
doesn't mean that the 'content-type' is 'text/html'.


--- begin w3c validator warning v0.8.2
'http://validator.w3.org/check?uri=http%3A%2F%2Fwww.enhanceability.com%2Fstrategies%2F7X05.html'---

Conflict between Mime Type and Document Type
The document is being served with the text/html Mime Type which is not a
registered media type for the XHTML 1.1 Document Type. The recommended media
type for this document is: application/xhtml+xml

Using a wrong media type for a certain document type may confuse the validator
and other user agents with respect to the nature of the document, and you may
get some erroneous validation errors. How to fix this problem? One of the
following techniques should help:

If you are serving a static file on a Web server, changing its extension should
help. Use e.g .xhtml for XHTML or .mathml for MathML.
You may need to reconfigure your Web server. This Setting up MIME Types
tutorial has instructions for Apache, Tomcat and IIS.
If the document is generated dynamically, the scripting language should allow
you to set up the mime type: this article on MIME Types and Content Negotiation
has examples in PHP, Perl, and ASP.

--- end w3c validator warning v0.8.2
'http://validator.w3.org/check?uri=http%3A%2F%2Fwww.enhanceability.com%2Fstrategies%2F7X05.html'
--- 


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.

Ideally, it would be nice to be able to code xhtml1.1 'application/xhtml+xml'
Media Type documents with .xhtml or .xht file extensions so that those
documents could be displayed by current version browsers.

And wouldn't the same steps for configuring web servers to serve .xhtml or .xht
files also be able to accommodate the serving of documents with .xml file
extensions? 

Given the constantly changing web, shouldn't the browsers and servers be
mapped/filtered/parsed so that webmasters can decide which file extensions to
use, especially if the documents validate to the standards?

Ron
Received on Monday, 15 October 2007 06:14:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:59 GMT