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. π
I hope you know that IE is not able to display pages with mime type application/xhtml+xml?
It doesn’t? I guess I must be seeing things then. If you have a copy of windows will you test IE for me? I only have it under crossover-office and I’m not sure if that changes it’s behaviour.
Curtis – here’s the output of lynx -mime-header http://wwwredesign.gentoo.org/ :
HTTP/1.1 200 OK
Date: Fri, 06 Jan 2006 17:04:38 GMT
Server: Apache/2.0.54 (Gentoo/Linux)
ETag: “191a-43bdc115”
Content-Length: 20132
Last-Modified: Fri, 06 Jan 2006 01:00:05 GMT
Connection: close
Content-Type: text/html; charset=utf-8
Looks like it’s still served as text/html, no?
Curtis,
I’ve tested it on Win XP Pro (work) with IE 6 SP2 and it seems ok. However, that’s probably due to it being sent as text/html instead of the proper application/xhtml+xml MIME type, as Renat mentioned. Remember: If you want to be more accessible, you should probably stick with XHTML 1.0 Strict, as that can be sent as text/html if needed. That’s what I do on my currently in-production-on-my-desktop website, using a small PHP snippet to do the negotiation. π
Have a nice Friday…
–Peter
You have set the MIME type per meta ( ) which does not change anything. It needs to be sent as HTTP Header ( e.g. with php: ) which indeed does not work in IE, but who cares about IE? I dont! π
You have set the MIME type per meta ( <meta http-equiv=”Content-Type” content=”application/xhtml+xml; charset=UTF-8″/> ) which does not change anything. It needs to be sent as HTTP Header ( e.g. with php: <?php header(‘Content-Type: application/xhtml+xml’); ?> ) which indeed does not work in IE, but who cares about IE? I dont! π
— sorry, the html/php code was screwed in my previous post —
Unfortunately IE makes xhtml 1.1 pretty much pointless except as an academic exercise at the moment because it doesn’t know what to do with the application/xml+xhtml mime-type. IIRC you can add the mime-type to the Windows registry and it will stop trying to download the file, but I doubt many people are going to want to do that any time soon.
As for not caring about IE, i think tomk’s stats showed that about 25% of visitors to wwww.gentoo.org use IE, and breaking it for them isn’t an option. π
Give http://www.thedoh.com/~lisa/site/info/site/mimetype a read for solving the mimetype problem. The document is 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.
What about the XML prolog issue?
I started making a new website and I recall something about a XML prolog …
blabla