Extensions to RSS 2.0 and Atom 1.0

Extensions to RSS 2.0 and Atom 1.0 enable you to take advantage of the popular feed formats to be able to move information within the whole feed ecology while adding more information than is allowed in the simple base RSS or Atom vocabulary.

You can insert foreign XML elements (ones that are not defined in the respective specifications) into RSS 2.0 and Atom 1.0 by using XML namespaces. That is, with a few exceptions in Atom 1.0,[72]


I do not cover RSS 1.0 extensibility here other than to refer readers to RSS 1.0 Modules (http://web.resource.org/rss/1.0/modules/) and to note the standard modules: (http://web.resource.org/rss/1.0/modules/dc/ (Dublin Core), http://web.resource.org/rss/1.0/modules/syndication/ (Syndication), and http://web.resource.org/rss/1.0/modules/content/ (Content).

Let’s look at a simple example by adding a tag to the Atom 1.0 feed listed previously. Suppose you want to add a tag called <isbn> for each of the <entry> elements. You can do so by associating the <isbn> tag with a namespace (say, http://mashupguide.net):[73]

         <?xml version="1.0" encoding="UTF-8"?>
         <feed xmlns="http://www.w3.org/2005/Atom" xmlns:mg="http://mashupguide.net">
             <title>Excel 2007: Beyond the Manual</title>
             <link href="http://www.apress.com/book/bookDisplay.html?bID=10232"/>

This example is not meant to show the best way to encode an ISBN but to show how to extend Atom 1.0. Although inserting your own custom vocabulary results in a completely valid document, it doesn’t necessarily help in terms of interoperability. How much software out there is set to interpret an <isbn> element in the http://mashupguide.net namespace—other than to ignore it? If you use a widely used extension, the better your chances that there is software that acts on those extensions. Some prominent RSS 2.0 extensions are as follows:


Other XML dialects use XML namespaces in a similar fashion to enable extensions, so it’s useful to understand how extensions work in feeds to get a handle of how it works elsewhere.

There are few widely used Atom 1.0 extensions at this point. If you want to follow that topic, I suggest the series of articles by James Snell on Atom 1.0 and various proposed extensions.[74]

Now that you have studied three important formats for feeds (RSS 2.0, RSS 1.0, and Atom 1.0), you’ll learn how feeds are implemented in Flickr and then in other web sites.

[72] Foreign markup is permitted unless explicitly forbidden for specific contexts. See http://tools.ietf.org/html/rfc4287#section-6 for more details.