What about application/xhtml+xml?
It turns out I wasn't done last week when I switched the site over to XHTML 1.1. It turns out that according to the W3C, text/html is not an allowed type for XHTML 1.1. And the type application/xhtml+xml brings with it a number of concerns. The biggest concern is that Internet Explorer doesn't support this type.
I found this great guide which suggested giving Internet Explorer XHTML 1.0 Strict while browsers that support application/xhtml+xml can be server XHTML 1.1. I went ahead and did this. I had to do the following:
- I inspect the HTTP_ACCEPT variable, if available, to see if application/xhtml+xml is accepted.
- The <?xml version="1.0"?> tag is added for 1.1
- The appropriate <!DOCTYPE> is displayed.
- The <html> tag has a lang attribute for 1.0
- Style sheets are served using <link> for 1.0, <?xml-stylesheet?> for 1.1.
- Style sheet needed to be modified to give the html element a background colour.
That's all I needed to do. There are other things that may need to be done, for example changes to DOM Scripting. I feel better knowing that I can support the cutting edge, while still supporting older browsers that are behind the times.