Forum Moderators: open

Message Too Old, No Replies

Validators are easy to confuse!

         

Mohamed_E

2:40 pm on Dec 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By and large I have been able to understand the error messages I get from my validators (HTML-Tidy and w3c.org). But today I was really stumped.

On a file both gave me different error messages, neither set of which made any sense to me. HTML-Tidy complained of a missing </div>, and later of an unmatched </div>. w3c.org complained of closing a table tag which was not open. Neither bore any resemblence to what I saw in the code :(

So I looked carefully at the areas where the offending lines were, and found the culprit:

<div class="C">
<table>
...
lots and lots of lines of table
...
</div>
</table>
The error was clearly the incorrectly nested table and div tags, but it confused both SGML parsers so completely that they were unable to identify the error. But they certainly knew that something was wrong!

tedster

9:02 pm on Dec 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Surprising -- thanks for reporting on that. I have not run into that confusion on such a basic error.

TryAgain

4:51 am on Dec 2, 2003 (gmt 0)

10+ Year Member



It's harder to check for grammatical errors than it is for spelling errors. I guess the same principle applies to code validation.