RSS .91 Tutorial in 3 minutes or less
by: Travis M Owens - travisowens@hotmail.com
Date: 9/26/2002 - Updated: 10/02/02 12:30pm
In a nutshell, RSS .91 stands for 'Rich Site Summary', which is a very easy way to
stream news articles to any RSS compliant device/program via an XML syntax.
If you really want to read the .91 spec which was created by Netscape in 1999, you can find it at http://my.netscape.com/publish/formats/rss-spec-0.91.html. If you want the 1.0 spec (not made by the Netscape) then check out http://web.resource.org/rss/1.0/spec.
An example of this is the website http://www.freshnews.org which retrieves all
of it's news via RSS streams. There are also numerous programs, a list can be
found at http://blogspace.com/rss/readers/ and the best one I saw was
http://www.feedreader.com and http://www.headlineviewer.com. As you can see
by installing one of these apps is that there are over 5,000 sources on the
net offering news streams. The only thing I see lacking in these apps is
that none of them offers you the ability to search through a group of
news feeds for articles, and better yet, allow you to filter individual
articles via keywords into some hiarchy of folders.
The actual RSS document is really simple. You need to spit out a valid XML
HTTP header which should look like "Content-Type: application/xml" (minus the
quotes). For the RSS document, the structure is:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="0.91">
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"http://my.netscape.com/publish/formats/rss-0.91.dtd">
<channel>
<title>website title</title>
<link>url of the site</link>
<description>short description of the site</description>
<language>en-us</language>
<image>
<title>image title</title>
<url>image src url</url>
<link>clicking of image goes to this url</link>
</image>
<item>
<title>title of news article</title>
<link>absolute url of the news article</link>
<description>short abstract about the article</description>
</item>
</channel>
</rss>
The <image> block is optional, but if you want your logo to appear above
articles then use the block. I haven't seen a reader make use of the 'clicking
of image goes to this url'. The image size is really important here, the
standard is 88x31 pixels and is the default. You can use up to 140 pixels wide
but I would not go larger than that, in fact I insist you stick to the default
size as most RSS coders are going to make their app using what the spec expects
to receive.
If you read the XML you will notice only 1 article is being served. To output
multiple articles you just keep repeating the <item></item> block
over and over, according to spec you are limited to 15 item blocks per feed.
The only thing that might get you, which caused problems for me, is that your
article's <description> cannot be very long. When I tried to output
the industry's standard for an abstract, being the first paragraph of a news
article, non of the parsers would show any articles, and when viewed in IE
I got an XML error. By the looks of it the spec doesn't allow for more 500
characters worth of words in an article's abstract.
If you want to learn more about RSS I suggest these sites: Why would you use RSS?, O'Reilly's RSS Portal, IBM's RSS Intro, the best FAQ on RSS I've seen and it's alternate url and last of all a tutorial for .91 and 1.0.
-= Info =-
Travis Owens is a Solutions Developer (web design, perl, php, C#, .NET, database, unix admin)
living in central New York. He spends his free time studying up on new technologies,
feeding his three cats (What kind of web designer doesn't have a cat?) and throwing parties.
At the time of this writing you can find more at http://216.244.96.20/travis/
Keywords: 3orless xml rss rich site summary