Wednesday, 3 March 2004

XML legality question

Dumb question… does anyone know if the following XML construct is technically legal?

<a title="<![CDATA[lame <i>test</i>]]>" href="http://www.debian.org/">blah</a>

PyExpat barfs on it, as does Mozilla’s XML parser, and I suspect they’re right to do so, but I can’t find anything in the XML specification that says, definitively, whether or not CDATA declarations are allowed in attributes. (If this is incorrect XML, Movable Type 2.661 generates invalid RDF/XML and my trackback discovery code isn’t busted.)