<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Mac OS X (vers 1 September 2005), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is application/xml</title>
<script type="text/javascript" src="/script/nwn.js">
</script>
<script type="text/javascript" src="/script/comments.js">
</script>
<script type="text/javascript" src="/script/nicetitle-20060212.js">
</script>
<link rel="stylesheet" type="text/css" href="/css/docbook.css" />
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link rel="stylesheet" type="text/css" href="/css/nicetitle-20060922.css" />

<meta name="foaf:maker" content="foaf:mbox mailto:ndw@nwalsh.com" />
<meta name="DC.title" content="This is application/xml" />
<link rel="alternate" type="application/rdf+xml" title="Essay metadata" href="application-xml.rdf" />
<link rel="alternate" type="application/docbook+xml" title="XML" href="application-xml.xml" />
<link rel="icon" href="/graphics/nwn.png" type="image/png" />
<link rel="home" href="/" title="NWN" />
<link rel="contents" title="Contents" href="/dates.html" />
<link rel="index" title="Index" href="/subjects.html" />
<link rel="up" href="/" title="Up" />
<link rel="first" title="First" href="/1998/04/bangkok" />
<link rel="prev" title="Palm Icons" href="/2004/01/16/palmIcons" />
<link rel="next" title="When is a Website Like a Pogostick?" href="/2004/01/18/pogostick" />
<link rel="last" title="Last" href="/cgi-bin/nav?about=/2004/01/17/application-xml&amp;page=last" />
<link rel="section" href="#lessons" title="Lessons Learned" />
</head>
<body>
<div id="banner">
<div id="header"><a href="/2004/01/16/palmIcons">←</a> <span class="div">/</span> <a href="/">Norman.Walsh.name</a> <span class="div">/</span> <a href="/2004/01/18/pogostick">→</a></div>
<h1>This is application/xml</h1>
<h2><span class="serial">Volume 7, Issue 8;</span> <span class="pubdate">17&#160;Jan&#160;2004 <span class="small">(modified 11&#160;Sep&#160;2005)</span></span></h2>
</div>
<div id="search">
<form action="http://www.google.com/search"><div>
Search: <input size="12" name="as_q" />
<input type="hidden" name="hl" value="en" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="btnG" value="Google+Search" />
<input type="hidden" name="as_qdr" value="all" />
<input type="hidden" name="as_occt" value="any" />
<input type="hidden" name="as_dt" value="i" />
<input type="hidden" name="as_sitesearch" value="norman.walsh.name" /></div>
</form>
</div>

