Re: Add Subject Here

On Thu, 7 Jun 2007, Michael Adams wrote:

> On Wed, 06 Jun 2007 12:25:07 -0400
> Michael Langham wrote:
>>
>> NOTE: Whenever possible, give the address of the document you were
>> checking.

I'll first comment on the original question, then the answer given.

Giving the address was a good move, but it would also have helped to add a 
meaningful subject, instead of keeping the "Add Subject Here" subject. I 
wonder if it would help if the initial subject were something more 
offensive... anyway, lack of meaningful Subject line is one of the reasons 
why it is obscure what the problem is.

>> List below is the code straight from your validation site
>>   <p>
>>     <a href="http://validator.w3.org/check?uri=referer"><img
>>         src="http://www.w3.org/Icons/valid-xhtml10"
>>         alt="Valid XHTML 1.0 Transitional" height="31" width="88"
>>         /></a>
>>   </p>

It is somewhat odd markup, since a single icon hardly constitutes a 
_paragraph_. Then again, "Valid ..." icons themselves are worse than 
useless, and confusion among authors (when they add code for an icon 
without paying attention to HTML version differences) is just a small part 
of this. See http://www.cs.tut.fi/~jkorpela/html/validation.html#icon

>> Where the above checked page balked was actually due to the above
>> pasted code, where it states <img src= ... >

The sentence does not quite parse, but more importantly, it does not 
indicate what really happened.

>> Your validation procedure did not like the "img" before the "src"

So what's the URL of a page that demonstrates this?

>> When that was removed, the page "PASSED".

If the string "img" is removed, the page turns from valid to invalid, not 
vice versa. The URL specified actually contains the following markup at 
the end (some lines wrapped here for readability):

   <p align="center">
     <a href="http://validator.w3.org/check?uri=referer">
 	<img style="border:0;width:88px;height:31px" 
src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 
Transitional" /></a>

  <a href="http://jigsaw.w3.org/css-validator/">
   <img style="border:0;width:88px;height:31px" 
src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /> 
</a></p>

So the "img" string has _not_ been removed, though the markup has been 
changed in other ways.

Thus, the original _problem_ (i.e., what was the problem) remains a 
mystery. But we know that it would have been avoided if the author didn't 
add the icons.

> I think if you append ".png" to the src= things may work better.

No it won't. In any case, it does not affect the _validation_ process the 
least. The markup validator does not retrieve _any_ images or even check 
that src attribute refers to an existing resource - or even _parse_ it for 
being a URL, since the syntax of URLs is not described in the DTD.

> The PNG images do not appear on my browser.

Really? But content negotiation is expected to _take care_ of that. When 
the URL is http://www.w3.org/Icons/valid-xhtml10 (without any "suffix"), 
the www.w3.org server will negotiate with your browser, so that it checks 
the Accept header that the browser has sent and picks up an image format 
that your browser has declared to be able to handle.

Browsers that cannot handle PNG but can handle other image formats are 
rare these days, but if you have one (and it correctly indicates its 
capabilities), then the negotiation mechanism will send an alternative 
format, such as GIF.

> Thus this:
> src="http://www.w3.org/Icons/valid-xhtml10.png"
> Instead of this
> src="http://www.w3.org/Icons/valid-xhtml10"

Nope. That would bypass the negotiation, sending a PNG version to all 
browsers, including those that declare that they cannot handle PNG.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Thursday, 7 June 2007 05:17:20 UTC