4. RSS 2.0

Although the numbering may imply that RSS 2.0 is a more up-to-date version of RSS 1.0, this is not the case: there has been an unfortunate forking in the development of RSS and an unwanted confusion re numbering. So RSS 1.0 and RSS 2.0 are alternative and rival newsfeed formats.

Athough there is a version of the RSS 2.0 specification at http://blogs.law.harvard.edu/tech/rss, since July 2003, the RSS Advisory Board has been looking after revisions. The latest revision of the RSS 2.0 specification is at http://www.rssboard.org/rss-specification

The specification does not seem to specify what the description element can contain. Some people say that it can contain HTML; whereas others say that it definitely cannot.

For example, a web page at Mozilla (http://developer.mozilla.org/en/docs/RSS:Article:Why_RSS_Content_Module_is_Popular_-_Including_HTML_Contents) says Do not put anything but plain text into the RSS <description> element. Although it has become common practice to abuse the RSS <description> element and put non-plain text data in it. It is not actually allowed.

However, some people do put HTML into the description element.

When using RSS 2.0, you are allowed to use elements from other namespaces. So, other people use a content:encoded element instead of a description element for providing HTML. Some people even provide both with HTML in both.

YAHOO use RSS 2.0. In the description element, they put HTML inside a CDATA section. An example is http://rss.news.yahoo.com/rss/sports. This method is also adopted by other people.

The Mozilla web page cited above says that CDATA sections reduce the bloat. However, the <description> is NOT suppose to be used for any of this. It is only suppose to be used to include plain text. They say that HTML should be put in a content:encoded element.

The BBC uses a mix of RSS 2.0, RSS 1.0 and RSS 0.91. For their RSS 2.0 feeds, they just put a single sentence (using no HTML) in the description element. An example is http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml

Date elements such as pubDate and lastBuildDate require use of the RFC 822 format for dates. This format is not easy to parse, and in my opinion, it is preferable to supply dates in the ISO 8601 format. Some people use a dc:date element instead of a pubDate element. This requires the use of ISO 8601.

RSS 2.0's author element requires an e-mail address. Because I do not wish to distribute e-mail addresses in newsfeeds, I'm currently using:

undisclosed_email_address@ox.ac.uk (Fred Bloggs)

This format is valid according to RFC 2822 but it is regarded as a legacy format by RFC 2822. However, it is the format illustrated in an example in the RSS 2.0 specification. Maybe I should try:

Fred Bloggs <undisclosed_email_address@ox.ac.uk>

which is the form preferred by RFC 2822 but which is not mentioned in the RSS 2.0 specification.

Other people omit the author element and use a dc:creator element instead. I tried using both, and the validator moaned that this was not allowed.

If you want to use RSS 2.0, I would suggest not using pubDate, description and author, and using dc:date, content:encoded and dc:creator instead. This is valid RSS 2.0 but this use of elements from other namespaces for the crucial elements suggests the RSS 2.0 format is inadequate. Although the use of these other namespaces in this way is quite common, I'm unclear as to how many newsfeed readers support the use of these other namespaces.

As mentioned above, RSS 2.0 permits elements from other namespaces. So the RSS 1.0 modules mentioned earlier can also be used in RSS 2.0. Here, again, is a link to a page containing a list of proposed RSS 1.0 modules. One such module is the module for events.

The additional elements used by Apple for iTunes are documented at http://www.apple.com/itunes/podcasts/specs.html

iTunes U uses an additional element, an itunesu:category element.

Up: Contents Previous: 3. RSS 1.0 Next: 5. Atom 0.3