[Bug 5642] Errors with W3 Validator

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

           Summary: Errors with W3 Validator
           Product: Validator
           Version: 0.8.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Templates
        AssignedTo: dave.null@w3.org
        ReportedBy: NTICompass@gmail.com
         QAContact: www-validator-cvs@w3.org


I have found 2 errors with the validator when trying to validate my XHTML 1.1
website.

The first error I found is with the MIME type check.  This warning is printed
if my page is not being served as application/xhtml+xml:

"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"

I have this code at the top of my webpage as per the link associated with the
error (http://juicystudio.com/article/content-negotiation.php):

header("Vary: Accept");
if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") === FALSE){
        header("Content-type: text/html");
}
else{
        header("Content-type: application/xhtml+xml");
}

If I remove the if statement and just put header("Content-type:
application/xhtml+xml"), it works fine.

The second error is with the <html> tag.  According to the XHTML 1.1
documentation (http://www.w3.org/TR/xhtml11/conformance.html#strict),
"xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"" is required
to be in the <html> tag, but the validator says "there is no attribute
"xsi:schemaLocation"".

These are only minor bugs, but I want to make sure that the validator follows
the documentation.

Received on Monday, 14 April 2008 19:57:13 UTC