Overview of RSS as a Future-proofing tool for your Web Sit


RSS is a dialect of XML, and is used for syndicating Web content. Syndicating means that the content is sent out to lots of organizations that publish it. Syndication also means that individual visitors can use software that collect RSS Feeds, and can receive notice when you make changes to your site.

With RSS, visitors don't have to visit, and they get “hot-off-the-press” notice immediately when your site is updated.

RSS 0.91 is the most commonly used of several versions available. For new RSS feeds, it's better to use version 2.0 because it is the current version. RSS 2.0 is also backward compatible with 0.91.

What is important about RSS is that anyone who understands a HTML can understand RSS.

The RSS specification is published under a Creative Commons license. This means that you can use the RSS specification any way that you want to.

A RSS file is made up of a <channel> element and its sub-elements.

<channel> contains elements that represent metadata about the channel

These elements include:

  • <title>
  • <link>
  • <description>
  • <item> (feed content)

Note: The names are in lower case because the XML tags used in RSS are case sensitive.

The content of the <channel> contain the content, called <item>.

Items make up the most of the channel, because these are the content that changes when you want to update the feed.

The <channel>

A channel has three elements that tell you about the channel:

  • <title>: The name of the channel or feed.
  • <link>: The URL of the Web site (or site page) associated with this <channel>.
  • <description>: A short description about what the <channel> is.

The <channel> has some optional sub-elements.

The <image> element contains three required sub-elements:

These are:

  • <url>: The URL of a GIF, JPEG, or PNG image that represents the channel.
  • <title>: Describes the image. It is used in the ALT attribute of the HTML <image> tag when the channel is rendered in HTML.
  • <link>: The URL of the site. (When the channel is rendered as HTML, the image can act as a link to the site.)

<image> also has three optional sub-elements:

  • <width>: Number indicating the width of the image in pixels. The maximum value is 144 and the default value is 88.
  • <height>: Number indicating the height of the image in pixels. The maximum value is 400 and the default value is 31.
  • <description>: Contains text that is included in the title attribute of the link that's formed around the image when rendered.

In addition, many other optional channel elements can be used. Most of these are self-explanatory:

  • <language>: en-us
  • <copyright>: Copyright 2003, James Lewin
  • <managingEditor>: dan@spam_me.com (Dan Deletekey)
  • <webMaster>: dan@spam_me.com (Dan Deletekey)
  • <pubDate>: Sat, 15 Nov 2003 0:00:01 GMT
  • <lastBuildDate>: Sat, 15 Nov 2003 0:00:01 GMT
  • <category>: ebusiness
  • <generator>: Your CMS 2.0
  • <docs>: http://blogs.law.harvard.edu/tech/rss
  • <cloud>: Allows processes to register with a "cloud" to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
  • <ttl>: Time to live, a number representing the number of minutes a feed can be cached before it should be refreshed.
  • <rating>: The PICS rating for the channel.
  • <textInput>: Defines input box that can be displayed with the channel.
  • <skipHours>: A hint for aggregators that tells them which hours can be skipped for updates.
  • <skipDays>: A hint for aggregators that tells them which days can be skipped for updates.

Items

Items are usually the most important part of a feed. Each item can be an entry on a weblog, a complete article, a movie review, a classified ad, or whatever you want to syndicate with your channel. While other elements within a channel may stay constant, items are likely to change frequently.

You can have as many items as you want. The previous spec had a limit of 15 items, and this is still a good upper limit if you want to ensure backwards compatibility.

Elements of news items

An item typically contains three elements:

  • <title>: This is the name of the item. In standards use, this is translated into a headline within HTML.
  • <link>: This is the URL of the item. The title is commonly used as a link, pointing to the URL contained within the <link> element.
  • <description>: This is usually a summary of or commentary on the URL that is pointed to in the link.

All elements are optional, but an item must contain either a <title> or a <description>.

Several other optional elements of items can be used:

  • <author>: E-mail address of the author.
  • <category>: Supports organizing entries.
  • <comments>: URL of a page for comments on the item.
  • <enclosure>: Supports media objects associated with the item.
  • <guid>: A permanent link that is uniquely tied to the item.
  • <pubDate>: When the item was published.
  • <source>: The RSS channel that an item comes from. This can be useful when items are aggregated together.

This site contains several RSS software programs. Here are the links.