March 10th, 2008

A gentleman from the W3C was kind enough to point me to a newly tracked issue for the HTML5 working group related to namespaces in HTML5, entered by James Graham. I'm not a player in this game, because I can continue to use XHTML 1.1 until they pry it out of my cold, dead browser. However, it is good to see some concerted effort in adding SVG and MathML to HTML5, as well as XHTML5. The two are nothing more than serialization formats, and it shouldn't matter which we use. However, as it stands now, the data model changes based on the serialization, and that's not a particularly good thing.

In the meantime, XHTML is getting more kicks because of the draconian error handling. Seriously, I'd love to know who coined this term, so we can take them out behind the barn. Whether the comment was facetious or not, Ian Hickson's statement that the great thing about XML’s well-formedness requirements is that this kind of thing can’t happen, because the author would catch this kind of error straight away, is true. Errors don't creep in, they trumpet for attention. But, to each their own. I'm not a player in this game.

Comments
1
Simon Willison - 11:13 pm March 10, 2008

I ran simonwillison.net as XHTML with the correct content header for several years (it's now HTML 4.01 Strict) and I found that it wasn't always the case that errors were found straight away. My blog is a dynamic application, so whenever I changed data (or one of my users posted a comment or pingback) there was a chance that an error might slip in without my seeing it straight away. For example, I might edit an entry and check it on its own page, but fail to notice that another page elsewhere in the site that only shows a truncated version of that entry now fails to validate because the truncation code has sliced an XML entity in half.

I managed to keep errors mostly under control thanks to a great deal of effort (ensuring everything in the database, including user comments, was valid XML before it was stored for example) but it was amazing how a bug in my code could lie dormant for months or years before jumping up and causing a nasty user-visible error page without warning.

Making a dynamic application that is based on gluing strings together validate as valid XML 100% of the time is, in my opinion, too difficult to be worth the effort in most cases (sites that need to use MathML and/or SVG are currently the exception here, at least until someone figures out how to embed namespaced content in regular HTML). You can do it if you move to a pure XML publishing system (with something like Python's Genshi template library, for example) but in the end I've decided the overhead isn't worth it when HTML 4.01 provides better results in existing browsers with less hassle.

2
James - 5:33 am March 11, 2008

It appears Joe English first called Tim Bray's proposed error handling "too draconian".

3
Aristotle Pagaltzis - 6:23 am March 11, 2008

Did you know that what was so “draconian” about Dracon’s laws was that they were written and he stuck to them? Where previous rulers merely eyeballed and handwaved their decisions, he codified a set of rules and then judged by it. (At least that’s how legend would have it; not much written about him survives, so he might be fictional as easily as he might be historical.)

4
Shelley - 7:16 am March 11, 2008

James, thank you for that link!

Aristotle that sounds very much like XHTML, and perhaps "draconian" should be perceived as a compliment.

Simon, I hear you. Generating compliant XHTML is relatively easy, as is developing a compliant theme. However, it is the text coming in from the outside that causes problems. Oh, not the typical stuff–usually whenever I mention XHTML, someone will come along and embed U+FFFE or U+FFFFF.

I don't particularly care if they use this for a search term or pulling up a page — they only muck things up for themselves. But comments and ping backs are a problem. In fact, I won't accept ping backs now (thought that's more because of the spam), and I have comments on moderation.

I had a library that cleared out the bad stuff. Unfortunately, it also cleared out much of the good stuff. Hopefully I can tweak it, or find another.

But the use of SVG makes it worth it. SVG and perhaps even RDF, if I decide to use RDF/XML rather than RDFa.

I'd also like to see more time spent on tools to make XHTML a viable option, than shoving SVG/MathML into HTML. However, I don't think this is the popular view, and to each their own.

(Unfortunately, unlike Python, PHP doesn't seem to have the decent XML libraries.)

5
Jason Lefkowitz - 9:34 am March 11, 2008

Did you know that what was so “draconian” about Dracon’s laws was that they were written and he stuck to them? Where previous rulers merely eyeballed and handwaved their decisions, he codified a set of rules and then judged by it.

No, the reason Draco's laws were "draconian" was because every offense, including trivial misdemeanors, was punishable by death (except for a few offenses which carried the comparatively lighter punishment of exile).

From Plutarch's Life of Solon:

First, then, [Solon] repealed all Draco's laws, except those concerning homicide, because they were too severe, and the punishment too great; for death was appointed for almost all offences, insomuch that those that were convicted of idleness were to die, and those that stole a cabbage or an apple to suffer even as villains that committed sacrilege or murder. So that Demades, in after time, was thought to have said very happily, that Draco's laws were written not with ink but blood; and [Draco] himself, being once asked why be made death the punishment of most offences, replied, "Small ones deserve that, and I have no higher for the greater crimes."

Which is why "draconian" carries a negative connotation today — it implies a code that imposes unfairly harsh punishments for offenses that don't really merit them. It's also, indirectly, why we sometimes refer to a wise leader or legislator as a "solon"; because Solon was the Athenian lawgiver who was wise enough to recognize Draco's laws were too harsh, and repeal them.

6
Tim - 10:39 am March 11, 2008

Hah, I would have claimed that I'd invented the label Draconian; thanks to James for finding the Joe English quote.

For lots more on Dracon and so on, see Dracon and Postel

Thanks to all those who have contributed to the discussion. Comments are now closed, but you can contact the author of the post directly.