xhtml-1.1

The specification for xhtml-1.1 says that the server *should* send application/xml+xhtml in the HTTP header but that it *can* send text/html in order to remain backwards compatible with older user agents, IE for example. As long as the doctype is set correctly (and it is) it is still valid xhtml-1.1.

In fact, if you use the validator and let it auto detect the doctype it correctly detects xhtml-1.1 and validates the page using that specification (ignore the errors, I’m still workin’ on it). Browsers will also detect it, including IE, and use the correct specs to render the page. They also render the page in Standards Compliance Mode, including IE.

Trust me on this, I researched it *extensively* before making the jump to xhtml-1.1, I didn’t just blindly decide to change. I read the entire xhmtl-1.1 specification. I didn’t just skim it or skip any parts I read the entire thing. I read the XSLT-1.0 specification to make sure I was doing it right in the xsl. I also read TONS of threads from all over the world discussing this, including from IE support sites, apache, mozilla, w3c and web designer sites.

MS officially suggests using text/html in the HTTP header when serving xhtml-1.1 documents to IE. Mozilla, Opera, Firefox, Konqueror can all correctly use application/xml+xhtml and officially suggest that is what you send in the HTTP header but **ALL** of them are also backwards compatible with text/html.

None of the text browsers, as far as I know, can use application/xml+xhtml yet but, just like IE, they can correctly render an xhtml-1.1 page validly and in Standards Compliance Mode with text/html in the HTTP header.

So, to sum it up:

The site is validly serving XHTML-1.1 (except for the errors I haven’t fixed yet) that is recognized by all browsers and correctly rendered. The server doesn’t have to send application/xml+xhtml in the HTTP header in order for it to be valid, it can send text/html too.

xhtml-1.1

So, since I have to wait for Aaron to produce a new logo anyway I’ve decided to take the time to update the site to xhtml-1.1. This isn’t as easy as it may first seem. Not only does the resultant html need to conform to the specification but the XSL also needs to be altered somewhat to be compatible with this new version of xhtml. Just figuring out how to write the xsl:output method correctly was enough to give me a headache!

It turns out that xhtml is actually considered to be xml and NOT html at all so the XSLT processor has to be informed of this and different namespaces declared. Did you know that xhtml is not “text/html” but “application/xhtml+xml”? Neither did I until yesterday.

Anyway, I have the wwwredesign.gentoo.org site now serving xhtml-1.1 and it is *almost* error free and compliant. I’m almost done reading the xhtml-1.1 specification and I should have the site passing the validation within a week. In just the last few days I’ve cut the number of errors from 59 to 15 so I’m almost there. 🙂