<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Note to Self &#187; xhtml</title>
	<atom:link href="http://notetoself.vrensk.com/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://notetoself.vrensk.com</link>
	<description>lest I forget</description>
	<lastBuildDate>Fri, 23 Feb 2018 12:54:38 +0000</lastBuildDate>
	<language>sv-SE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>XHTML unsupported, prefer HTML</title>
		<link>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/</link>
		<comments>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 15:27:04 +0000</pubDate>
		<dc:creator>David Vrensk</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://notetoself.vrensk.com/?p=19</guid>
		<description><![CDATA[[This is a re-write of a project note I wrote in project over a year ago. Published here to make the world a better place.] There has been some commotion recently regarding XHTML and HTML, where standardistas have reiterated their arguments about XHTML: it’s a nice standard, but since is isn’t actually treated as XHTML [...]]]></description>
				<content:encoded><![CDATA[<p><em>[This is a re-write of a project note I wrote in project over a year ago.  Published here to make the world a better place.]</em></p>
<p>There has been some commotion recently regarding XHTML and HTML, where standardistas have reiterated their arguments about XHTML: it’s a nice standard, but since is isn’t actually treated as XHTML by browsers, it’s better to use HTML.</p>
<p>The “standard” text on this (at least for me) is <a href="http://www.hixie.ch/advocacy/xhtml" onclick="pageTracker._trackPageview('/outgoing/www.hixie.ch/advocacy/xhtml?referer=');">http://www.hixie.ch/advocacy/xhtml</a> from which I&#8217;d like to quote the executive summary:</p>
<blockquote>
<p>If you use XHTML, you should deliver it with the application/xhtml+xml MIME type. If you do not do so, you should use HTML4 instead of XHTML. The alternative, using XHTML but   delivering it as text/html, causes numerous problems that are outlined below. Unfortunately, IE6   does not support application/xhtml+xml (in fact, it does not support XHTML at all).</p>
</blockquote>
<p>I have come back to that text on several occasions, but it never quite convinced me.  I didn&#8217;t want to lose the well-formedness of XHTML.  Then I ran across <a href="http://www.webdevout.net/articles/beware-of-xhtml" onclick="pageTracker._trackPageview('/outgoing/www.webdevout.net/articles/beware-of-xhtml?referer=');">http://www.webdevout.net/articles/beware-of-xhtml</a> which made me change my mind. The article uses numerous examples to show that XHTML is not just a syntactically nicer version of HTML, but it actually has slightly differing rules for how to apply CSS.  So basically, in all projects that I have used XHTML, I have been relying on bugs in present browsers.  Ouch.</p>
<h3 id="time_to_change8212back">Time to change&#8212;back</h3>
<p>They promised us that XHTML was the future, so I haven&#8217;t worried too much about HTML lately. Are there any downsides to using HTML instead?  Well, not per se.  But the tools and platforms I use are slightly XHTML-centric.</p>
<ol>
<li>
<p>All the standard Rails helpers (form helpers, JS helpers, etc.) produce xhtml.  The simple solution is to drop this in a file in <code>lib/</code>:</p>
<pre><code>module ActionView::Helpers::TagHelper
  def tag_with_html_syntax(name, options = nil, open = true, escape = true)
    tag_without_html_syntax(name, options, open, escape)
  end
  alias_method_chain :tag, :html_syntax
end
</code></pre>
</li>
<li>
<p><a href="http://macromates.com/" onclick="pageTracker._trackPageview('/outgoing/macromates.com/?referer=');">TextMate</a> snippets produce XHTML. Most of them can be controlled by an  environment variable, but there are exceptions, like C-ret which produces produces an XHTML self-closed br element.</p>
</li>
<li>External tools, data sources and parsers are usually xml-centric.</li>
<li><a href="http://wordpress.org/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/?referer=');">WordPress</a>, which I have used for a few client projects lately, spits out XHTML. I&#8217;ll see if I can create a patch for that and have it accepted.</li>
</ol>
<p>Oh well.  XHTML, I&#8217;ll miss you.  HTML, can we be friends again?</p>
]]></content:encoded>
			<wfw:commentRss>http://notetoself.vrensk.com/2008/08/xhtml-unsupported-prefer-html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
