<?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>Andrey Shchekin &#187; Standards</title>
	<atom:link href="http://blog.ashmind.com/category/standards/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ashmind.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 18:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Programming is complex: HTML5 data-*</title>
		<link>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/</link>
		<comments>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 11:55:40 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[Criticism]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2008/09/21/programming-is-complex-html5-data/</guid>
		<description><![CDATA[According to HTML5 spec, every attribute that starts with data- should be ignored by browser and considered a data needed for some scripts. For example: &#60;ul data-sortable="yes"&#62;…&#60;/ul&#62; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.w3.org/html/wg/html5/#custom">According to HTML5 spec</a>, every attribute that starts with data- should be ignored by browser and considered a data needed for some scripts. For example:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">ul</span> <span class="attr">data-sortable</span><span class="kwrd">="yes"</span><span class="kwrd">&gt;…</span><span class="kwrd">&lt;/</span><span class="html">ul</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>Does it remind you of something? It is a simplified version of XML namespaces, but limited to non-hierarchical data and with much more probability of data clash.</p>
<p>John Resig, in the comments to <a href="http://ejohn.org/blog/html-5-data-attributes/">his blog post</a> on the matter, says that &#8220;The learning curve and failure rate are too high to purely XML-based markup, which is why the data-* attribute exists as a means to implementing this solution&#8221;. I completely disagree with the learning curve argument, and this is why:</p>
<p>Programming <strong>is</strong> complex. </p>
<p>It is easy to forget about the complexity while doing smart new stuff. And new cool things is not what I am talking about. <em>Inventing</em> new thing is easy, since you do not have to think about all limitations of the new ones. Making them work for all occasions, <em>that</em> is what is complex.</p>
<p>It is easy to praise HTML5 over XHTML. It is easy to praise <a href="http://microformats.org/">microformats</a>.</p>
<p>But all standards are here for a reason. It is easy to punch Microsoft, however first versions of <a href="http://picasa.google.com/">Google&#8217;s Picasa</a> didn&#8217;t support non-English text in labels, at all. <em>Current</em> version of <a href="https://buzzword.acrobat.com">Adobe Buzzword</a> does not support Russian text. <em>Current</em> versions of Picasa and Opera do not support Drag&amp;Drop outside of application. I have never seen any of such problems in MS applications. In fact, Visual Basic supported Unicode for ages, while relatively modern web languages stumble on it.</p>
<p>I have already blogged about <a href="http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/">microformats being a hack</a>. And now I read about <a href="http://www.bbc.co.uk/blogs/radiolabs/2008/06/removing_microformats_from_bbc.shtml">BBC removing microformats support</a> due to problems with screen readers and semantics of abbr tag. Is it easy to remember that screen readers must be supported? No. Is it a shiny 2.0 kind-of-thing to think about them? No. But it is one of the multiple things you <strong>have</strong> <strong>to</strong> think about when making a wide-used standard.</p>
<p>Adding easy solutions when possible is a great thing. But it wrong to think of programmers as people who can only work with easy solutions. Flexibility is much more important than ease of use, and that&#8217;s the lesson that produced, for example, <a href="http://asp.net/mvc">ASP.NET MVC</a>. Also, easy ways should exists as shortcuts for flexible ones, not be orthogonal to them.</p>
<p>And while HTML may be about design, and text processing, and other things, data-* <strong>is</strong> about programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2008/09/21/programming-is-complex-html5-data/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>XHTML and microformats revisited</title>
		<link>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/</link>
		<comments>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/#comments</comments>
		<pubDate>Sat, 02 Jun 2007 21:26:25 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[History]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/06/03/xhtml-and-microformats-revisited/</guid>
		<description><![CDATA[Since my previous post on microformats, I have decided that my opinion in this matter needs more evidence. While I could collect all following information before writing the post, I didn&#8217;t have enough motivation to do the research. But now, after writing it, I have my self-esteem as a motivation. Ok, so I proposed using [...]]]></description>
			<content:encoded><![CDATA[<p>Since my <a href="http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/">previous post</a> on microformats, I have decided that my opinion in this matter needs more evidence.<br />
While I could collect all following information <em>before</em> writing the post, I didn&#8217;t have enough motivation to do the research.<br />
But now, <em>after</em> writing it, I have my self-esteem as a motivation.</p>
<p>Ok, so I proposed using (namespaced) custom tags instead of overloading existing ones.<br />
Now let&#8217;s go scientific and see what questions this solution may rise.</p>
<ol>
<li>Do modern browsers support CSS styling for unknown tags in HTML documents?</li>
<li>Can these tags be added to document without breaking standard compliance (validity)?</li>
<li>What possible problems can arise from using non-standard tags in modern browsers?</li>
<li>&#8230;</li>
</ol>
<p>For practical purposes, these can be converted into two main questions</p>
<ol>
<li><em>Should</em> custom tags work?</li>
<li><em>Do</em> custom tags work in modern browsers?</li>
</ol>
<p>And the answers are:</p>
<ol>
<li>By default, no.</li>
<li>Not perfectly, but yes.</li>
</ol>
<p>Now let&#8217;s discuss it in detail.</p>
<p>To understand the first answer is to understand what exactly is HTML, what is XML and what is XHTML.<br />
The most important (maybe obvious) point is: HTML is not a subset of XML and HTML is not compatible with XML.<br />
HTML and XML are both a subsets of SGML, and SGML does not provide a way to mix different subsets within a single document.<br />
So custom XML tags are not allowed in a HTML document.</p>
<p>While there are some solutions that allow arbitrary XML to be placed in a HTML document.<br />
For example, Microsoft has <a href="http://msdn2.microsoft.com/en-us/library/ms766512.aspx">XML Data Islands</a>.<br />
But they can be considered grammar hacks due to XML-HTML incompatibility.</p>
<p>Practically, however, HTML documents have to be viewed as &#8220;tag soup&#8221; by the browsers, so custom tags do not cause document rendering to fail.</p>
<p>So, if I am formally out of luck with HTML, what about XHTML?<br />
For simplicity, one can view XHTML is a rewrite of HTML to follow XML rules.<br />
So any custom tags should be allowed in XHTML if they are properly namespaced.</p>
<p>But there are a lot of problems with authoring XHTML.<br />
While some of them are more like challenges (script/style syntax), one is extremely important.<br />
The only way to tell modern browsers that that the document is XHTML is to serve it as application/xhtml+xml<br />
(See <a href="http://www.hixie.ch/advocacy/xhtml">this document</a> for an excellent explanation).<br />
And Internet Explorer <a href="http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx">doesn&#8217;t support XHTML</a> at all — so it refuses to render application/xhtml+xml.<br />
(It doesn&#8217;t mean IE can&#8217;t open XHTML. When XHTML document is sent as text/html, IE renders it with HTML engine).<br />
So I was out of luck once again.</p>
<p>At that point I understood the reasoning of microformats.<br />
Standard compliance is an important part of better Web, and there is no completely valid way to use custom tags.</p>
<p>But what is with the second question? It seems that actual situation is way better than one could suppose.<br />
Firefox, IE7 and Opera 9 all could render the custom tags style correctly in the document served as text/html.<br />
(To be really pedantic, I set DTD and xmlns to XHTML.<br />
After all, even if text/html documents are never parsed as XHTML, MIME Type is a server setting, not document one.)<br />
But IE7 has a one important characteristic — it does not render custom tag styles unless there is an xmlns for their namespace on html tag.<br />
No other tag is sufficient.</p>
<p>What does it mean? It means that while one can make a document that is styled correctly in these IE7,<br />
document part containing custom tags can not be reused without providing a namespace on the aggregating document.<br />
But it not an extremely important point, since for aggreagation one does not actually control styles as well.</p>
<p>So, practically speaking, one can create a document that uses custom XML tags for the cost of formal document validity.<br />
(The document can still be made formally valid by using custom DTD, but this will put IE and FF into <a href="http://www.quirksmode.org/">quirks mode</a>).</p>
<p>By the way, the challenge of adding custom tags to HTML was faced by MathML (mathematical markup language) community for years.<br />
If you are interested, you can read these discussions:</p>
<ul>
<li><a href="http://groups.google.ru/group/netscape.public.mozilla.mathml/browse_frm/thread/3c8bf8b155267234">Cannot render MathML — netscape.public.mozilla.mathml</a> (2001)</li>
<li><a href="http://groups.google.com/group/mozilla.dev.tech.mathml/browse_thread/thread/796fad03fdd4fc59/2b6952b15cd6a7d6">MathML-in-HTML5 — mozilla.dev.tech.mathml</a> (2006)</li>
</ul>
<p>Personally, I still see microformats as a step in wrong direction.<br />
While hCard provides HTML with a way to express the vCard semantics, I would prefer it to be just a HTML-compatible way, not the recommended one.<br />
I see HTML as standard that needs support, but not popularized extensions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/06/03/xhtml-and-microformats-revisited/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Microformats are Web 2.0 virus</title>
		<link>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/</link>
		<comments>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/#comments</comments>
		<pubDate>Mon, 21 May 2007 22:50:38 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[Criticism]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/05/22/microformats-are-web-20-virus/</guid>
		<description><![CDATA[I really like what is happening to Web. Cool-new-ajaxy sites are often actually more friendly, useful and powerful. Web development seem to become way less hacky. And a lot of standards that are gaining adoption are actually extremely useful (think about RSS). But there is a group of new standards that I fail to understand. [...]]]></description>
			<content:encoded><![CDATA[<p>I really like what is happening to Web.</p>
<p>Cool-new-ajaxy sites are often actually more friendly, useful and powerful.<br />
Web development seem to become way less hacky.<br />
And a lot of standards that are gaining adoption are actually extremely useful (think about RSS).</p>
<p>But there is a group of new standards that I fail to understand.<br />
They are called <a href="http://microformats.org/">microformats</a>.</p>
<p>In my understanding, there are three pillars of Ideal Web:</p>
<ol>
<li><strong>Markup</strong> provides semantics</li>
<li><strong>Styles</strong> provide presentation</li>
<li><strong>Scripts</strong> provide behavior</li>
</ol>
<p>These blocks are logical, understandable, maintanable and loosely coupled.<br />
It is worth noting that all strict DTDs are here to make the markup truly semantic and help achieve such separation.<br />
This is why I write &lt;strong&gt; instead of &lt;b&gt;.<br />
And this is what helps Web 2.0 applications to be really rich without being messy.</p>
<p>And for me, microformats are <em>viral semantics</em>.<br />
They infect markup and overload it with additional meaning, turning it into an ill, bloated mess.<br />
The microformats wiki <a href="http://microformats.org/wiki/hcard#Semantic_XHTML_Design_Principles">states</a>:</p>
<blockquote><p>Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference</p></blockquote>
<p>For me it seems more honest to say <em>overuse</em>, since the most interesting thing about microformats is that there are no actual problems they solve.<br />
Consider this fragment:</p>
<pre>&lt;span class="tel"&gt;&lt;span class="type"&gt;Home&lt;/span&gt; (&lt;span class="type"&gt;pref&lt;/span&gt;erred):
  &lt;span class="value"&gt;+1.415.555.1212&lt;/span&gt;
&lt;/span&gt;</pre>
<p>I would prefer:</p>
<pre>&lt;tel&gt;&lt;type&gt;Home&lt;/type&gt;(&lt;type&gt;pref&lt;/type&gt;erred):
   &lt;value&gt;+1.415.555.1212&lt;/value&gt;
&lt;/tel&gt;</pre>
<p>Now it does not seem that somebody is <em>reusing</em> iron to hammer nails.</p>
<p>It is 2007. XML is here and it <em>is</em> supported. X in XHTML stands for <em>extensible</em>.<br />
IE did not support CSS namespaces, but you could write styles like vcard\:tel for years.<br />
And this syntax does not seem like a show stopper to me.</p>
<p>Actually, upon reading on topic, I immediatelly googled for &#8220;microformats are stupid&#8221;.<br />
The first thing I found was <a href="http://www.oreillynet.com/onjava/blog/2006/07/why_i_hate_microformats.html">Why I Hate Microformats?</a> by Robert Cooper.<br />
He points to the same things I do, but he misses the fact that we had no need to wait for the IE7.</p>
<p>There is also a more interesting post <a href="http://cafe.elharo.com/xml/must-ignore-vs-microformats/">Must Ignore vs. Microformats</a> by Elliotte Rusty Harold.<br />
The one point I do not agree is that Elliotte argues that XML does not have to be valid.<br />
I do not see why the properly namespaced XML in XHTML would not be valid, but I will have to test it myself.</p>
<p>Web would be better if microformat authors read more about XHTML and did some browser tests before pushing this standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/05/22/microformats-are-web-20-virus/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

