Re: massive w3c bug?

Le 2/8/2011 6:13 AM, Chris Beer a écrit :
> Hello Hans
>
> I'm not sure why you included the e-Gov IG group in your email, but
> happy to supply a response.
>
> Quite simply, the reason the code as supplied checks as valid against
> HTML 4.01 Transitional, is that it is valid code according the
> specification.
>
> That is not to say that the code as supplied will render without error
> or issue in a browser, only that it is technically correct.
>
> To explain with some examples.
>
> Line 8: <style type="text/csss"> - The specification states at
> http://www.w3.org/TR/html4/present/styles.html#h-14.2.3 that "Authors
> must supply a value for this attribute (type); there is no default value
> for this attribute." In other words - the validator is only going to
> check for the presence of a type attribute for style. It is not going to
> check whether or not that attribute, being author supplied, is actually
> real, correct or otherwise a valid MIME type. And nor should it - the
> list of valid MIME types is constantly being updated, and this, I would
> assume, would place a large amount of resource requirement on the W3 to
> keep the validator sychronised with the MIME type list administered by
> the IANA.
>
> Lines 15 and 17 are likewise technically valid, as both possess a valid
> attribute. However while the content is those attributes are obviously
> incorrect, they are author supplied, and for all the validator knows,
> "greeeen" and "fffff" may well be the name of vendor or UA/browser
> specific colours. It will not presume. Only test.

That's actually the only error in this document, but not an error 
according to the dtd which does not specify anything about the value of 
the style attribute except that it is a string. Try validating this page 
with Unicorn, W3C's unified validator, to see both markup and css results:
http://validator.w3.org/unicorn/check?ucn_uri=www.htmlvalidator.com%2Fhtmlval%2Fwhycseisbetterhtml.html%20&ucn_task=conformance#

Regards
Tom

>
> Again at line 19 - There may well be a font called ariel - (in fact I
> bet someone has made a Disney font called Ariel) - the validator isn't
> checking for that.
>
> Line 21 is interesting - the onclick event.
> http://www.w3.org/TR/html4/types.html#h-6.14 states that "User agents
> must not evaluate script data as HTML markup but instead must pass it on
> as data to a script engine." So my guess is that the validator again
> makes no presumptions. It notes the presence of the onclick event
> attribute, and notes that whatever is inside it doesn't need to be
> evaluated purposes of validation, since "HTML does not rely on a
> specific scripting language, document authors must explicitly tell user
> agents the language of each script. This may be done either through a
> default declaration or a local declaration"
> (http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.2). Quite
> simply - it cannot presume that what you are telling it is actually
> correct or incorrect so it ignores it, and quite rightly so.
>
> Line 23 is simply evaluated as undefined text on a page. There is
> nothing wrong with that.
>
> And so on.
>
> I hope this has been of some assistance - a careful reading of the
> specification will reveal that all of your examples are in fact
> technically valid, even if they won't parse with a user agent. Should
> you have further questions, please send them to www-validator@w3.org and
> not to public-egov-ig@w3.org - this list is not the appropriate forum
> for this type of question.
>
> Kind regards
>
> /*Chris Beer
> *Invited Expert (Public Member) W3 eGovernment Interest Group & W3-WAI
> WCAG Working Group/
>
>
> On 8/02/2011 7:21 PM, hans.grahn@bredband.net wrote:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>> "http://www.w3.org/TR/html4/loose.dtd">
>> <html>
>> <head>
>> <title>Untitled</title>
>> <meta name="generator" content="CSE HTML Validator Professional
>> (http://www.htmlvalidator.com/)">
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
>>
>> <style type="text/csss">
>> p { color: black}
>> </style>
>>
>> </head>
>>
>> <body bgcolor="fffff">
>>
>> <p style="color: greeen"></p>
>>
>> <p style="font-family: ariel, sans-serif"></p>
>>
>> <p onclick="function('string value);">test</p>
>>
>> img src="somepic.jpg">
>>
>> <img src="somepic.jpg" alt="description" width="50text">
>>
>> <a href="http://www.domain.com/images\image.jpg">...</a>
>>
>> <a href="htp://www.domain.com/">...</a>
>>
>> <a href="user@domain.com">user@domain.com</a>
>>
>> <a href="mailto:user@domain.comm">user@domain.com</a>
>>
>> <p>He said &quot;I'll be there!&quot</p>
>>
>> <a href="#chapter5">...</a>
>>
>> <a href="http://www.domain.com/" target="_new">...</a>
>>
>> <a href="http://www.domain.com/ ">...</a>
>>
>> <a name="atagid" id="atagid2">...</a>
>>
>> <table><tr><td>...</table>
>>
>> <!-- This is a comment with an ending style that may cause problems in
>> browsers -- >
>>
>> </body>
>> </html>
>
>

Received on Tuesday, 8 February 2011 15:15:11 UTC