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

Re: Validator complains because it cannot determine validation mode from document type

From: Karl Dubost <karl@w3.org>
Date: Fri, 6 Apr 2007 06:55:42 +0900
Message-Id: <572A6757-376A-4770-84FE-C278A85B1E26@w3.org>
Cc: www-validator@w3.org
To: Shane McCarron <shane@aptest.com>

Le 6 avr. 2007 à 00:27, Shane McCarron a écrit :
> is being served as text/html and it cannot decide how to parse it.
> document starts off with an "xml" declaration, e.g., <?xml ... ?>,  
> then the validator should assume that the document is to be  
> validated in XML mode.

huh? That would be content sniffing and against Web architecture.
The mime type has priority and for good reasons.

Imagine you want to serve the source code of this document sending it  
then as text/plain.  With the above reasoning, it would mean that we  
do not respect the intent of the author.

If you send it as text/html, it is HTML
If you send it as application/xhtml+xml it is xml

Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/
      *** Be Strict To Be Cool ***
Received on Thursday, 5 April 2007 21:56:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:01 UTC