I’ve been getting a lot of questions from my readers lately about RSS. What is it? How does one use it? Do I need server-side scripting?
The goal of this article is to explain what RSS is, and how to create your own feed with or without server-side scripting.
What is RSS?
When RSS was originally created, the intended purpose was for news syndication, much like it is today. However, since its creation there have been a few different versions developed by two groups: Userland and the RSS-DEV Working Group.
Since there are a few different versions and iterations of RSS that are tough to explain without going into some background history about the format(s). I can’t even tell you what RSS stands for without explaining their histories, so that’s what I’ll do first.
The Beginnings of RSS
Back in late 1997, Userland created a new use for XML for syndicating website news, and called it <scriptingNews>. In early 1999, Netscape released a new dialect (orapplication) of XML called RSS 0.9, which stood for Really Simple Syndication.
Here is a quick timeline for the early days of RSS:
- In December 1997, UserLand began offering Scripting News syndicated in XML, as a public Web resource. Other sites adopted the format, known as <scriptingNews> format.
- In March 1999, Netscape opened My.Netscape.Com, based on an XML syndication format known as RSS 0.9
- In April 1999, My.UserLand.Com opened, an aggregator that processed RSS 0.9 content.
- In May 1999, My.UserLand.Com supported <scriptingNews> 2.0b1 format.
- In July 1999, Netscape introduced RSS 0.91, incorporating most of the features of <scriptingNews> 2.0b1. At the same time My.UserLand.Com supported RSS 0.91.
- In December 1999, UserLand shipped the Manila content management system with built-in support for <scriptingNews> 2.0b1.
- In March 2000, O’Reilly’s aggregation engine, Meerkat, opened, reading all the above formats.
- In April 2000, UserLand added built-in RSS 0.91 support to all Manila-authored sites.
Soon, Netscape decided to go with a different strategy, and stopped developing RSS. At this point, Userland picked-up where Netscape left off, and continued RSS’s development.
Userland then updated the RSS spec with versions 0.92, 0.93, and 0.94… all of which were minor updates to this emerging standard. As of this writing, version 0.91 is still one of the most popular RSS formats, although RSS 1.0 and RSS 2.0 are catching up.
The New Kid
In 2000, the RSS-DEV Working Group was created out of discussions happening on the O’Reilly internal mailing lists, in an effort to create a standardized RSS format based on RDF (Resource Description Framework), which, in-turn, is based on XML. They called their new syndication language RDF Site Summary, and gave it a version number of 1.0.
So, you mean to tell me that there are two completely different news syndication languages that are both called RSS? Yes. RSS 0.9x is a simpler syndication language that gets the job done. RSS 1.0 (based on RDF) is more complex, but in-turn is more thorough.
Userland’s New Version
In late 2002, Userland beefed up the old RSS 0.9x spec. Even though they had a full-fledged version 1.0 on their hands, they couldn’t call it that because the W3C had already taken the name. Could you imagine two languages, both called RSS 1.0? That’d be terrible. So, they named it RSS 2.0 because they had to.
Although RSS is not flawless, it is a very good specification for news and website syndication. Because of this, the 2.0 line of RSS has been frozen at version 2.01. Astatement made by Dave Winer, founder of UserLand software, says this:
RSS is by no means a perfect format, but it is very popular and widely supported. Having a settled spec is something RSS has needed for a long time. The purpose of this work is to help it become a unchanging thing, to foster growth in the market that is developing around it, and to clear the path for innovation in new syndication formats.
Therefore, the RSS spec is, for all practical purposes, frozen at version 2.0.1. We anticipate possible 2.0.2 or 2.0.3 versions, etc. only for the purpose of clarifying the specification, not for adding new features to the format. Subsequent work should happen in modules, using namespaces, and in completely new syndication formats, with new names.
Although I could very well be wrong here, this sounds to me like the promotion of RSS 1.0 as the syndication format to follow, as there is room for modules, namespaces, and further expansion.
Yeah, Yeah, Yeah. So How Do I Utilize RSS?
Now that you understand the history behind RSS, I feel I can explain how to put together an RSS 2.0 feed by hand.
When I first re-released version 20 of my website in March 2003, I introduced an RSS feed for the first time. I did everything completely by hand until I came across Movable Type in July 2003, and did a slight redesign of my website for usability reasons.
With the release of version 21 of my website (which is what you’re looking at) and the introduction of Movable Type as my CMS, I don’t have to create my feeds by hand anymore. However, many of us do, and that’s what the rest of this page will be about.
Get To It, Bucko!
When I put together my first RSS feed, I based it on Zeldman’s feed. Here’s a slimmed down version of what I’m using now:
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<rss version=”2.0″>
<channel>
<title>Skyzyx.com</title>
<description>Advocacy for Standards-Compliant Design.</description>
<link>http://www.skyzyx.com</link>
<copyright>(c) 2003 Ryan Parman</copyright>
<language>en-us</language>
<date>2003-12-16T11:22:13-08:00</date>
<docs>http://backend.userland.com/rss</docs>
<image>
<title>Advocacy for Standards-Compliant Design.</title>
<url>http://www.skyzyx.com/img/banner88x31.gif</url>
<link>http://www.skyzyx.com/</link>
<width>88</width>
<height>31</height>
</image>
<item>
<title>Winamp 5, Wasabi, and the Future</title>
<link>http://www.skyzyx.com/archives/000131.php</link>
<description>I’ve been a Winamp fan…</description>
</item>
<item>
<title>Christmastime Is Here</title>
<link>http://www.skyzyx.com/archives/000130.php</link>
<description>It’s time to sit down…</description>
</item>
<item>
<title>Wierd IE Rendering Bug Fixed</title>
<link>http://www.skyzyx.com/archives/000129.php</link>
<description>Last summer, I…</description>
</item>
</channel>
</rss>
Most of the tags seem fairly self-explanitory, right? The ones that I had a hard time with when I first started were the <date> tag and the <docs> tag. The <docs> tag is for people who want to know more about the format that has been used. This allows people to look-up the specs for the format, so that they can understand it.
The <date> tag is formatted as follows: YYYY-MM-DD, followed by a “T” as a delimiter, then HH:MM:SS, followed by the GMT value for your location (mine is -8:00).
So, How Do I Make My Own?
You can begin by copy-pasting this sample code into a text editor, such as Notepad or BB Edit. Then you just need to modify the values for your own use. Voila!
Yes, the descriptions can be as long as you want them to be. They’re very short in this example so that I could get them to fit inside the box. Another thing to remember is that some RSS Parsers are limited to a maximum of 15 <item> tags, meaning 15 different postings are allowed in a single file. This is a limitation of the older RSS 0.9x formats, as RSS 1.0 and 2.0 are allowed to have more news items.
However, not all parsers are limited by this item count. I use SimplePie to power my SimpleReader. It’s fantastic.
Now Go Away, Or I Shall Taunt You A Second Time!
Thus ends the article. I hope it will serve you well. If you have any comments, corrections, additions, or other stuff, let me know.