W3C home > Mailing lists > Public > www-validator@w3.org > December 2010

Re: [VE][libxml2-65] attributes construct error because of empty GET variable

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Sat, 18 Dec 2010 14:06:15 +0000
Message-ID: <AANLkTimHawyhcLXAJOnAEtaicG9_YGx24NRG=LojNyYS@mail.gmail.com>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: Stan Gobien <stan.gobien@telenet.be>, www-validator@w3.org
On Sat, Dec 18, 2010 at 5:29 AM, Jukka K. Korpela <jkorpela@cs.tut.fi> wrote:
>> Is this an error in the validator?
>
> I think it is.

There is a (repeated) error in the document:

 <img width="12" alt="spacer"src="images/spacer.gif" />

Attributes must be separated by whitespace, so there should be
whitespace before "src":

http://www.w3.org/TR/REC-xml/#sec-starttags

However, there also seems to be an error in the validator, in that
it's misreporting the "attributes construct error" as though it was in
the earlier "href" attributes on the same lines.

Test case A does not validate (with appropriate error messages):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body><div>
<img width="12" alt="spacer"src="images/spacer.gif" />
</div></body></html>

Test case B validates:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body><div>
<a href="index.php?regio=&amp;zoekveld=&amp;dir=ASC&amp;sort=reis_naam&amp;staat=">Naam
van de reis:</a>
</div></body></html>

Test case C does not validate (with the location of the "attributes
construct error" misreported):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body><div>
<a href="index.php?regio=&amp;zoekveld=&amp;dir=ASC&amp;sort=reis_naam&amp;staat=">Naam
van de reis:</a> <img width="12" alt="spacer"src="images/spacer.gif"
/>
</div></body></html>

In passing, Stan, purely decorative images such as spacer images
should have an "alt" value of "" not "spacer" so that assistive
technology will ignore their presence:

http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H67

--
Benjamin Hawkes-Lewis
Received on Saturday, 18 December 2010 14:06:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:45 GMT