W3C home > Mailing lists > Public > www-validator@w3.org > September 2014

Re: Will not accept DOCTYPE statement

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 21 Sep 2014 14:57:42 +0300
Message-ID: <541EBD36.1080308@cs.tut.fi>
To: www-validator@w3.org
2014-09-21 12:59, Steve Faulkner wrote:

> what is the error?

The error message was “DTD did not contain element declaration for 
document type name”. (I had to look it up in the archives, as I did not 
see the original message in the list, for some reason.)

The problem with the page,
http://cis.sac.alamo.edu/~rdevore/mfc/default.shtml
is just that the DOCTYPE declaration contains “HTML” in upper case. It 
must be

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
		  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

The reason is that XHTML is case-sensitive with element names, so the 
DOCTYPE declares the root element as “HTML”, but no such element is 
defined in the DTD.

Yucca
Received on Sunday, 21 September 2014 11:58:12 UTC

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