W3C home > Mailing lists > Public > www-validator@w3.org > June 1999

Re: Parser Error?

From: <Jukka.Korpela@hut.fi>
Date: Thu, 10 Jun 1999 15:38:22 +0300 (EET DST)
To: www-validator@w3.org
Message-ID: <Pine.OSF.4.10.9906101530550.2019-100000@beta.hut.fi>
On Thu, 10 Jun 1999, Lloyd Wood wrote:

> Yet a URL with form state includes & between attribute values, gets
> checked and gets complained about by the validator, which is pretty
> much where we came in.

That's because in CDATA, entity references are recognized.
When your HTML document contains an HREF attribute (or _any_
attribute, or plain text) containing, say, &foo, then an HTML
parser recognizes it as entity reference.

So, for example, an &amp; _denotes_ the & character. When you
have HREF="http://host.dom/foo.pl?a=1&amp;b=2", then the URL
itself is http://host.dom/foo?a=1&b=2 but it must be written
slightly differently in HTML. An HTML parser or a validator
still does not parse the URL according to any specific syntax.
It does the same basic thing with &stuff as it does elsewhere.
(If you wrote e.g. R&D in plain text, instead of R&amp;D, a
validator would report this as an error too - undefined
entity &D.)

-- 
Yucca, http://www.hut.fi/u/jkorpela/ or http://yucca.hut.fi/yucca.html
Received on Thursday, 10 June 1999 08:38:38 GMT

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