<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: XHTML and error handling</title>
	<atom:link href="http://robertnyman.com/2005/06/26/xhtml-and-error-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/</link>
	<description>Web development and Internet trends</description>
	<lastBuildDate>Fri, 19 Mar 2010 15:16:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Doliaku! :::: &#187; ¿HTML o XHTML?</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-596936</link>
		<dc:creator>Doliaku! :::: &#187; ¿HTML o XHTML?</dc:creator>
		<pubDate>Sat, 08 Aug 2009 00:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-596936</guid>
		<description>[...] XHTML and error handling por Robert Nyman [...]</description>
		<content:encoded><![CDATA[<p>[...] XHTML and error handling por Robert Nyman [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-502186</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 19 Jan 2009 08:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-502186</guid>
		<description>Laurence,

If the HTML document were sent with the &lt;code&gt;application/xhtml+xml&lt;/code&gt; MIME type, it would not render at all.</description>
		<content:encoded><![CDATA[<p>Laurence,</p>
<p>If the HTML document were sent with the <code>application/xhtml+xml</code> MIME type, it would not render at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurence</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-501891</link>
		<dc:creator>Laurence</dc:creator>
		<pubDate>Sun, 18 Jan 2009 21:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-501891</guid>
		<description>Question:

What happens, say for example you create a document using HTML and you make a mistake in it, for example you forget to put the &#039;/&#039; beofre the closing &gt; in  so you would do: 
like you would of done in HTML but the page is an XHTML page? what would happen? in relation to viewin the page?</description>
		<content:encoded><![CDATA[<p>Question:</p>
<p>What happens, say for example you create a document using HTML and you make a mistake in it, for example you forget to put the &#8216;/&#8217; beofre the closing &gt; in  so you would do:<br />
like you would of done in HTML but the page is an XHTML page? what would happen? in relation to viewin the page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Design - standards based web design, development and training &#187; Some links for light reading (29/6/05)</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-17573</link>
		<dc:creator>Max Design - standards based web design, development and training &#187; Some links for light reading (29/6/05)</dc:creator>
		<pubDate>Sun, 19 Nov 2006 09:34:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-17573</guid>
		<description>[...] Validity, Guidelines and Law 	A principled argument 	Accessibility Only For Disabilities? 	XHTML and error handling 	Matt Haughey - Bloggers on Blogging 	TS [...]</description>
		<content:encoded><![CDATA[<p>[...] Validity, Guidelines and Law 	A principled argument 	Accessibility Only For Disabilities? 	XHTML and error handling 	Matt Haughey &#8211; Bloggers on Blogging 	TS [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: (&#62;_&#60;) Doliaku &#124; el blog  &#187; Blog Archive   &#187; Ã‚Â¿HTML o XHTML?</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-6163</link>
		<dc:creator>(&#62;_&#60;) Doliaku &#124; el blog  &#187; Blog Archive   &#187; Ã‚Â¿HTML o XHTML?</dc:creator>
		<pubDate>Fri, 21 Jul 2006 15:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-6163</guid>
		<description>[...]  Kesteren Activating the Right Layout Mode Using the Doctype Declaration por Henri Sivonen XHTML and error handling por Robert Nyman 	 				 [...]</description>
		<content:encoded><![CDATA[<p>[...]  Kesteren Activating the Right Layout Mode Using the Doctype Declaration por Henri Sivonen XHTML and error handling por Robert Nyman<br />
 				 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HTML Advisor &#187; HTML or XHTML?</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-2687</link>
		<dc:creator>HTML Advisor &#187; HTML or XHTML?</dc:creator>
		<pubDate>Wed, 18 Jan 2006 22:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-2687</guid>
		<description>[...] n Kesteren Activating the Right Layout Mode Using the Doctype Declaration by Henri Sivonen XHTML and error handling by Robert Nyman  	 	 					 	 	      	One Respo [...]</description>
		<content:encoded><![CDATA[<p>[...] n Kesteren Activating the Right Layout Mode Using the Doctype Declaration by Henri Sivonen XHTML and error handling by Robert Nyman  	</p>
<p> 	One Respo [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Design - standards based web design, development and training  &#187; Blog Archive   &#187; Some links for light reading (29/6/05)</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-2379</link>
		<dc:creator>Max Design - standards based web design, development and training  &#187; Blog Archive   &#187; Some links for light reading (29/6/05)</dc:creator>
		<pubDate>Sun, 01 Jan 2006 21:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-2379</guid>
		<description>[...] Validity, Guidelines and Law 	A principled argument 	Accessibility Only For Disabilities? 	XHTML and error handling 	Matt Haughey - Bloggers on Blogging 	TSN.ca: Reloaded 	 [...]</description>
		<content:encoded><![CDATA[<p>[...] Validity, Guidelines and Law 	A principled argument 	Accessibility Only For Disabilities? 	XHTML and error handling 	Matt Haughey &#8211; Bloggers on Blogging 	TSN.ca: Reloaded 	 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-1550</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Sun, 06 Nov 2005 12:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-1550</guid>
		<description>Steve,

Well, its&#039; ok; I rather think this was the place to post such a comment.

Regarding serving XHTML 1.0 as &lt;code&gt;text/html&lt;/code&gt; or &lt;code&gt;application/xhtml+xml&lt;/code&gt;, I can live with that. But I have to say it&#039;s disappointing to see so many using the Transitional doctype.</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>Well, its&#8217; ok; I rather think this was the place to post such a comment.</p>
<p>Regarding serving XHTML 1.0 as <code>text/html</code> or <code>application/xhtml+xml</code>, I can live with that. But I have to say it&#8217;s disappointing to see so many using the Transitional doctype.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Williams</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-1549</link>
		<dc:creator>Steve Williams</dc:creator>
		<pubDate>Sun, 06 Nov 2005 02:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-1549</guid>
		<description>Oops, sorry, meant to post in most recent HTML/XHTML article!</description>
		<content:encoded><![CDATA[<p>Oops, sorry, meant to post in most recent HTML/XHTML article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Williams</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-1548</link>
		<dc:creator>Steve Williams</dc:creator>
		<pubDate>Sun, 06 Nov 2005 02:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-1548</guid>
		<description>Your post got me interested enough to look around some of the more popular *standardista* sites, and most I know of are using xhtml transitional doctypes, and none I visited (except Tommy&#039;s dead parrot) are serving as app xhtml/xml (according to Firefox Mac)?

A little disappointing?</description>
		<content:encoded><![CDATA[<p>Your post got me interested enough to look around some of the more popular *standardista* sites, and most I know of are using xhtml transitional doctypes, and none I visited (except Tommy&#8217;s dead parrot) are serving as app xhtml/xml (according to Firefox Mac)?</p>
<p>A little disappointing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert&#8217;s talk &#187; HTML or XHTML?</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-1497</link>
		<dc:creator>Robert&#8217;s talk &#187; HTML or XHTML?</dc:creator>
		<pubDate>Wed, 02 Nov 2005 21:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-1497</guid>
		<description>[...] en     Activating the Right Layout Mode Using the Doctype Declaration by Henri Sivonen     XHTML and error handling by Robert Nyman 							 				 						 	 	 		 		 		 [...]</description>
		<content:encoded><![CDATA[<p>[...] en     Activating the Right Layout Mode Using the Doctype Declaration by Henri Sivonen     XHTML and error handling by Robert Nyman 							</p>
<p> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-784</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Tue, 23 Aug 2005 06:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-784</guid>
		<description>Splash!,

That was an interesting approach! Me myself I&#039;m not sure  if the users should/are capable of making that decision or not. Many users just get scared away by messages about errors that require of them to make a call about what to do next.

Thanks for the tip about the &lt;acronym title=&quot;eXtensible markup Language&quot;&gt;XML&lt;/acronym&gt; check class!</description>
		<content:encoded><![CDATA[<p>Splash!,</p>
<p>That was an interesting approach! Me myself I&#8217;m not sure  if the users should/are capable of making that decision or not. Many users just get scared away by messages about errors that require of them to make a call about what to do next.</p>
<p>Thanks for the tip about the <acronym title="eXtensible markup Language">XML</acronym> check class!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Splash!</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-783</link>
		<dc:creator>Splash!</dc:creator>
		<pubDate>Mon, 22 Aug 2005 22:28:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-783</guid>
		<description>I think a good approach the browser developers could use is to show an error message but give options on what the user wants to do next. For example, it could say whatever error, and provide buttons for &quot;View Page Anyway&quot;, &quot;Go back&quot; and anything else which would be worth doing. 

This way, it would allow the user to get to the information if it is important, but also make it clear something is not as it should be, thereby not promoting/allowing bad markup (ie. like HTML did).

Checking X(HT)ML for well-formedness on the server side is possible using PHP. I am currently writing it into my upcoming site. The xml check class at &lt;a href=&quot;http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_xml_check.html&quot; rel=&quot;nofollow&quot;&gt;this site&lt;/a&gt; is useful, especially combined with the output control system in PHP, by using the callback function. It would allow you to check the markup before sending it out, and if there is a problem, you can send out a different friendly error page to the user (without well-formedness errors if this page is in XHTML too....!!).</description>
		<content:encoded><![CDATA[<p>I think a good approach the browser developers could use is to show an error message but give options on what the user wants to do next. For example, it could say whatever error, and provide buttons for &#8220;View Page Anyway&#8221;, &#8220;Go back&#8221; and anything else which would be worth doing. </p>
<p>This way, it would allow the user to get to the information if it is important, but also make it clear something is not as it should be, thereby not promoting/allowing bad markup (ie. like HTML did).</p>
<p>Checking X(HT)ML for well-formedness on the server side is possible using PHP. I am currently writing it into my upcoming site. The xml check class at <a href="http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_xml_check.html" rel="nofollow">this site</a> is useful, especially combined with the output control system in PHP, by using the callback function. It would allow you to check the markup before sending it out, and if there is a problem, you can send out a different friendly error page to the user (without well-formedness errors if this page is in XHTML too&#8230;.!!).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-782</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 22 Aug 2005 09:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-782</guid>
		<description>bodaniel,

Yes, built-in validation in the server-side languages would be a nice thing. Of course you can build it yourself, load the output into some &lt;acronym title=&quot;eXtensible markup Language&quot;&gt;XML&lt;/acronym&gt; object etc, but I for one would like it as an easier feature to use.</description>
		<content:encoded><![CDATA[<p>bodaniel,</p>
<p>Yes, built-in validation in the server-side languages would be a nice thing. Of course you can build it yourself, load the output into some <acronym title="eXtensible markup Language">XML</acronym> object etc, but I for one would like it as an easier feature to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bodaniel</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-778</link>
		<dc:creator>bodaniel</dc:creator>
		<pubDate>Mon, 22 Aug 2005 07:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-778</guid>
		<description>Robert,

I think the browser should display an error message if the XHTML isn&#039;t valid. The cryptical part of the error message would probably be &quot;Unexpected element X found ...&quot; or some other common validation error message. It would be nice if the main part of the error message was easily understood by all users. The user should also be told what he/she should do to get back to where he/she came from.

I don&#039;t think the browser should have to guess what the content of the invalid XHTML actually should have been.

One thing I really would like is a better XHTML validation support in server side scripting languages (eg JSP). The XHTML produced by the scripting language should automatically be validated while it is beeing generated and if the validation process finds an error the user should be redirected to my JSP error handling page where I, as a programmer, get the chance to find out about the error and can choose what to display for the user. If I am unable to output valid XHTML even on the error handling page, I suck. It might sometimes be a good idea to output HTML instead of XHTML on the error handling page.</description>
		<content:encoded><![CDATA[<p>Robert,</p>
<p>I think the browser should display an error message if the XHTML isn&#8217;t valid. The cryptical part of the error message would probably be &#8220;Unexpected element X found &#8230;&#8221; or some other common validation error message. It would be nice if the main part of the error message was easily understood by all users. The user should also be told what he/she should do to get back to where he/she came from.</p>
<p>I don&#8217;t think the browser should have to guess what the content of the invalid XHTML actually should have been.</p>
<p>One thing I really would like is a better XHTML validation support in server side scripting languages (eg JSP). The XHTML produced by the scripting language should automatically be validated while it is beeing generated and if the validation process finds an error the user should be redirected to my JSP error handling page where I, as a programmer, get the chance to find out about the error and can choose what to display for the user. If I am unable to output valid XHTML even on the error handling page, I suck. It might sometimes be a good idea to output HTML instead of XHTML on the error handling page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-769</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Sun, 21 Aug 2005 09:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-769</guid>
		<description>Jim,

&lt;blockquote&gt;If you have to deal with other peopleÃ¢â‚¬â„¢s bad code, then XHTML is simply the wrong tool for the job.&lt;/blockquote&gt;
Yes and no. For me, to write valid code and then present the flaws to the people responsible also helps me in pushing them toward demanding more from their tools and the content providers.

I&#039;m not sure an error parser would be the best thing, I don&#039;t know which approach would be the best. Hence the discussion. :-)
But, as Chris mentions about Opera (I haven&#039;t tested this myself), to show the error below while still displaying the web page sounds like a much better approach to me.

Chris,

Typos fixed, thank you. However, I&#039;m not sure about what case errors you refer to?

bodaniel,

For a parser to go through valid &lt;acronym title=&quot;eXtensible HyperText Markup Language&quot;&gt;XHTML&lt;/acronym&gt;, it should, theoratically, be faster than looking for optional tags.
But then we come back to those cases where the code isn&#039;t valid, and how the web browsers should handle that...</description>
		<content:encoded><![CDATA[<p>Jim,</p>
<blockquote><p>If you have to deal with other peopleÃ¢â‚¬â„¢s bad code, then XHTML is simply the wrong tool for the job.</p></blockquote>
<p>Yes and no. For me, to write valid code and then present the flaws to the people responsible also helps me in pushing them toward demanding more from their tools and the content providers.</p>
<p>I&#8217;m not sure an error parser would be the best thing, I don&#8217;t know which approach would be the best. Hence the discussion. <img src='http://robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
But, as Chris mentions about Opera (I haven&#8217;t tested this myself), to show the error below while still displaying the web page sounds like a much better approach to me.</p>
<p>Chris,</p>
<p>Typos fixed, thank you. However, I&#8217;m not sure about what case errors you refer to?</p>
<p>bodaniel,</p>
<p>For a parser to go through valid <acronym title="eXtensible HyperText Markup Language">XHTML</acronym>, it should, theoratically, be faster than looking for optional tags.<br />
But then we come back to those cases where the code isn&#8217;t valid, and how the web browsers should handle that&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bodaniel</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-765</link>
		<dc:creator>bodaniel</dc:creator>
		<pubDate>Thu, 18 Aug 2005 19:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-765</guid>
		<description>Chris,
if you use javascript to update the XHTML you have to see to it that the javascript doesn&#039;t make the XHTML invalid.

I thought XHTML was the next step towards fast rendering browsers, that shouldn&#039;t have to guess what your messy HTML actually tries to say? If the browser has to fix every error in the XHTML document you would also need recommendations telling how errors in XHTML documents should be handled. Try to think of all possible errors that can occur and what the error handling code would look like. What should the browser do if it is within an ordered list and finds the end of a heading?</description>
		<content:encoded><![CDATA[<p>Chris,<br />
if you use javascript to update the XHTML you have to see to it that the javascript doesn&#8217;t make the XHTML invalid.</p>
<p>I thought XHTML was the next step towards fast rendering browsers, that shouldn&#8217;t have to guess what your messy HTML actually tries to say? If the browser has to fix every error in the XHTML document you would also need recommendations telling how errors in XHTML documents should be handled. Try to think of all possible errors that can occur and what the error handling code would look like. What should the browser do if it is within an ordered list and finds the end of a heading?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hester</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-762</link>
		<dc:creator>Chris Hester</dc:creator>
		<pubDate>Mon, 15 Aug 2005 13:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-762</guid>
		<description>Tommy Olsson wrote:

&lt;blockquote cite=&quot;http://www.robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-591&quot;&gt;But an XHTML document is static. It is not executed and modified in real-time, so there is no need for runtime exception handling.&lt;/blockquote&gt;

Not quite. A document can be altered many times after loading by JavaScript. A single error there may render a valid document invalid. Also the content of a frame might be refreshed, bringing new and possibly invalid code into the page. XHTML documents are, like HTML ones, dynamic.

This post interests me because I have just made a round of XML tests (see &lt;a href=&quot;http://www.designdetector.com/archives/05/08/XMLBrowserDifferences.php&quot; title=&quot;&quot; rel=&quot;nofollow&quot;&gt;XML Browser Differences&lt;/a&gt;). I&#039;m delighted to say that an error in an XHTML page only gives a blank yellow screen in one browser - Firefox. In Opera the document is parsed and displayed! (The error message appears underneath.)

What&#039;s more, IE6 also does the same, that is for XML documents. I was very surprised by this. Good news for the user, unless they use Firefox!

In my opinion, the browser should attempt to recover the document as far as possible, so at least something is displayed. After all, a single fault is not likely to affect the rest of the content enough to warrant not showing any of it at all. (Or perhaps I&#039;m wrong in certain cases.) XHTML should therefore be no different than HTML. Browsers are now very good at fixing bad markup. Of course then we&#039;re left with the argument about encouraging such markup by the browser fixing errors.

By the way, you might want to fix those typo and case errors in the main post... :-)</description>
		<content:encoded><![CDATA[<p>Tommy Olsson wrote:</p>
<blockquote cite="http://www.robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-591"><p>But an XHTML document is static. It is not executed and modified in real-time, so there is no need for runtime exception handling.</p></blockquote>
<p>Not quite. A document can be altered many times after loading by JavaScript. A single error there may render a valid document invalid. Also the content of a frame might be refreshed, bringing new and possibly invalid code into the page. XHTML documents are, like HTML ones, dynamic.</p>
<p>This post interests me because I have just made a round of XML tests (see <a href="http://www.designdetector.com/archives/05/08/XMLBrowserDifferences.php" title="" rel="nofollow">XML Browser Differences</a>). I&#8217;m delighted to say that an error in an XHTML page only gives a blank yellow screen in one browser &#8211; Firefox. In Opera the document is parsed and displayed! (The error message appears underneath.)</p>
<p>What&#8217;s more, IE6 also does the same, that is for XML documents. I was very surprised by this. Good news for the user, unless they use Firefox!</p>
<p>In my opinion, the browser should attempt to recover the document as far as possible, so at least something is displayed. After all, a single fault is not likely to affect the rest of the content enough to warrant not showing any of it at all. (Or perhaps I&#8217;m wrong in certain cases.) XHTML should therefore be no different than HTML. Browsers are now very good at fixing bad markup. Of course then we&#8217;re left with the argument about encouraging such markup by the browser fixing errors.</p>
<p>By the way, you might want to fix those typo and case errors in the main post&#8230; <img src='http://robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-760</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Mon, 08 Aug 2005 11:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-760</guid>
		<description>Faruk,

&gt; ItÃ¢â‚¬â„¢s the strictness of the syntax that promotes best practices tons better, not the actual tags/elements.

&gt; But HTML doesnÃ¢â‚¬â„¢t enforce you in any way to apply best practices to your code, whereas XHTML does.

Which best practices are enforced/promoted by XHTML served as text/html?

&gt; Nobody on the planet ever learned how to do XHTML right in one go. Neither did you. We all need to take things one step at a time, in this case that means learning XHTML one step at a time. You canÃ¢â‚¬â„¢t go expecting people to switch from old school, nested table-ridden, font tag-polluted HTML to clean, semantic, well-formed XHTML in one go. But thatÃ¢â‚¬â„¢s exactly what youÃ¢â‚¬â„¢re saying, and thatÃ¢â‚¬â„¢s very elitist of you.

Don&#039;t put words in my mouth.

If you have old-school, nested table-ridden, font tag-polluted HTML, then there are many intermediate steps you can take without switching to XHTML that will improve the quality of your code.

You don&#039;t have to switch to XHTML.  For the people who can&#039;t do XHTML right, there are no benefits.  If you switch to XHTML for the sake of &quot;clean code&quot; or &quot;best practices&quot;, and you start writing invalid XHTML, then you&#039;ve taken a step backwards, not forwards.  Pointing this out isn&#039;t elitist, it&#039;s using common sense.

XHTML isn&#039;t a club all the smart people join, it&#039;s a tool.  What I am saying is that you should use the right tool for the job.  For people who cannot do XHTML correctly, XHTML is the wrong tool for the job and HTML 4.01 is the right tool for the job.  How on earth is that elitist?

&gt; Keeping them at HTML will keep them away from promoting best practices effectively

How?  Does HTML prevent them from writing valid code?  No.  Does HTML prevent them from using CSS for layout?  No.  Does HTML prevent them from writing accessible pages?  No.  HTML is not incompatible with and doesn&#039;t discourage best practices.

Robert,

&gt; But to be clear, my scenario is often that I write and deliver valid code. Enter .NET-based CMS systems, third party content providers and other web developers/administrators that donÃ¢â‚¬â„¢t have the knowledge (or even interest) to do that.

If you have to deal with other people&#039;s bad code, then XHTML is simply the wrong tool for the job.

Jeroen,

&gt; I cannot get it into my head why anyone would want to enforce such a strict error handling.

Because web authors broke Postel&#039;s Law.  Because developers of authoring tools broke Postel&#039;s Law.  Postel&#039;s Law only holds up when both parties respect it.

Robert,

&gt; I think itÃ¢â‚¬â„¢s a huge difference. In those scenarios where the errors you mention occur, you (should) have proper error handling to show it gracefully to the end user. With application/xhtml+xml we donÃ¢â‚¬â„¢t get that option.

We don&#039;t get that option with JPEGs, GIFs, PNGs, MPEGs, or pretty much any other media type that is directly presented to the end-user without opportunity to catch errors.  Nobody&#039;s asked for a JPEG parser that can automatically recover from corrupt images.</description>
		<content:encoded><![CDATA[<p>Faruk,</p>
<p>&gt; ItÃ¢â‚¬â„¢s the strictness of the syntax that promotes best practices tons better, not the actual tags/elements.</p>
<p>&gt; But HTML doesnÃ¢â‚¬â„¢t enforce you in any way to apply best practices to your code, whereas XHTML does.</p>
<p>Which best practices are enforced/promoted by XHTML served as text/html?</p>
<p>&gt; Nobody on the planet ever learned how to do XHTML right in one go. Neither did you. We all need to take things one step at a time, in this case that means learning XHTML one step at a time. You canÃ¢â‚¬â„¢t go expecting people to switch from old school, nested table-ridden, font tag-polluted HTML to clean, semantic, well-formed XHTML in one go. But thatÃ¢â‚¬â„¢s exactly what youÃ¢â‚¬â„¢re saying, and thatÃ¢â‚¬â„¢s very elitist of you.</p>
<p>Don&#8217;t put words in my mouth.</p>
<p>If you have old-school, nested table-ridden, font tag-polluted HTML, then there are many intermediate steps you can take without switching to XHTML that will improve the quality of your code.</p>
<p>You don&#8217;t have to switch to XHTML.  For the people who can&#8217;t do XHTML right, there are no benefits.  If you switch to XHTML for the sake of &#8220;clean code&#8221; or &#8220;best practices&#8221;, and you start writing invalid XHTML, then you&#8217;ve taken a step backwards, not forwards.  Pointing this out isn&#8217;t elitist, it&#8217;s using common sense.</p>
<p>XHTML isn&#8217;t a club all the smart people join, it&#8217;s a tool.  What I am saying is that you should use the right tool for the job.  For people who cannot do XHTML correctly, XHTML is the wrong tool for the job and HTML 4.01 is the right tool for the job.  How on earth is that elitist?</p>
<p>&gt; Keeping them at HTML will keep them away from promoting best practices effectively</p>
<p>How?  Does HTML prevent them from writing valid code?  No.  Does HTML prevent them from using CSS for layout?  No.  Does HTML prevent them from writing accessible pages?  No.  HTML is not incompatible with and doesn&#8217;t discourage best practices.</p>
<p>Robert,</p>
<p>&gt; But to be clear, my scenario is often that I write and deliver valid code. Enter .NET-based CMS systems, third party content providers and other web developers/administrators that donÃ¢â‚¬â„¢t have the knowledge (or even interest) to do that.</p>
<p>If you have to deal with other people&#8217;s bad code, then XHTML is simply the wrong tool for the job.</p>
<p>Jeroen,</p>
<p>&gt; I cannot get it into my head why anyone would want to enforce such a strict error handling.</p>
<p>Because web authors broke Postel&#8217;s Law.  Because developers of authoring tools broke Postel&#8217;s Law.  Postel&#8217;s Law only holds up when both parties respect it.</p>
<p>Robert,</p>
<p>&gt; I think itÃ¢â‚¬â„¢s a huge difference. In those scenarios where the errors you mention occur, you (should) have proper error handling to show it gracefully to the end user. With application/xhtml+xml we donÃ¢â‚¬â„¢t get that option.</p>
<p>We don&#8217;t get that option with JPEGs, GIFs, PNGs, MPEGs, or pretty much any other media type that is directly presented to the end-user without opportunity to catch errors.  Nobody&#8217;s asked for a JPEG parser that can automatically recover from corrupt images.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Nyman</title>
		<link>http://robertnyman.com/2005/06/26/xhtml-and-error-handling/#comment-684</link>
		<dc:creator>Robert Nyman</dc:creator>
		<pubDate>Mon, 18 Jul 2005 11:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertnyman.com/?p=94#comment-684</guid>
		<description>Gabriel,

Thanks for the suggestions!  :-)</description>
		<content:encoded><![CDATA[<p>Gabriel,</p>
<p>Thanks for the suggestions!  <img src='http://robertnyman.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
