Re: HTML 4.0 Validation

Marie Taylor-Harper <marie@voyager.atc.fhda.edu> wrote:

>Terje Bless wrote:
>
>>Marie Taylor-Harper <marie@voyager.atc.fhda.edu> wrote:
>>
>>>I recently noticed that when they validate a HTML 4.0 document (not
>>>Transitional) that the validator only returns the first invalid
>>>occurance of a syntax error whereas when a HTML 4.0 Transitional
>>>document is validated, the validator returns ALL syntax errors
>>>regardless of repitition.
>>
>>To the best of my knowledge, this is not how the Validator behaves. Do
>>you have an URL [...] that demonstrates this problem?
>
>I am including the url of the validation along with the url of the actual
>web page of one of my students. <URL:http://validator.w3.org/check?uri=http%3A%2F%2Fvoyager.atc.fhda.edu%2F%7Emml29081%2Fexercises%2Fexercise3%2Fsafety.html&ss=>.
>[...]
>Even though these [attribute errors] are repeated thoughout the graphical
>navigation bar, the errors only appear once in the validation report.

This appears to be a bug in the SGML Parser, or some "feature" of SGML that
I'm not aware of. I can reproduce this in SP, OpenSP, and lq-nsgmls. I'll
take it up with the OpenSP people and see if they can shed any light on it.

The following minimal document illustrates the problem and is not specific
to either Strict or Transitional AFAICT.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
  <head><title>Title</title></head>
  <body>
    <div>
      <img src="foo.png" alt="alt" broder="0">
      <img src="foo.png" alt="alt" vspock="0">
      <img src="foo.png" alt="alt" broder="0">
      <img src="foo.png" alt="alt" vspock="0">
    </div>
  </body>
</html>

The first two bogus attributes are reported, but the two latter aren't.
It looks like only the first occurence of a specific undefined attribute
is reported. The commandline and stderr of onsgmls:

% onsgmls -E0 -c catalog HTML4.decl wtf.html >>/dev/null
onsgmls:wtf.html:6:42:E: there is no attribute "BRODER"
onsgmls:wtf.html:7:42:E: there is no attribute "VSPOCK"
% 

Anyone want to venture a guess as to what's going on here?

Received on Wednesday, 28 February 2001 01:45:44 UTC