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

[Bug 22] Custom DTDs always treated as SGML (vs. XML).

From: <bugzilla@wiggum.w3.org>
Date: Fri, 16 Mar 2007 12:55:15 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1HSBxj-0007BS-K9@wiggum.w3.org>


ot@w3.org changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

------- Comment #8 from ot@w3.org  2007-03-16 12:55 -------
rewriting the parse mode selection routine entirely fixes this.

has the CVS diff for the refactoring.

The logic goes:
* if neither content type nor doctype are helpful, 
  => throw warning, use SGML as fallback
* in case of an unknown doctype but useful mime type 
  (generally, XML mime type)
  => follow the mime type
* in case of an ambiguous mime type (text/html) but well-known doctype
  (any HTML served as text/html...)
  => follow the doctype 
* if neither are ambiguous, but they collide
  => throw warning, follow the mime type

This was tested with the documents in the catalogue, documents outside the
catalogue (custom DTDs), document served with the wrong mime type (XHTML 1.1 as
text/html, html 4.01 as application/xhtml+xml etc.) successfully, see:

Considering this fixed. If reopening, please provide clear test cases, thank
Received on Friday, 16 March 2007 12:55:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:21 UTC