I would dearly love to gather up everyone who has ever attempted to teach English composition to anyone now involved in XHMTL/XML/DTD spec writing, so that I could give them all a medal for their efforts, and then shoot them all for their miserable failure to achieve anything resembling results.
In order to make a page including the TrackBack RDF data validate, you “simply” need to write a new DTD, along the lines of:
<!ENTITY % xhtml_trackback.mod
PUBLIC "-//Movable Type//ELEMENTS XHTML TrackBack RDF 1.0//EN"
<!ENTITY % xhtml11.dtd
PUBLIC "-//W3C//XHTML 1.1//EN"
and then just write xhtml_trackback.mod, a module that “brings in” the RDF and DC namespaces (in some incomprehensible and unspecified way), and then defines the rdf:RDF element and its content, the rdf:Description element and its attributes, and attaches them to the XHTML content model (in Misc.extra, which says “put it anywhere you like”). Simple as falling off the earth. The W3C validator doesn’t help much when defining your own DTD (it gives line numbers for errors in the DTD, but presents them as though they were errors in the XHTML, so you get errors in the middle of blank lines), but the WDG validator will tell you where in your DTD you screwed up, though not exactly how. First time I’ve ever had a validator tell me that it reached its maximum error count, and couldn’t stand to go on anymore.
If someone else wants to follow me down the garden path, here are some of the bookmarks that didn’t explain things well enough for me to figure it out:
- This forwarded email on some W3C list should have provided all the answers, except that the waptechinfo.com domain seems to be gone, and the email doesn’t include the qname modules for RDF and DC.(later: corrected version on the original list)
- Also from Sean B. Palmer, RDF in HTML: Approaches has an example DTD and module, as well as the approach I’m coming to prefer: “eschew validation”
- The thread on the W3C RDF IG list where he announced it is instructive, as rather than saying “well, hell, let’s write a DTD so that people can shove RDF into their XHTML and still validate” the list goes haring off on some holy war about N3 and N-Triples.
- The W3C Recommendation on Modularization of XHTML is, as usual, not for the faint of heart
- Ditto Modularization of XHTML in XML Schema
(I was planning on editing this, to tone down the rhetoric a bit, but after I discovered that Bloglet gets draft posts from blogger.getRecentPosts I decided to just publish it. After all, I’ve spent almost an entire day chasing my tail on this, without any results, so I think I’m entitled to be a little crabby. After all, XHTML modularization is over a year old, and RDF is over three years old: that seems like enough time for someone to come up with a DTD skeleton that would let a content producer just replace a few element and attribute names, or better yet a DTD wizard that would ask what elements you need to use, what attributes you’ll give them, and where in your XHTML you want to put them, and then spit out a working, valid DTD. Not as much fun as arguing a triple-abstraction in a mailing list thread that has gone through four subject changes, I’m sure, but every now and then you need to actually do something.