Serving XHTML as application/xhtml+xml

It’s nearly a decade since W3C produced the first XHTML standard. In all that time, very few sites adopting it have gone as far as to serve the preferred MIME type (application/xhtml+xml). This is because it has been difficult to do well, and text/html sort-of works, so most website administrators don’t bother. Here are some tips to make things easier. First of all, this article isn't about whether XHTML is a Good Thing - personally, I take it for granted that it is, but I merely note in passing that a minority of people disagree.