RSS 2.0 does not exist yet. It is the code name for a proposed merging of the RSS 0.9x and RSS 1.0 branches. It is basically RSS 0.9x + modules (imported via XML namespaces). RSS 2.0 is an attempt to maintain a core of simplicity (the greatest strength of RSS 0.9x) while allowing for the extensibility of decentralized module development (the greatest strength of RSS 1.0). Many people in the RSS community feel that, while the lack of extensibility in RSS 0.9x is too limiting, the full-blown RDF syntax of RSS 1.0 is overkill for the purposes of syndicating weblogs. A basic RSS 2.0 document is no more complicated to learn (or type by hand) than a basic RSS 0.9x document, and a complex RSS 2.0 document can be just as metadata-rich as a complex RSS 1.0 document.

This is not a new idea. Rael Dornfest mocked up a demo of RSS 2.0 in June 2000; he just didn’t know what to call it (the version number is marked as “???”). Recently, Sam Ruby brought up the idea again, built his own prototype, and verified that it is backward-compatible with all the major news aggregators on the market. In other words, we could all start using this tomorrow and nobody would have to change a single line of code.

Here’s a basic RSS 2.0 document:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<!-- THIS IS A PROTOTYPE! RSS 2.0 IS NOT A FORMAL SPECIFICATION! -->
<channel>
<title>dive into mark</title>
<link>http://diveintomark.org/</link>
<description>A lot of effort went into making this effortless.</description>

<item>
<title>Troubleshooting with single-user mode</title>
<link>http://diveintomark.org/archives/2002/09/04.html#troubleshooting_with_singleuser_mode</link>
<description>On any Mac OS X box, you can enter &quot;single-user mode&quot; by holding down command-S at startup. This gives you a root prompt and a read-only hard drive, from which you can commence your life of quiet desperation, er, troubleshooting.</description>
</item>

<item>
<title>First of all</title>
<link>http://diveintomark.org/archives/2002/09/04.html#first_of_all</link>
<description>Ian Hickson: &quot;Americans are fat. Smokers are stupid. People who don't speak Perl are irrelevant.&quot;</description>
</item>

</channel>
</rss>

Note that, except for the version number, this could easily be mistaken for an RSS 0.9x document. Any program that can read RSS 0.9x can read RSS 2.0 without modification.

Now here is a more complex RSS 2.0 document:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!-- THIS IS A PROTOTYPE! RSS 2.0 IS NOT A FORMAL SPECIFICATION! -->
<channel>
<title>dive into mark</title>
<link>http://diveintomark.org/</link>
<description>A lot of effort went into making this effortless.</description>
<dc:language>en-us</dc:language>
<dc:creator>Mark Pilgrim (f8dy@diveintomark.org)</dc:creator>
<dc:rights>Copyright 2002 Mark Pilgrim</dc:rights>
<dc:date>2002-09-04T17:40:33-05:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.21" />
<admin:errorReportsTo rdf:resource="mailto:f8dy@diveintomark.org"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

<item>
<title>Troubleshooting with single-user mode</title>
<link>http://diveintomark.org/archives/2002/09/04.html#troubleshooting_with_singleuser_mode</link>
<description>On any Mac OS X box, you can enter &quot;single-user mode&quot; by holding down command-S at startup. This gives you a root prompt and a read-only hard drive, from which you can commence your life of quiet desperation, er, troubleshooting.</description>
<content:encoded><![CDATA[<p>On any Mac OS X box, you can enter <q>single-user mode</q> by holding down <kbd>command-S</kbd> at startup. This gives you a root prompt and a read-only hard drive, from which you can commence your <del>life of quiet desperation</del>, er, troubleshooting.</p>

<p>Normally, you would do this to repair the drive:</p>

<blockquote>
<p><code># fsck -y</code></p>
</blockquote>

<p>This is exactly equivalent to booting off the install CD and repairing your disk using Disk Utility. In Mac OS X, Disk Utility is a graphical frontend on top of <code>fsck</code>. It works just as well in single-user mode because the drive is mounted read-only, so there's no chance of files being modified while the repair is running.</p>]]></content:encoded>
<dc:subject>Apple</dc:subject>
<dc:date>2002-09-04T17:40:33-05:00</dc:date>
</item>

<item>
<title>First of all</title>
<link>http://diveintomark.org/archives/2002/09/04.html#first_of_all</link>
<description>Ian Hickson: &quot;Americans are fat. Smokers are stupid. People who don't speak Perl are irrelevant.&quot;</description>
<content:encoded><![CDATA[<cite>Ian Hickson</cite>: <q><a href="http://ln.hixie.ch/?start=1030823786&amp;count=1">Americans are fat. Smokers are stupid. People who don't speak Perl are irrelevant.</a></q>]]></content:encoded>
<dc:subject></dc:subject>
<dc:date>2002-09-04T13:54:20-05:00</dc:date>
</item>

</channel>
</rss>

Note that this is just as metadata-rich as an RSS 1.0 document. Modules are imported and referenced via XML namespaces. Also note that there are absolutely no additions to the core namespace (compared to the basic example above). You get a channel element which contains a series of item elements, each of which can have a title, link, and description (all of which are plain text, no encoded HTML). Everything else is handled by RSS modules which already exist. Full HTML posts are included with mod_content. Dates (including item-level dates) are included with Dublin Core. Contact information is included with mod_admin. Information about how often aggregators should poll is included with mod_syndication. Your feed can be as rich as you want. If your news aggregator supports the extra metadata, great; if it only supports the basic title-link-description, well, you’ve got that too.

I have constructed a prototype of an RSS 2.0 template for Movable Type, and used it to publish a prototype of an RSS 2.0 feed of dive into mark. Feel free to test it in your favorite news aggregator.

§

Respond privately

I am no longer accepting public comments on this post, but you can use this form to contact me privately. (Your message will not be published.)



§

firehosecodeplanet

© 2001–9 Mark Pilgrim