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="">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.)

Friday, 30 April 2004

More broken XML generated by blogging tools

First it was Movable Type doing it… now, WordPress generates differently but equally-broken XML for its inline trackback RDF discovery. Here’s an example:

<rdf:RDF xmlns:rdf="" 
    dc:title="\'Hat of the Day:  Chip Frederick"
    trackback:ping="" />

Backslashes don’t escape anything in XML

Update: Per the trackback below, WordPress fixed it! So, the current score is: WP 1, MT 0. (So, my message to all you WordPress bloggers over there on the sidebar: get thee to an update.)