<?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>Rebuked</title><biblioid class="uri">http://norman.walsh.name/2004/01/14/rebuked</biblioid>
<volumenum>7</volumenum>
<issuenum>6</issuenum>
<pubdate>2004-01-13T06:55: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>Mark caught me serving broken XHTML. I wish my browser had done
me that favor.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#RSS"/>
</info>

<epigraph>
<attribution>
      <personname>
	<firstname>Scott</firstname>
<surname>Adams</surname>
      </personname>
    </attribution>
<para xml:id="p1">Creativity is allowing yourself to make mistakes. Art is
knowing which ones to keep.
</para>
</epigraph>

<para xml:id="p2">In a comment on my <link xlink:href="../12/postel">Postel’s
Law</link> post,
<personname>
      <firstname>Mark</firstname>
      <surname>Pilgrim</surname>
    </personname>
quite correctly chastises me for serving broken content. This, he goes on to
point out in a second comment, makes me a bozo and an incompetent fool, at least
by <personname>
      <firstname>Tim</firstname>
      <surname>Bray</surname>
    </personname>’s
<link xlink:href="http://www.tbray.org/ongoing/When/200x/2004/01/11/PostelPilgrim">metric</link>.
</para>

<para xml:id="p3">What happened was this: even though each essay is carefully
checked for well-formedness and even validity, that checking doesn’t
resolve the server-side includes. One of those includes I create
by hand. Last time I edited it, I carelessly wrote
it in HTML instead of XHTML and got an empty tag wrong. (Another include
had some bogus namespace declarations in it, but that’s not a well-formedness
problem.)</para>

<para xml:id="p4">Now, Mark was able to read the essay despite my error because
his browser ignored the error. Mark calls this lucky. I dunno. I think
there are two ways of looking at it:</para>

<orderedlist>
<listitem>
<para xml:id="p5"><emphasis>Browser good.</emphasis> The browser is applying heuristics
to recover from XML well-formedness errors, thus allowing users to read
the content. Reading the content is what’s important and the browser successfully
renders it.
</para>
</listitem>

<listitem>
<para xml:id="p6"><emphasis>Browser bad.</emphasis> The browser is applying heuristics
to recover from XML well-formedness errors, thus masking problems that only
a bozo or an incompetent fool would be unable or unwilling to fix. This sets
the expectation that applications should recover from XML well-formedness errors.
That would be wrong, not least of all because it
introduces the possibility of much subtler and more serious problems later
on, as one application’s set of heuristics differ from another’s.</para>
</listitem>
</orderedlist>

<para xml:id="p7">I infer that Mark subscribes the former view. I subscribe to the
latter. And I’m quite willing to play by the rules. The fact that
browsers render broken content is a bug. Had they rejected the content
as they should, it’s unlikely that my carelessness would ever have
been seen by the public. At the very least, that would have saved me
some embarrassment.</para>

</essay>

