RSS as the new XML, II: Microformats

Another technology I think might be instrumental in making RSS (yes, and/or Atom) the standard for Web Services is Microformats. Microformats is a really neat idea that basically means having display data and semantic data in the same document – so that the data is both machine readable as in XML and human-readable (or rather, browser-readable) as in HTML.

It is pretty simple, actually. For example, with the microformat for hCalendar you take an event description like “Web 2.0 Conference: October 5-7, at the Argent Hotel, San Francisco, CA” and format it as follows:

<span class="vevent">
<a class="url" href=""&gt;
<span class="summary">Web 2.0 Conference</span>:
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
<abbr class="dtend" title="2005-10-08">7</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span>

What you get is an XHTML document that contains the text you want the user to see together with elements that make it possible for another app to figure out what’s the date, location, URL etc. Yet the same data, viewed in a browser, would look just like the original text “Web 2.0 Conference: October 5-7, at the Argent Hotel, San Francisco, CA”.

Most interesting for me, as the hCalendar wiki page says (apparently they thought of this before me ;)) this is suitable for embedding in RSS. That’s especially useful since RSS is different than many other XML grammars in that it is often more or less sent directly to display – the <description> part of it, at least (and you can usually make a good guess on where the <link> and <title> parts go as well) so it can pretty nice to be able to format the description text so that it can be either parsed by a machine or read by a human.

(Actually, writing this made me wonder about having the feed itself as a microformat, so that the HTML pages of a website can be parsed by a feed reader without requiring a dedicated RSS feed – and apparently the microformats guys are already working on that, too. It might not be the best option, because of traffic issues, but I think it may still be a good idea in certain cases)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s