Re: Validating one of my web pages

Basically, this entire discussion is based on a misunderstanding.

It is unfortunately not uncommon to believe that validation is done by 
interleaved parsing of multiple languages/formats.

Wyss remarks indicate that, as he has placed the "</div>" inside a 
JavaScript text literal (though Wyss even incorrectly called it a 
comment!), he believes the markup validator should ignore that 
occurrence of "</div>" when looking for actual markup. Well, intuitively 
speaking, this belief is not altogether absurd, as it is founded on the 
authors mental model of what *all* the text in the page means.

But, and this is the great *but*, this expectation does not match what 
the validator is really built to do. The *markup* validator restricts 
itself to checking the  markup. It does not get involved in parsing the 
stuff inside SCRIPT (which could really be anything -- even a newly 
invented scripting language based on a syntax that I just defined 
yesterday, which the validator definitely has no clue about). There may 
even be blatant or subtle syntactical or semantical errors in the 
JavaScript; the markup validator should not be concerned about that. The 
novice's expectation  is often different -- "as I submit *all* my text 
to validation, *all* text should be validated (in *all* possible ways)." 
Which leads to these confusions about (1) whether there are criteria 
that are *not* validated; (2) whether there are parts that are not 
really *dissected*, and (3) how start and *end* positions of these parts 
can be identified.

So, confusion enters when the underlying principle of separation of 
concerns is not fully grasped. This is the reason there is a separate 
CSS validator at the w3c site -- it is *not*  built into the html 
validator. In the same spirit, there are JavaScript checkers out there 
on the net.

An everyday analogy could be to grade a student paper consisting of 
sections in Finnish and sections in Romanian, and no teacher understand 
both languages, so Finnish teacher (and the Romanian teacher) must know 
what parts of the paper he should ignore. I guess they can both do their 
job, given that they can identify what parts of the paper they 
individually should *not* look at. Everyone understands this example. 
And basically, this also describes the situation that faces the validator.

So why is it so difficult to communicate this?

Actually,  the best design advise seen in this thread is about 
separation of concerns  --  separation of different "languages" into 
separate files, and then weaving it together by links from the main 
document.

/o


David Dorward wrote:
>
> On 7 Jul 2007, at 10:25, Otto Wyss wrote:
>>> If it is illegal then your code is wrong. Period!
>> Well this discussion leads to nothing. So I'm not going to change my 
>> code whatever the validator says.
>
> So the validator (a well established and well tested piece of 
> software) says you are wrong. The validator over at 
> http://www.htmlhelp.com/ will say you are wrong too. At least four 
> people with enough interest in validation and QA to subscribe to the 
> validator mailing list agree with the validator. A FAQ says you are 
> wrong. Nobody is agreeing with you.
>
> Are you refusing to change your code because you, in spite of the 
> above, still believe your code is correct? Do you just not care about 
> following the standard?
>
> --David Dorward
> http://dorward.me.uk/
> http://blog.dorward.me.uk/
>
>
>


-- 
------------------------------------------------------------------
Olle Olsson   olleo@sics.se   Tel: +46 8 633 15 19  Fax: +46 8 751 72 30
	[Svenska W3C-kontoret: olleo@w3.org]
SICS [Swedish Institute of Computer Science]
Box 1263
SE - 164 29 Kista
Sweden
------------------------------------------------------------------

Received on Saturday, 7 July 2007 17:21:52 UTC