peteg's blog - noise - blogging - 2006 12 24 XHTML

The Joys of XHTML.

/noise/blogging | Link

The theme I pinched for Blosxom claimed to use an XHTML DTD, and so idly I thought I'd try to make it conform. Yep, a complete waste of time. I naively imagined that XHTML has twenty-first-century tech but in fact everyone's been ignoring it since 1999.

Both Safari and Mozilla seem to deal with it OK. I have no idea if any of this works in Internet Explorer, sorry.

There's a semi-usable packaging of the W3's validator available here. For dynamic content I use curl to grab the page then feed it through as a file. Not very convenient but the less lazy can script it.

I find it ironic that the motivation for XHTML in the Wikipedia article is to make things more anal, purportedly for an efficiency payoff. To my eye it's just XML buzzword compliance, an opportunity to clean up the semantics of the beast squandered on syntactic busy-work.

My pet peeve is that the layout rules are so damn complex when something as semantically simple as a bunch of markup combinators could fix this mess. This tradition in CS goes back at least as far as Henderson's 1982 paper on functional geometry and continues with Lava and pretty printing and many other works. Then, instead of spending an hour finding out that one should lay out a line right-to-left (perhaps, maybe, this week at least), I could just say "title beside search box" and get exactly that!

Heck, this would even be better than CSS: define a bunch of named objects and some way to lay them out explicitly. Completely separate content and presentation, perhaps even a "declarative" layout! Somehow the fundamental notion of compositionality has been MIA here.