<div id="content">
<div class="abstract">
<p>This essay is served as application/xml. If you have difficulty, you may prefer the text/html version: http://norman.walsh.name/2004/01/18/text-html</p>
</div>
<div class="epigraph">
<p id="p1">Nothing will ever be attempted, if all possible objections must be first overcome.</p>
<div class="attribution"><span class="mdash">—</span><span class="personname"><span class="firstname">Dr.</span> <span class="surname">Johnson</span></span></div>
</div>
<p id="p2">This essay is served with the MIME type “application/xml”. If you’re reading this, then your browser did the right thing (or you worked fairly hard to get here, in which case, I thank you).</p>
<p id="p3">[Update: When I initially published this essay, several people pointed out that <a href="http://www.w3.org/TR/xhtml-media-types">XHTML Media Types</a> (referred to informatively from <a href="http://www.w3.org/TR/2002/REC-xhtml1">XHTML 1.0</a>) recommends the MIME type “application/xhtml+xml” for XHTML documents. Without giving it much thought, I switched the MIME type I was using for this essay. Of course, this changed some of the behavior I was trying to measure, so that was a bad idea. Now
I’ve created a separate <a href="http://norman.walsh.name/2004/01/17/xhtml/application-xhtml" title="This is application/xhtml+xml">application/xhtml+xml version</a> of this essay. Sorry for the confusion.]</p>
<p id="p4">In the course of <a href="http://norman.walsh.name/2004/01/12/postel" title="On Atom and Postel’s Law">recent public debate</a> on the appropriateness of recovering from well-formedness errors in XHTML, <span class="personname"><span class="firstname">Mark</span> <span class="surname">Pilgrim</span></span> <a href="http://diveintomark.org/archives/2004/01/14/thought_experiment">caught me</a> 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.)</p>
<p id="p5">I’m sticking to my guns and remaining a “draconian.” So <span class="personname"><span class="firstname">David</span> <span class="surname">Carlisle</span></span> <a href="http://norman.walsh.name/2004/01/14/rebuked" title="Rebuked">challenged me</a> 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.</p>
<p id="p6">In general, I expect that there are still far too many people using browsers that don’t know what to do with <tt class="code">application/xml</tt> content to make it practical to serve it exclusively. But I’m not <em>sure</em> 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!)</p>
<p id="p7">So this essay is an experiment. If you can’t read this version of this essay but you can read the <a href="http://norman.walsh.name/2004/01/18/text-html" title="This is text/html"><tt class="code">text/html</tt> version</a>, let me know: tell me what browser you’re using and what platform, please. You can report successes too, of course.</p>
<p id="p8">I’ll keep a little summary of the statistics on the <tt class="code">text/html</tt> page.</p>
<div class="section">
<h2 class="runin">Lessons Learned&#160;</h2>
<p class="runin" id="p9"><a id="lessons" name="lessons"></a>I’ve changed a few things in response to feedback. I think these will be improvements: [Last update: 19 Jan 2004.]</p>
<p><!-- This is just a spacer --></p>
<div class="itemizedlist">
<ul>
<li>
<p id="p10">The recommended MIME type for XHTML is “<tt class="code">application/xhtml+xml</tt>”.</p>
</li>
<li>
<p id="p11">But some browsers (notably IE) handle “<tt class="code">application/xml</tt>” better than “<tt class="code">application/xhtml+xml</tt>”.</p>
</li>
<li>
<p id="p12">A little content-negotiation is probably in order. Beyond that, the MathML folks have clearly <a href="http://www.w3.org/Math/XSL/">blazed a trail</a> for us to follow. (Thanks, guys!)</p>
</li>
<li>
<p id="p13">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!)</p>
</li>
<li>
<p id="p14">Remove <tt class="code">&amp;nbsp;</tt> 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).</p>
</li>
</ul>
</div>
</div>
<div><div id='comments'>
<h2>Comments:</h2>
<div id='comment0001' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=f67afbd89dbb23d1470eeac1f310c302&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Well, Mozilla 1.6 renders both pages perfectly.</p>
<p>I have for quite some time served all my pages as application/xhtml+xml for browsers that claim to support this (currently only Mozilla, AFAICS), and this works very well.</p>
<p>It's easy to do this, using the content negotiation feature in Apache, as documented on this page: "http://www.christian-web-masters.com/articles/web_XHTML.html" (though I believe I found the technique first on this German page: "http://schneegans.de/tips/apache-xhtml/").</p>
<div class='name'>Posted by <a href='http://blogg.huftis.org/'>Karl Ove Hufthammer</a> on 19 Jan 2004 @ 07:32a
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0001' title='Permanent link to comment number 1'>link</a>]</span></div>
</div>
<div id='comment0002' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=7c99479794705f99f85e55d6720da843&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Minor entity problem in Safari 1.1.1: The &#160; entities in the calendar on the right appear as-is (ie not resolved to a non-breaking space).</p>
<p>(BTW I support your draconian stand)</p>
<div class='name'>Posted by Alastair Rankine on 19 Jan 2004 @ 09:06a
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0002' title='Permanent link to comment number 2'>link</a>]</span></div>
</div>
<div id='comment0003' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=7c99479794705f99f85e55d6720da843&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Interesting. In that previous comment I typed ampersand-n-b-s-p-semicolon, and when I clicked "preview comment", it showed up like that in the preview. But it also resolved it into an actual non-breaking space in the comment, which I didn't notice. And now it's still there.</p>
<p>(Hmm, there may be a way to break well-formedness of your document here...)</p>
<div class='name'>Posted by Alastair Rankine on 19 Jan 2004 @ 09:18a
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0003' title='Permanent link to comment number 3'>link</a>]</span></div>
</div>
<div id='comment0004' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=2f1ed5a3ce9cdb63a80242a7c1ebcbd6&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Hey Norm,</p>
<p>This one worked fine under Windows Mozilla 1.5 and Firebird 0.7. Opera 6.01 displayed all the text and links for the application/xml one but ignored the CSS stylesheet; Opera did use the stylesheet with the text/html one. Opera is up to 7.23 now, so it would be interesting to see if that version has the same problem with your app/xml version.</p>
<div class='name'>Posted by <a href='http://www.snee.com/bob'>Bob DuCharme</a> on 19 Jan 2004 @ 01:12p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0004' title='Permanent link to comment number 4'>link</a>]</span></div>
</div>
<div id='comment0005' class='comment'>
<p>This page
http://www.w3.org/TR/xhtml-media-types/ (I'd be happy to use an HTML anchor here :) says:</p>
<p>"'application/xhtml+xml' SHOULD be used for XHTML Family documents, and the use of 'text/html' SHOULD be limited to HTML-compatible XHTML 1.0 documents."</p>
<p>Also see
http://www.w3.org/TR/xhtml-media-types/#summary
and
http://www.w3.org/TR/xhtml1/#guidelines</p>
<div class='name'>Posted by <a href='http://www.pinkjuice.com/'>Tobi </a> on 19 Jan 2004 @ 04:40p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0005' title='Permanent link to comment number 5'>link</a>]</span></div>
</div>
<div id='comment0006' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=b399abb0f84414319a52e201dcd2b0ca&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>To report, the article works transparently in Konqueror 3.1.4. With the exception of subtle font issues (grrr, someday I *will* figure out fonts under Linux), the page looks almost identical under Opera 7.23.  Not only that, but Opera provides that really nice navigation system if you provide the &amp;lt;link rel="next" ... /&amp;gt; and the like.</p>
<p>The blurred line between interpreting and presenting HTML and correctly processing xhtml is rather interesting:</p>
<p>"Don&#8217;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!)" - Norman Walsh, article body</p>
<p>Doesn't this beg for catalog support in those browsers that are actually going to resolve identifiers? I would think that as we ask, more and more, for our web browsers to be XML readers that they should be able to take advantage of resources like XML catalogs.  As a user, I am quite curious to know what my various browsers do behind the scenes, but sometimes that documentation can be sparse on this front.</p>
<div class='name'>Posted by John Clark on 19 Jan 2004 @ 05:12p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0006' title='Permanent link to comment number 6'>link</a>]</span></div>
</div>
<div id='comment0007' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=835b016d95ca6663756ee94f9cf846f2&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Mozilla 1.6 (my regular browser) displays this fine. IE6 fails, putting up a dialog that says "Internet Explorer cannot download application application-xml from norman.walsh.name. Internet Explorer was not able to open this internet site. The requested site is either unavailable or could not be found. Please try again later."</p>
<p>Jim</p>
<div class='name'>Posted by <a href='http://anconafamily.com/'>Jim Ancona</a> on 19 Jan 2004 @ 10:10p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0007' title='Permanent link to comment number 7'>link</a>]</span></div>
</div>
<div id='comment0008' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=5c2a641758bb1e9928ea75c09ee6b8f6&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>OK, IE6 SP1 is showing this, but it thinks the encoding is "Western European" (rather than UTF-8), so the curly apostrophe shows up as "a-with-caret euro-sign trademark-sign".  And then when I clicked the talkback button, the page for submitting the talkback *is* recognized as UTF-8.</p>
<div class='name'>Posted by <a href='http://dynamic.ropine.com/yo/'>Seth Gordon</a> on 20 Jan 2004 @ 01:20p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0008' title='Permanent link to comment number 8'>link</a>]</span></div>
</div>
<div id='comment0009' class='comment'>
<img align='right' src='http://www.gravatar.com/avatar.php?gravatar_id=c7524e6490c4ba08a4b289fd2d970246&amp;rating=PG&amp;size=40&amp;default=http://norman.walsh.name/graphics/empty-avatar.jpg' />
<p>Hi Norm,</p>
<p>this works just great in Mozilla Firebird 0.7 on Solaris 9. FWIW, I strongly support your "draconian" approach as well.</p>
<p>Cheers,</p>
<p>--Scott</p>
<div class='name'>Posted by <a href='http://sunsolve.Sun.COM/handbook_pub/'>Scott Hudson</a> on 20 Jan 2004 @ 03:41p
UTC <span class='link'>[<a href='http://norman.walsh.name/2004/01/17/application-xml#comment0009' title='Permanent link to comment number 9'>link</a>]</span></div>
</div>
</div>
<div class='addcomment'><a onclick='inlineComment(); return false;' href='/cgi-bin/talkback?page=/2004/01/17/application-xml'>Add</a> a comment or 
<a href='http://norman.walsh.name/2004/01/17/application-xml/comments.atom'>subscribe</a> to (existing) comments on this essay.
</div></div>
<div id="newcomment"></div>
<div class="footer">
<div class="moddate">Last modified: Sun, 11 Sep 2005</div>
<div class="rights">
<p>Copyright &#169; 2003–2010 Norman Walsh.
<!-- Creative Commons License -->
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/2.0/">Creative Commons License</a>.
<!-- /Creative Commons License -->
</p>
</div>


