Re: Parser Error?

On Wed, 9 Jun 1999, Lloyd Wood wrote:

> On Wed, 9 Jun 1999, Brian Gilkison wrote:
- -
> > The ampersand character ("&") is what is generating your error, since the
> > validator is assuming what follows to be an entity reference. 
> 
> Since it isn't an entity reference, it's safe to assume that the
> validator is in the wrong.

Since suspected validator errors regularly turn out to be errors
correctly reported by validators, it's safe to assume that the
validator is correct here too.

&limit _is_ an entity reference, by SGML rules. It happens to be
undefined in the current version of HTML (or, what really matters
to a validator, in the version against which you're validating),
a validator must report an error. On the practical side, consider
what happens if some future version of HTML defines &limit, which
might well happen. Such things _have_ happened. And on the other
hand, there are browsers which erroneously interpret undefined
entities if the names begin with a defined name; see reason #3 at
http://www.htmlhelp.com/tools/validator/reasons.html 

> The effect of widespread use of tilde (~) and ampersand (&) on URLs
> sans escapement is a lost cause as far as validation is concerned.

The necessity of "escaping" ampersands in attribute values has
_gained_ and is gaining importance. The more entities there are,
the greater the risk of having &something processed in a way you
really did not mean.

The tilde never was an issue in validation. Validators do not
check URLs in any way, since to them, a URL is just CDATA. (That said,
despite the fact that RFC 2396 relaxed the encoding requirements,
it still is, as it always was, safest to encode ~ in a URL as %7e.
In particular, trying to use the tilde in printed media is a lost cause,
and who can predict which URLs get printed?) 

-- 
Yucca, http://www.hut.fi/u/jkorpela/ or http://yucca.hut.fi/yucca.html

Received on Thursday, 10 June 1999 04:15:33 UTC