W3C home > Mailing lists > Public > www-validator@w3.org > July 2012

validator Tidy HTML adds DTD without systemId to quirks documents.

From: Rob^_^ <iecustomizer@hotmail.com>
Date: Sun, 29 Jul 2012 12:40:02 +1000
Message-ID: <COL107-DS2554F87D81E39582E44AA6D4C70@phx.gbl>
To: "w3.org Validator List" <www-validator@w3.org>

consider this simple html document.
<p>Hello world</p>
which the w3c validator ‘Tidy html’ corrects to
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> 
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<p>Hello world</p>

which has an added DTD that has no systemId part... in the latest browser versions this is correctly rendered as document.compatMode==’BackCompat’ although each browser vendor has different interpretations as to what this means...and IE10 beta now has a “IE10 Quirks mode”

however in previous versions of FX, chrome and safari this (a dtd without a systemId) would be rendered as document.compatMode==’CSS1Compat’

In the wild I see quite a few (high volume) websites that have a DTD without a systemId eg. http://au.yahoo.com/ uses
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

but my main concern is for the novice or hobbyist website developer who validates their markup using the validator.w3.org service. (I see that validator.nu has no ‘tidy html’ options) and mistakenly copies the tidied  html verbatim to their source...

have you considered updating the Tidy HTML option output to include the systemId part in the added Document Type declaration?

re: http://www.w3.org/QA/2002/04/valid-dtd-list.html

has no mention of valid DTD’s without the systemId part.

No response is required...

Received on Sunday, 29 July 2012 07:07:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:06 UTC