</div>
</div>
<div id="sidebar">
<div id="close"></div>
<div class='seealso'>
<h3>Maybe related:</h3>
<dl>
<dt><a href='http://norman.walsh.name/2008/09/26/textInPDF'>Text in PDF documents</a></dt>
<dt><a href='http://norman.walsh.name/2007/11/12/implNamespaces'>Implicit Namespaces</a></dt>
<dt><a href='http://norman.walsh.name/2006/04/13/validatingMicroformats'>Validating microformats</a></dt>
<dt><a href='http://norman.walsh.name/2005/10/07/xmlCatalogs'>XML Catalogs V1.1 is an OASIS Standard</a></dt>
<dt><a href='http://norman.walsh.name/2005/09/05/microformats'>Supporting Microformats</a></dt>
</dl>
</div>
<div class='tags'>
<h3>Tagged:</h3>
<dl>
<dt><a href='/tags#www' title='83 essays tagged "www"'>www</a></dt><dt><a href='/tags#xml' title='133 essays tagged "xml"'>xml</a></dt></dl>
</div>
<div>
<div class="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6050294877545622";
google_ad_width = 160;
google_ad_height = 90;
google_ad_format = "160x90_0ads_al";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FBFAE5";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="adsense">
<script type="text/javascript"><!--
google_ad_client = "pub-6050294877545622";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FBFAE5";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
google_ui_features = "rc:0";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>

