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

Re: Parser Error?

From: <Jukka.Korpela@hut.fi>
Date: Thu, 10 Jun 1999 02:11:56 -0400 (EDT)
To: www-validator@w3.org
Message-ID: <Pine.OSF.4.10.9906100905370.77-100000@beta.hut.fi>
On Wed, 9 Jun 1999, Lloyd Wood wrote:

> whoops, should have elaborated on this. Convention is to use ""
> to delimit HREF entities, so common sense suggests that & shouldn't be
> viewed as a terminator.

The & is not viewed as a terminator but as a character which starts
an entity reference. This has nothing to do with attribute delimiters. 

> It's much the same reasoning why <TABLE WIDTH="100%"> gets quoted,
> since % is reserved in SGML (as is either + or -; can't remember
> which, so quote both)

Always quoting attribute values is good practice, especially with
respect to validation. See The Saga of the Slashed Validators,
http://www.hut.fi/u/jkorpela/qattr.html

But that's a different story.

> You don't see people writing e.g. <TABLE
> WIDTH=100&percent;>, and you'd think that HTML would have handled SGML
> reserved characters more carefully by setting up &percent;

No, that has nothing to do with the issue. If there were an entity
for the percent sign (in which case it would undoubtedly be &percnt;
to correspond to the name mentioned in an informative appendix to the
SGML standard), an attribute value containing it would still need to
be in quotes.

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

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