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

Re: Suggestion: Check elment first, attribute second

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 03 Aug 2001 02:42:11 +0200
To: Christian Smith <csmith@barebones.com>
Cc: "'www-validator@w3.org'" <www-validator@w3.org>
Message-ID: <49ojmt4od5avd04919skb8mvdsrke3k8hp@4ax.com>
* Christian Smith wrote:
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>	<title>A test page</title>
><o dir="ltr">
>Opps, I goofed.
>Now, the validator will complain that there is no attribute "dir" in the
>element "o" in this version of HTML. Well, duh, there is no element "o" in
>this version of HTML ;-)

Consider this additional definition in some custom DTD:

    dir (ltr|rtl) #IMPLIED

Now the Validator would only complain about the the missing element
definition, if you also add

  <!ELEMENT o - - (#PCDATA)>

The validator wouldn't complain anymore. That's SGML Validation.

>It's not useful to report this and in some cases will make finding true
>errors harder. 

Both actually _are_ real errors and since we claim to use an SGML
Validation system, we must report such errors.
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Thursday, 2 August 2001 20:43:17 UTC

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