W3C home > Mailing lists > Public > www-validator@w3.org > August 2003

Re: DOCTYPE options on http://validator.w3.org/file-upload.html

From: Terje Bless <link@pobox.com>
Date: Tue, 12 Aug 2003 17:40:21 +0200
To: W3C Validator <www-validator@w3.org>
cc: Frank Ellermann <Frank.Ellermann@t-online.de>
Message-ID: <f02000101-1026-48E1664DCCDB11D783A10030657B83E8@[]>

Hash: SHA1

Jukka K. Korpela <jkorpela@cs.tut.fi> wrote:

>On Tue, 12 Aug 2003, Frank Ellermann wrote:
>That validation report shows that the validator _has_ recognized the
>choice of an HTML 3.2 doctype, yet complains about lack of doctype.

Well, actually, it indicates that the Validator has recognized _an_ _SGML_
DOCTYPE — and that the DOCTYPE in question was for HTML 3.2 — but that only
means it gets fed to an SGML Parser and not an XML Processor.

>Rather, it's about the validator requiring a DOCTYPE, despite having a menu
>for selecting DOCTYPE. […] So why does it mislead people by containing a
>pulldown menu for selecting DOCTYPE?

It doesn't; it's just not perhaps clear enough about what it actually does
when faced with pathological cases. Try running that URL through the beta
version of the Validator running on port 8001. In particular note error #2 and
have look at the source code surrounding that point:

2. Line 3, column 2: "DOCTYPE" declaration not allowed in instance 
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 
…and the source…

  1: <html><head>
  3: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  4: <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd"> -->
  6: </head> 

Note that a) the original DOCTYPE in line #4 is commented out, b) the new HTML
3.2 DOCTYPE was dutifully inserted in line #3, but that it doesn't matter in
the least as it was misplaced to begin with; cf. the root element occuring in
line #1.

As you can tell the current beta version will catch this problem, and that
behaviour looks like it will make it into the final release.

>If you ask me, it's that requirement that should be removed, not the

We cannot «remove that requirement» and still be an SGML Validator. You wants
SGML Validation, you plays by SGML rules. We will be slightly less strict in
the future by at least giving you the validation results — as opposed to just
bailing out when there is no DOCTYPE — but we can never pronounce a document
to be Valid unless it actually contains a Document Type Definition.

>This is especially because we know that most current browsers (ab)use
>DOCTYPE declarations. The page mentioned above contains seriously wrong
>information when it says: "Most Web browsers don't actually use an SGML
>parser (in fact, none that I'm aware of do), and so they don't need a
>DOCTYPE declaration, and will ignore it if present."

Suggested replacement text would be gratefully accepted…

- -- 
"Hath no man's dagger here a point for me?"   - Leonato, Governor of Messina.
                   See Project Gutenberg <URL:http://promo.net/pg/> for more.

Version: PGP SDK 3.0.2

Received on Tuesday, 12 August 2003 11:40:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:38 UTC