RSS（Rich Site Summary或者RDF Site Summary）是一种用于网站内容集成的技术。这种最初源自浏览器“新闻频道”的技术，现在却在企业门户（portal）、企业应用集成（EAI）等方面得到了更加宽广的用武之地。
What is RSS?
By Mark Pilgrim
RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. But it's not just for news. Pretty much anything that can be broken down into discrete items can be syndicated via RSS: the "recent changes" page of a wiki, a changelog of CVS checkins, even the revision history of a book. Once information about each item is in RSS format, an RSS-aware program can check the feed for changes and react to the changes in an appropriate way.
RSS-aware programs called news aggregators are popular in the weblogging community. Many weblogs make content available in RSS. A news aggregator can help you keep up with all your favorite weblogs by checking their RSS feeds and displaying new items from each of them.
A brief history
But coders beware. The name "RSS" is an umbrella term for a format that spans several different versions of at least two different (but parallel) formats. The original RSS, version 0.90, was designed by Netscape as a format for building portals of headlines to mainstream news sites. It was deemed overly complex for its goals; a simpler version, 0.91, was proposed and subsequently dropped when Netscape lost interest in the portal-making business. But 0.91 was picked up by another vendor, UserLand Software, which intended to use it as the basis of its weblogging products and other web-based writing software.
In the meantime, a third, non-commercial group split off and designed a new format based on what they perceived as the original guiding principles of RSS 0.90 (before it got simplified into 0.91). This format, which is based on RDF, is called RSS 1.0. But UserLand was not involved in designing this new format, and, as an advocate of simplifying 0.90, it was not happy when RSS 1.0 was announced. Instead of accepting RSS 1.0, UserLand continued to evolve the 0.9x branch, through versions 0.92, 0.93, 0.94, and finally 2.0.
What a mess.
So which one do I use?
That's 7 -- count 'em, 7! -- different formats, all called "RSS". As a coder of RSS-aware programs, you'll need to be liberal enough to handle all the variations. But as a content producer who wants to make your content available via syndication, which format should you choose?
|0.90||Netscape||Obsoleted by 1.0||Don't use|
|0.91||UserLand||Drop dead simple||Officially obsoleted by 2.0, but still quite popular||Use for basic syndication. Easy migration path to 2.0 if you need more flexibility|
|0.92, 0.93, 0.94||UserLand||Allows richer metadata than 0.91||Obsoleted by 2.0||Use 2.0 instead|
|1.0||RSS-DEV Working Group||RDF-based, extensibility via modules, not controlled by a single vendor||Stable core, active module development||Use for RDF-based applications or if you need advanced RDF-specific modules|
|2.0||UserLand||Extensibility via modules, easy migration path from 0.9x branch||Stable core, active module development||Use for general-purpose, metadata-rich syndication|
What does RSS look like?
Imagine you want to write a program that reads RSS feeds, so that you can publish headlines on your site, build your own portal or homegrown news aggregator, or whatever. What does an RSS feed look like? That depends on which version of RSS you're talking about. Here's a sample RSS 0.91 feed (adapted from XML.com's RSS feed):
<description>XML.com features a rich mix of information and services for the XML community.</description>
<title>Normalizing XML, Part 2</title>
<description>In this second and final look at applying relational normalization techniqu