W3C home > Mailing lists > Public > www-html@w3.org > November 2000

CDATA in attribute values

From: Christian Smith <csmith@barebones.com>
Date: Thu, 30 Nov 2000 10:22:20 -0500
To: www-html@w3.org
Message-ID: <20001130102220-r01010600-a460c8f8@204.107.232.107>
I this valid?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Untitled</title>
	<meta name="generator" content="BBEdit 6.0.1" />
</head>
<body>
<img src="foo.gif" alt="<![CDATA[ Jack & Jill ]]>" />

and even this

<img src="foo.gif" alt="<![CDATA[ <p>'Jack & Jill'</p> ]]>" />

and this

<img src="foo.gif" alt="<?xml <p>'Jack & Jill'</p> ?>" />

</body>
</html>

The W3C validator seems happy with this and my reading of the Annotated
XML seems to indicate that this is valid.

-- 
Christian Smith  |  csmith@barebones.com  |  http://web.barebones.com

He who dies with the most friends... Is still dead!
Received on Thursday, 30 November 2000 10:22:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:44 GMT