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

RE: doctype placement

From: Brian Gilkison <gilkison@one.net>
Date: Mon, 26 Jul 1999 17:59:13 -0400
To: <www-validator@w3.org>
Message-ID: <NABBLPCLGCEADCFDBEICAEHKCEAA.gilkison@one.net>
Sorry, I forwarded my response to the wrong address; see my comments
below...

-----Original Message-----
From: Brian Gilkison [mailto:gilkison@one.net]
Sent: Sunday, July 25, 1999 6:33 PM
To: irons@apple.com
Cc: www-validator-request@w3.org
Subject: RE: doctype placement


> I can't find anything in the HTML 4.0 spec to indicate that the
> validator is doing the right thing.  In fact, when the subject came up
> on the mhonarc list, its author cited the spec in his defense:

The author has cited the correct location in the spec, but he left out the
details (what he is citing can be found at
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.1)

>     7.1 Introduction to the structure of an HTML document
>
>     An HTML 4.0 document is composed of three parts:
>     1. a line containing HTML version information,
>     2. a declarative header section (delimited by the HEAD element),
>     3. a body, which contains the document's actual content. The body
>         may be implemented by the BODY element or the FRAMESET element.

Line 1 is, in fact, the <!DOCTYPE ...> definition itself
(http://www.w3.org/TR/REC-html40/struct/global.html#version-info).

>     White space (spaces, newlines, tabs, and comments) may appear
>     before or after each section. Sections 2 and 3 should be
>     delimited by the HTML element.

The fact that the spec indicates that sections 2 and 3 are delimited by the
<HTML> element also implies that the <!DOCTYPE> comes first.  Farther down
the page (http://www.w3.org/TR/REC-html40/struct/global.html#h-7.3), the
spec goes on to state, "After document type declaration, the remainder of an
HTML document is contained by the HTML element."  Once again, indication
that the DOCTYPE comes first.


> >From where I stand, the validator is exhibiting a bug, and I'm not sure
> what's involved in fixing it.

Still not a bug, no fixing needed :).  No offense toward the creators of
MHonArc, but this is yet another instance of an HTML editor imposing what it
thinks is good style, but is unfortunately, accomplished incorrectly.

Brian Gilkison
gilkison@one.net
Received on Monday, 26 July 1999 17:59:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:52 GMT