- What is RSS?
- Sample files
- About this document
- Required channel elements
- Optional channel elements
- Elements of <item>
- Extending RSS
- Copyright and disclaimer
Its name is an acronym for Really Simple Syndication.
RSS is dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.
At the top level, a RSS document is a <rss> element, with a mandatory attribute called version, that specifies the version of RSS that the document conforms to. If it conforms to this specification, the version attribute must be 2.0.
Subordinate to the <rss> element is a single <channel> element, which contains information about the channel (metadata) and its contents.
0.91, 0.92 and 2.0.
Note that the sample files may point to documents and services that no longer exist. The 0.91 sample was created when the 0.91 docs were written. Maintaining a trail of samples seems like a good idea.
It incorporates all changes and additions, starting with the basic spec for RSS 0.91 (June 2000) and includes new features introduced in RSS 0.92 (December 2000) and RSS 0.94 (August 2002).
Change notes are here.
First we document the required and optional sub-elements of <channel>; and then document the sub-elements of <item>. The final sections answer frequently asked questions, and provide a roadmap for future evolution, and guidelines for extending RSS.
|title||The name of the channel. It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.||GoUpstate.com News Headlines|
|link||The URL to the HTML website corresponding to the channel.||http://www.goupstate.com/|
|description||Phrase or sentence describing the channel.||The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.|
|language||The language the channel is written in. This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C.||en-us|
|copyright||Copyright notice for content in the channel.||Copyright 2002, Spartanburg Herald-Journal|
|managingEditor||Email address for person responsible for editorial content.||[email protected] (George Matesky)|
|webMaster||Email address for person responsible for technical issues relating to channel.||[email protected] (Betty Guernsey)|
|pubDate||The publication date for the content in the channel. For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred).||Sat, 07 Sep 2002 0:00:01 GMT|
|lastBuildDate||The last time the content of the channel changed.||Sat, 07 Sep 2002 9:42:31 GMT|
|category||Specify one or more categories that the channel belongs to. Follows the same rules as the <item>-level category element. More info.||<category>Newspapers</category>|
|generator||A string indicating the program used to generate the channel.||MightyInHouse Content System v2.3|
|docs||A URL that points to the documentation for the format used in the RSS file. It's probably a pointer to this page. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.||http://backend.userland.com/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. More info here.||<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>|
|ttl||ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. More info here.||<ttl>60</ttl>|
|image||Specifies a GIF, JPEG or PNG image that can be displayed with the channel. More info here.|
|textInput||Specifies a text input box that can be displayed with the channel. More info here.|
|skipHours||A hint for aggregators telling them which hours they can skip. More info here.|
|skipDays||A hint for aggregators telling them which days they can skip. More info here.|
<url> is the URL of a GIF, JPEG or PNG image that represents the channel.
<title> describes the image, it's used in the ALT attribute of the HTML <img> tag when the channel is rendered in HTML.
<link> is the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image <title> and <link> should have the same value as the channel's <title> and <link>.
Optional elements include <width> and <height>, numbers, indicating the width and height of the image in pixels. <description> contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.
Maximum value for width is 144, default value is 88.
Maximum value for height is 400, default value is 31.
It specifies a web service that supports the rssCloud interface which can be implemented in HTTP-POST, XML-RPC or SOAP 1.1.
Its purpose is to allow processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.
<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc" />
In this example, to request notification on the channel it appears in, you would send an XML-RPC message to radio.xmlstoragesystem.com on port 80, with a path of /RPC2. The procedure to call is xmlStorageSystem.rssPleaseNotify.
A full explanation of this element and the rssCloud interface is here.
ttl stands for time to live. It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. This makes it possible for RSS sources to be managed by a file-sharing network such as Gnutella.
<title> -- The label of the Submit button in the text input area.
<description> -- Explains the text input area.
<name> -- The name of the text object in the text input area.
<link> -- The URL of the CGI script that processes text input requests.
The purpose of the <textInput> element is something of a mystery. You can use it to specify a search engine box. Or to allow a reader to provide feedback. Most aggregators ignore it.
|title||The title of the item.||Venice Film Festival Tries to Quit Sinking|
|link||The URL of the item.||http://www.nytimes.com/2002/09/07/movies/07FEST.html|
|description||The item synopsis.||Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.|
|author||Email address of the author of the item. More.||[email protected]|
|category||Includes the item in one or more categories. More.||Simpsons Characters|
|comments||URL of a page for comments relating to the item. More.||http://www.myblog.org/cgi-local/mt/mt-comments.cgi?entry_id=290|
|enclosure||Describes a media object that is attached to the item. More.||<enclosure url="http://live.curry.com/mp3/celebritySCms.mp3" length="1069871" type="audio/mpeg"/>|
|guid||A string that uniquely identifies the item. More.||<guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid>|
|pubDate||Indicates when the item was published. More.||Sun, 19 May 2002 15:21:36 GMT|
|source||The RSS channel that the item came from. More.||<source url="http://www.quotationspage.com/data/qotd.rss">Quotes of the Day</source>|
Its value is the name of the RSS channel that the item came from, derived from its <title>. It has one required attribute, url, which links to the XMLization of the source.
<source url="http://static.userland.com/tomalak/links2.xml">Tomalak's Realm</source>
The purpose of this element is to propogate credit for links, to publicize the sources of news items. It's used in the post command in the Radio UserLand aggregator. It should be generated automatically when forwarding an item from an aggregator to a weblog authoring tool.
It has three required attributes. url says where the enclosure is located, length says how big it is in bytes, and type says what its type is, a standard MIME type.
The url must be an http url.
<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
A use-case narrative for this element is here
It has one optional attribute, domain, a string that identifies a categorization taxonomy.
The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories. Two examples are provided below:
You may include as many category elements as you need to, for different domains, and to have an item cross-referenced in different parts of the same domain.
Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.
<pubDate>Sun, 19 May 2002 15:21:36 GMT</pubDate>
guid stands for globally unique identifier. It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.
There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.
If the guid element has an attribute named "isPermaLink" with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the <item> element. An example:
isPermaLink is optional, its default value is true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.
If present, it is the url of the comments page for the item.
It's the email address of the author of the item. For newspapers and magazines syndicating via RSS, the author is the person who wrote the article that the <item> describes. For collaborative weblogs, the author of the item might be different from the managing editor or webmaster. For a weblog authored by a single individual it would make sense to omit the <author> element.
<author>[email protected] (Lawyer Boyer)</author>
IANA-registered URI scheme, such as http://, https://, news://, mailto: and ftp://. Prior to RSS 2.0, the specification only allowed http:// and ftp://, however, in practice other URI schemes were in use by content developers and supported by aggregators. Aggregators may have limits on the URI schemes they support. Content developers should not assume that all aggregators support all schemes.
In RSS 0.91, various elements are restricted to 500 or 100 characters. There can be no more than 15 <items> in a 0.91 <channel>. There are no string-length or XML-level limits in RSS 0.92 and greater. Processors may impose their own limits, and generators may have preferences that say no more than a certain number of <item>s can appear in a channel, or that strings are limited in length.
In RSS 2.0, a provision is made for linking a channel to its identifier in a cataloging system, using the channel-level category feature, described above. For example, to link a channel to its Syndic8 identifier, include a category element as a sub-element of <channel>, with domain "Syndic8", and value the identifier for your channel in the Syndic8 database. The appropriate category element for Scripting News would be <category domain="Syndic8">1765</category>.
A frequently asked question about <guid>s is how do they compare to <link>s. Aren't they the same thing? Yes, in some content systems, and no in others. In some systems, <link> is a permalink to a weblog item. However, in other systems, each <item> is a synopsis of a longer article, <link> points to the article, and <guid> is the permalink to the weblog entry. In all cases, it's recommended that you provide the guid, and if possible make it a permalink. This enables aggregators to not repeat items, even if there have been editing changes.
If you have questions about the RSS 2.0 format, please post them on the RSS2-Support mail list, hosted by Sjoerd Visscher. This is not a debating list, but serves as a support resource for users, authors and developers who are creating and using content in RSS 2.0 format.
specified by the W3C.
RSS 2.0 adds that capability, following a simple rule. A RSS feed may contain elements not described on this page, only if those elements are defined in a namespace.
The elements defined in this document are not themselves members of a namespace, so that RSS 2.0 can remain compatible with previous versions in the following sense -- a version 0.91 or 0.92 file is also a valid 2.0 file. If the elements of RSS 2.0 were in a namespace, this constraint would break, a version 0.9x file would not be a valid 2.0 file.
Here's an example of a file that makes use of elements in namespaces, authored by Mark Pilgrim.
© Copyright 1997-2002 UserLand Software. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and these paragraphs are included on all such copies and derivative works.
This document may not be modified in any way, such as by removing the copyright notice or references to UserLand or other organizations. Further, while these copyright restrictions apply to the written RSS specification, no claim of ownership is made by UserLand to the format it describes. Any party may, for commercial or non-commercial purposes, implement this format without royalty or license fee to UserLand. The limited permissions granted herein are perpetual and will not be revoked by UserLand or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and USERLAND DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.