This essay is served as text/html. It is essentially the same as the application/xml version: http://norman.walsh.name/2004/01/17/application-xml
Nothing will ever be attempted, if all possible objections must be first overcome.
This essay is served with the MIME type “text/html”. If you’re reading this, then your browser did the right thing.
In the course of recent public debate on the appropriateness of recovering from well-formedness errors in XHTML, Mark Pilgrim caught me serving content that, at least by some metrics, purported to be XHTML and was not well-formed. (In fact, the server said it was “text/html” content so it was, by that metric, not in error, though it was clearly not “correct” either.)
I’m sticking to my guns and remaining a “draconian.” So David Carlisle challenged me to start serving my essays as “application/xml”. That would pretty much guarantee that the browser would report any lapses of concentration that caused me to accidentally generate markup that wasn’t well-formed.
In general, I expect that there are still far too many people
using browsers that don’t know what to do with
application/xml content to make it practical to serve it exclusively.
But I’m not sure that’s true and it may in particular not
be true you, my personal audience. (Have I thanked you recently for taking the
time to read my ramblings? Thanks!)
So this essay is an experiment. If you can’t read the
of this essay but you can read this version, let
me know: tell me what browser you’re using and what platform, please.
You can report successes too, of course.
Here’s what I’ve found out so far:
|Mac OS X||Camino||?||Yes|
|Mac OS X||IE||?||No[a]|
|Mac OS X||Mozilla||?||Yes|
|Mac OS X||Safari||1.1.1||Yes|
|Windows||IE||5, 5.5, 6.0||No|
[a]Displays “application/xsl+xml Identity transformation 2004-01-18 $Date: 2004/01/18 21:21:09 $ Copyright © 2004 Norman Walsh. All rights reserved. Perform the identity transformation; copy everything.” In other words, it seems to display the text of the file that is the target of the xml-stylesheet processing instruction. Very odd.
[b]Understands “application/xml” but not “application/xhtml+xml” in the default configuration.
I’ve changed a few things in response to feedback. I think these will be improvements: [Last update: 19 Jan 2004.]
The recommended MIME type for XHTML is “
But some browsers (notably IE) handle “
application/xml” better than “
A little content-negotiation is probably in order. Beyond that, the MathML folks have clearly blazed a trail for us to follow. (Thanks, guys!)
Don’t put a document type declaration on the XHTML pages, because IE goes off and reads it (Good for you, IE! An actual feature not a bug!)
entities. This is actually imperative now that I’ve removed the document type declaration (because entities with no possibility of a declaration makes the document not well-formed).