Habari - The end of XHTML?
As a Habari developer one of the many itches which I have an urge to scratch is the question: Why do so many blog platforms use XHTML? It has been the standard de jour for about five years now but why? You do not have to go very far on the net to read things like Ian Hickson on the disadvantages of serving xhtml with a text/html mime type nor does it take much research to locate some original documentation on the proper use of media types from the W3C. Here is the abstract from there:
This document summarizes the best current practice for using various Internet media types for serving various XHTML Family documents. In summary, ‘application/xhtml+xml’ SHOULD be used for XHTML Family documents, and the use of ‘text/html’ SHOULD be limited to HTML-compatible XHTML 1.0 documents. ‘application/xml’ and ‘text/xml’ MAY also be used, but whenever appropriate, ‘application/xhtml+xml’ SHOULD be used rather than those generic XML media types.
Now it is true that this says that the use of the text/html mime type should be limited to HTML compatible XHTML 1.0 documents. It does not say that this is a good thing. Nor does it say what the consequences are. I have long held the view that serving XHTML with a mime type of text/html is a complete nonsense. Unfortunately I have been guilty in following this chimera against my better judgement by using blogging platforms like WordPress. It has always bothered me. I have discussed it with WordPress Hot Nachos Head Honcho – Matt Mullenweg and I have to say that I never got any kind of answer that went beyond a cliched regurgitation of the received wisdom.
So now is the time to revisit the Shibboleth. Here is my take. An ostensible XHTML doc with a mime type of text/html is not an xml document at all. So what is the point in using it? It was with all this in mind that I launched my come to Jesus thread in the Habari Project Forum.
Unsurprisingly my proposal was not met with universal enthusiasm. It was not met with any enthusiasm at all. And a prominent WP themer promptly started flaming me about my supercillious attitudinalizing. In my own defence I say it is hard to conduct an intelligent dialogue with a fourth grader.
A day or so later the core Habari committers got started. I think it is fair to summarize their position as being bemused, uncomprehending and opposed. And there it rested. I was nearly out of the ball game. But not quite. First up was Andrew Krespanis with a superb post :
As auto_p-esque formatting because morecomplex (oh please Lord don’t let Habari end up with something like wp_autop()!), and content altering plugins become more prevalent, the chances of Habari’s output being well-formed XML become increasingly less. Output quality will only get worse from this point, not better. Living in the false hopes that everyone (theme/plugin/content authors) will just Do The Right Thing is an open invite to increasing entropy.
That stemmed the tide. Next upto the plate was Doug Stewart with a superb couple of external references from Jeff Harrell.
And then the cavalry arrived. In an excoriating couple of posts the very authoriative Mark Pilgrim explained in words of one syllable why faux xhtml is madness. He also banged on the head the incredulous notion of moving to xhtml with the proper mime type which is also a non starter. I just assisted with the screenshot.
So there we are. The Habari team have been given plenty to think about. I sense movement and now they need time and privacy to take the issue under advisement. But I am pretty confident that they will do the right thing. But as soon as I get straight with my long list of things to do I am upgrading to HTML 4.01. I will wave at WordPress on the way past (Quote: US Astronaut Gus Grissom)
I’d support html too:
http://james.gameover.com/index.php/2006/why-i-use-html-instead-of-xhtml/
Thanks for trying to keep Habari on the good path.
Comment by James John Malcolm Feb 25, 02:54 PM #
Root,
If it were me, I’d personally allow Habari to generate whatever the author wants to do.
If by default you serve text/html, then great/good/bad/whatever – but if I want to send a different mine type, then it should allow me to do it without getting in my road.
From my point of view, the decision on how the world should function shouldn’t rest in your hands with your product because as soon as you make a blanket call – someone will want to lift the blanket and you won’t be able to support it.
Give the user the flexibility and move onto more important things.
Just my 2c,
Al.
Comment by Alistair Mar 27, 02:57 PM #
I agree with Alistair. Habari needs to concentrate on more important things if it wants to take on wordpress or drupal. I think, as default, habari should have:
+ description tag for posts (first 100 characters maybe)
+ flexibility on friendly urls like wordpress
+ sitemap creator for google webmaster tools.
and many more
Comment by Ant Eksiler May 22, 07:09 AM #
From the depth of the debate on this issue it should be apparent that this is a far from trivial issue. It does not prevent authors doing whatever they want. Nor does it over ride in terms of priorities anything else. It is just a coding standard. IMHO we made the right choice. There is absolutely no effort being made to change the world. There has been a lot of effort to put Habari onto an uncompromising platform of excellence in everything it includes and how it does it.
Comment by Root May 22, 09:23 AM #