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

RE: CDATA in attribute values

From: Christian Smith <csmith@barebones.com>
Date: Wed, 6 Dec 2000 15:31:10 -0500
To: www-html@w3.org
cc: Dave J Woolley <david.woolley@bts.co.uk>
Message-ID: <20001206153110-r01010600-e69ae688@204.107.232.107>
On Wednesday, December 6, 2000 at 19:30, david.woolley@bts.co.uk (Dave  J Woolley) wrote:

> 	[DJW:]  No.
> 
> 	Naked &'s and <'s are not permitted in attribute
> 	values, and XML directives are definitely not
> 	recognized in that context.
> 
> 	See 
> 	<http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn>,
> production number [10].
> 
> 	Whilst it is just conceivable that some version of XHTML
> 	has extended ALT to allow it to include XML text for
> 	recursive expansion, such a change would not be understood
> 	by a general validator, because it requires knowledge beyond
> 	the content of the DTD, and would not be backwards compatible,
> 	because of the need to double escape < when one doesn't
> 	want interpreted as the start of a tag.

Ok, but how does this jive with the definition of CDATA sections:

http://www.w3.org/TR/2000/REC-xml-20001006#sec-cdata-sect

	2.7 CDATA Sections

	[Definition:] CDATA sections may occur anywhere
	character data may occur; they are used to escape
	blocks of text containing characters which would
	otherwise be recognized as markup. CDATA sections
	begin with the string "<![CDATA[" and end with the
	string "]]>":


I realize that using this in an XHTML document would create something
not supported by the validator or by a current HTML renderer, but is it
valid XML to use a CDATA section in an attribute value if that attribute
is defined as having a content model of CDATA?


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

He who dies with the most friends... Is still dead!
Received on Wednesday, 6 December 2000 15:31:12 GMT

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