Re: Is markup allowed in attribute values?

-----BEGIN PGP SIGNED MESSAGE-----

> Is markup allowed in attribute values?  The particular case I'm thinking

No, it's not. An attribute value may only contain character
data. That is, literal text with -sometimes- entities.

> I've read the HTML 2.0 spec, even tried reading the DTD (I don't
> actually know SGML), but it doesn't seem to say one way or another.

Actually the spec does, you just have to know SGML to understand it =).
In the DTD you can see the permitted contents of a tag. For example,
this is the line for META:

<!ELEMENT META - O EMPTY -- Generic Metainformation -->
<!ATTLIST META
        http-equiv  NAME    #IMPLIED  -- HTTP response header name  --
        name        NAME    #IMPLIED  -- metainformation name       --
        content     CDATA   #REQUIRED -- associated information     --
        >

The "content" is defined as CDATA, which means you can only put
character data in there, no entities or markup.

Galactus
who wonders why you can't have entities in the contents of a META.
- --
To find out more about PGP, send mail with HELP PGP in the SUBJECT line to me.
E-mail: galactus@stack.urc.tue.nl - Please PGP encrypt your mail if you can.
Finger galactus@turtle.stack.urc.tue.nl for public key - key ID 0x41A1A35.
Anonymity and privacy page: http://www.stack.urc.tue.nl/~galactus/remailers/

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAgUBMdGe5DyeOyxBaho1AQHhgwP/eycJcl6CAJIH8zR1N6k30xwz9CWUefMR
Ews7DhqYkzZTXhZIAcx6b1YYAAJBTSNXs63nvGAZeLTWCRh/Ea8wJiSNLnUte9NJ
bPRp0lsBNpfG2kb29lTLOHezgB+TUaJkikQ4DOld+E5tW/wVkfE6gdA50FbiesKf
sJ9n+wU48/Y=
=usy0
-----END PGP SIGNATURE-----

Received on Wednesday, 26 June 1996 16:34:58 UTC