<div class="ontheweb">
<h3>On the web:</h3>
<dl>
<dt><a title="Find related stories via Technorati" href="http://technorati.com/cosmos/search.html?url=http://norman.walsh.name/2004/01/17/application-xml"><img class="icon" src="/graphics/otw-technorati.png" height="16" width="16" border="0" alt="Find related stories via Technorati" /></a>&#160;<a title="Find related stories via Technorati" href="http://technorati.com/cosmos/search.html?url=http://norman.walsh.name/2004/01/17/application-xml">related</a></dt>
<dt><a href="http://del.icio.us/post?url=http://norman.walsh.name/2004/01/17/application-xml&amp;title=This%20is%20application%2Fxml" title="Bookmark This is application/xml in del.icio.us"><img class="icon" src="/graphics/otw-delicious.gif" alt="del.icio.us" height="16" width="16" border="0" /></a>&#160;<a href="http://del.icio.us/post?url=http://norman.walsh.name/2004/01/17/application-xml&amp;title=This%20is%20application%2Fxml" title="Bookmark This is application/xml on del.icio.us">bookmark
it!</a></dt>
<dt><a href="http://www.digg.com/submit?url=http://norman.walsh.name/2004/01/17/application-xml&amp;phase=2" title="digg this post"><img class="icon" src="/graphics/otw-digman.gif" height="16" width="16" alt="Submit This%20is%20application%2Fxml to digg.com" border="0" /></a>&#160;<a href="http://www.digg.com/submit?url=http://norman.walsh.name/2004/01/17/application-xml&amp;phase=2" title="digg this post">digg it!</a></dt>
<dt><a href="http://reddit.com/submit?url=http://norman.walsh.name/2004/01/17/application-xml&amp;title=This%20is%20application%2Fxml" title="Post This%20is%20application%2Fxml to reddit"><img class="icon" src="/graphics/otw-reddithead.png" alt="reddit" height="16" width="16" border="0" /></a>&#160;<a href="http://reddit.com/submit?url=http://norman.walsh.name/2004/01/17/application-xml&amp;title=This%20is%20application%2Fxml" title="Post This is application/xml to reddit">reddit!</a></dt>
</dl>
</div>
</div>
</body>
</html>
