[html5] HTML5 validator behavior issue
Ian Hickson
ian at hixie.ch
Mon Jan 17 13:11:22 PST 2011
On Mon, 17 Jan 2011, Jukka K. Korpela wrote:
>
> In our days, "validator" more and more often means software that checks
> data against some opinions to the extent that these opinions have been
> coded into the software. A loose expression like "using the style
> attribute to hide and show content - - is non-conforming" is virtually
> impossible to enforce in automated software. For one thing, just saying
> display: none simply hides the content (under the usual CSS caveats), so
> it would be incorrect to say that it is used "to hide and show content".
Indeed.
An even more straight forward example is something like correct usage of
<h1>. There's no way to programmatically detect this mistake:
<p>The winner of the best fruit award is:</p>
<h1>Kiwi</h1>
<p>And the winner of the best vegetable award is:</p>
<h1>Carrot</h1>
...but it's just as invalid.
Another way to look at this class of issues is that a document is invalid
if it doesn't mean what the author thinks it means.
> In the good old days, "validator" used to mean software that checked an
> SGML (or XML) document against reportable markup errors, basically
> checking its content according to the announced Document Type
> Definition.
Note that the term "invalid" in this thread is being used somewhat
loosely. The spec mainly uses the terms "conformance checker" and
"conforming document" rather than "validator" and "valid document".
Also note that even in the "good old days" (or as I tend to think of them,
the dark ages!) validators didn't even check for all the reportable markup
errors, they only checked against the things DTDs could report, which is a
quite small subset of the total reportable markup errors. For example, the
syntax of URLs in attributes wasn't checked by HTML4 validators.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the Help
mailing list