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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

>On Tue, 12 Aug 2003, Frank Ellermann wrote:
>
><URL:http://validator.w3.org/check?uri=http%3A%2F%2Ffrank.ellermann.bei.
>t-online.de%2Fhome%2Ftest%2Fx1.htm&charset=iso-8859-15+%28Latin+9%29
>&doctype=HTML+3.2&verbose=1>
>
>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>
  2:
  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"> -->
  5:
  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
>menu.

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.

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.2

iQA/AwUBPzkKYKPyPrIkdfXsEQLoFgCfWI9lhC8xkAhvoQEg4LVw05eTEnQAoN0d
kFEFDgZq4CUoC2AsQ3a4n0L3
=EDsb
-----END PGP SIGNATURE-----

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