<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
    
    
    
<title>This is application/xhtml+xml</title><biblioid class="uri">http://norman.walsh.name/2004/01/17/xhtml/application-xhtml</biblioid>
<volumenum>7</volumenum>
<issuenum>12</issuenum>
<pubdate>2004-01-19T23:02:00-05:00</pubdate>
<date>$Date: 2005-09-11 10:27:02 -0400 (Sun, 11 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2004</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>This essay is served as application/xhtml+xml. If you have difficulty,
you may prefer the text/html
version: http://norman.walsh.name/2004/01/18/text-html</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#TheWeb"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#XML"/>
</info>

<epigraph>
<attribution>
      <personname>
	<firstname>Dr.</firstname>
<surname>Johnson</surname>
      </personname>
    </attribution>
<para>Nothing will ever be attempted, if all possible
objections must be first overcome.</para>
</epigraph>

<para xml:id="p1">This essay is served with the MIME type “application/xhtml+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).</para>

<para xml:id="p2">In the course of
<link xlink:href="../../12/postel">recent public debate</link>
on the appropriateness of recovering from well-formedness errors in XHTML,
<personname>
      <firstname>Mark</firstname>
      <surname>Pilgrim</surname>
    </personname>
<link xlink:href="http://diveintomark.org/archives/2004/01/14/thought_experiment">caught
me</link> 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.)</para>

<para xml:id="p3">I’m sticking to my guns and remaining a “draconian.” So 
<personname>
      <firstname>David</firstname>
      <surname>Carlisle</surname>
</personname> <link xlink:href="../../14/rebuked">challenged me</link> 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.</para>

<para xml:id="p4">In general, I expect that there are still far too many people
using browsers that don’t know what to do with
<code>application/xml</code> content to make it practical to serve it exclusively.
But I’m not <emphasis>sure</emphasis> 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!)</para>

<para xml:id="p5">So this essay is an experiment. If you can’t read this version
of this essay but you can read the
<link xlink:href="../../18/text-html"><code>text/html</code> version</link>, let
me know: tell me what browser you’re using and what platform, please.
You can report successes too, of course.</para>

<para xml:id="p6">I’ll keep a little summary of the statistics on the <code>text/html</code>
page.</para>

<section xml:id="lessons">
<title>Lessons Learned</title>

<para xml:id="p7">I’ve changed a few things in response to feedback. I think these will
be improvements: [Last update: 19 Jan 2004.]</para>

<itemizedlist>
<listitem>
<para xml:id="p8">The recommended MIME type for XHTML is 
“<code>application/xhtml+xml</code>”.</para>
</listitem>
<listitem>
<para xml:id="p9">But some browsers (notably IE) handle “<code>application/xml</code>” better than
“<code>application/xhtml+xml</code>”.</para>
</listitem>
<listitem>
<para xml:id="p10">A little content-negotiation is probably in order. Beyond that,
the MathML folks have clearly
<link xlink:href="http://www.w3.org/Math/XSL/">blazed a trail</link> for us to
follow. (Thanks, guys!)</para>
</listitem>
<listitem>
<para xml:id="p11">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!)</para>
</listitem>
<listitem>
<para xml:id="p12">Remove <code>&amp;nbsp;</code> 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).</para>
</listitem>
</itemizedlist>
</section>
</essay>

