Re: Need chapter and verse on quoting of attribute values

Paul Prescod (papresco@calum.csclub.uwaterloo.ca)
Wed, 14 May 1997 18:49:16 -0400


Message-ID: <337A416C.4E7CD14B@calum.csclub.uwaterloo.ca>
Date: Wed, 14 May 1997 18:49:16 -0400
From: Paul Prescod <papresco@calum.csclub.uwaterloo.ca>
To: www-html@w3.org
Subject: Re: Need chapter and verse on quoting of attribute values

Jennifer Masek wrote:
> Does this mean that if an attribute value contains a "/" or a "#" that it
> must, under the 3.2 specification, be quoted?

Yes.

> So, under 3.2, the first of the following pair would get quoted and the
> second wouldn't?

No.

> <A HREF="#Rodents1">Hamsters</A>
> <H2><A NAME=Rodents1>Hamsters</A></H2>

Both *could* be quoted. The first *must* be quoted. I encourage authors
to just quote everything.

> 2)
> I cannot find an equivalent statement in the RFC 1866, though I am told
> that there is one that governs the quoting of attribute values for HTML
> 2.0 compliance. (I've even gone back to the SGML handbooks for a source
> description and archives of this list back to early 95!)

Yes, this is described in the SGML Handbook: page 331. An attribute
value specification can be either an attribute value (e.g abc) or an
attribute value literal ("abc"). The next production demonstrates that
an attribute value literal has quote around it.
 
 Paul Prescod