W3C home > Mailing lists > Public > www-validator@w3.org > January 2000

Explicitly closing implicitly opened elements (was: validator bug?)

From: Terje Bless <link@tss.no>
Date: Sat, 29 Jan 2000 05:09:00 +0100
Message-Id: <200001290426.FAA15010@vals.intramed.rito.no>
To: W3C Validator <www-validator@w3.org>
cc: Ben Fowler <ben@leedsnet.com>
On 27.01.00 at 01:37, Ben Fowler <ben@leedsnet.com> wrote:

>This is caught by weblint, but the validator does not complain. I know
>that the <BODY> tag is optional, but is there a reason why the </BODY> tag
>is not flagged as closing tag found for element which not open?

The BODY element was implicitly opened somewhere after the end of the HEAD
element. Probably by a block-level element like P, DIV, or TABLE.

>Nevertheless this seems to be problematic to me: if either tag is present
>then both should be!

I agree, but I'm unsure if this can, or even should, be reported by the
Validator as I suspect this is perfectly valid in SGML. At least insofar
that I don't think it is possible to specify this requirement in a DTD.
This would, of necessity, place the burden of detecting this problem with
Weblint or similar programs.

You should be aware that even though all valid HTML will pass validation,
not all HTML that passes validation is valid HTML. The HTML Reccomendation
expresses certain limitations that are impossible to express in a SGML DTD.

IIRC, there is also one or more obscure issues with certain things being
explicitly allowed by the HTML Reccomendation that are not valid SGML.
Something to do with values that cannot exceed a certain limit in SGML but
which are necessary for proper i18n of HTML. UNICODE has more code points
then are allowed in a particular kind of SGML value (~65K IIRC) or some
such nonsense. I believe the W3C HTML Validation Service is explicitly
ignoring these warnings from SP (nsgmls, the SGML parser we use).
Received on Friday, 28 January 2000 23:27:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:15 UTC