W3C home > Mailing lists > Public > www-validator@w3.org > February 2006

Re: Parsing HREFs?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 19 Feb 2006 10:36:01 +0200 (EET)
To: Bonnie Granat <bgranat@granatedit.com>
cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.63.0602191024330.10179@korppi.cs.tut.fi>

On Sun, 19 Feb 2006, Bonnie Granat wrote:

> Why is the W3C Validator checking a URL that's on amazon.com for compliance
> with XHTML?

It isn't. As a markup validator, it only checks a document for conformance 
to generic (SGML or) XML syntax and to the document type definition 
specified.

> Info Line 69 column 332: entity was defined here.
> ...21349962/103-1286336-8001448?v=glance&n=283155">reviews </a>of this
> book.</..

Please read the _error_ messages before that (misleading) "info line".
It is unfortunate that a common error now spawns a total of six messages 
and, by a corollary of Wiio's law (Communication fails, except by 
accident), people seem to concentrate on the least informative and most 
misleading of them. It does not seem to to help that the _first_ of the 
messages (a warning) explains the situation rather understandably and 
refers to the same explanation as the validator's FAQ, namely
http://www.htmlhelp.com/tools/validator/problems.html#amp

Simply replace, in the entire document, any occurrence of "&", inside 
quotation marks or elsewhere, by "&amp;", unless an "&" is already 
part of an entity reference (like "&lt;") or a character reference
("&#123;") and meant to be understood that way.

(I think the validator's FAQ should have a self-contained explanation
that contains the same information as the WDG FAQ entry, in a more modern 
style. A reference to Netscape 3.x, historically interesting as it 
might be, does not make a document very convincing these days.)

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Sunday, 19 February 2006 08:36:09 GMT

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