(转帖)rss2.0规范

(转自:http://blogs.law.harvard.edu/tech/rss)

RSS at Harvard Law

Syndication technology hosted by the Berkman Center

RSS 2.0 Specification

Contents

What is RSS?

Sample files

About this document

Required channel elements

Optional channel elements

Elements of <item>

Comments

Extending RSS

Roadmap

License and authorship

What is RSS?

 

 RSS Directory

 About this website

 Specifications

 Feeds

 Aggregators

 Validators

 Howtos/Articles

 Tools

 Utilities

 

 

 

RSS is a Web content syndication format.

Its name is an acronym for Really Simple Syndication.

RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website.

A summary of RSS version history.

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.

Sample files

Here are sample files for: RSS 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.

About this document

This document represents the status of RSS as of the Fall of 2002, version 2.0.1.

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.

Required channel elements

Here's a list of the required channel elements, each with a brief description, an example, and where available, a pointer to a more complete description.

Element Description Example

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.

Optional channel elements

Here's a list of optional channel elements.

Element Description Example

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. geo@herald.com (George Matesky)

webMaster Email address for person responsible for technical issues relating to channel. betty@herald.com (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 00:00:01 GMT

lastBuildDate The last time the content of the channel changed. Sat, 07 Sep 2002 09: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://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. 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. 

rating The PICS rating for the channel. 

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. 

<image> sub-element of <channel>

<image> is an optional sub-element of <channel>, which contains three required and three optional sub-elements.

<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.

<cloud> sub-element of <channel>

<cloud> is an optional sub-element of <channel>.

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="rpc.sys.com" port="80" path="/RPC2" registerProcedure="myCloud.rssPleaseNotify" protocol="xml-rpc" />

In this example, to request notification on the channel it appears in, you would send an XML-RPC message to rpc.sys.com on port 80, with a path of /RPC2. The procedure to call is myCloud.rssPleaseNotify.

A full explanation of this element and the rssCloud interface is here.

<ttl> sub-element of <channel>

<ttl> is an optional sub-element of <channel>.

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.

Example: <ttl>60</ttl>

<textInput> sub-element of <channel>

A channel may optionally contain a <textInput> sub-element, which contains four required sub-elements.

<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.

--------------------------------------------------------------------------------

Elements of <item>

A channel may contain any number of <item>s. An item may represent a "story" -- much like a story in a newspaper or magazine; if so its description is a synopsis of the story, and the link points to the full story. An item may also be complete in itself, if so, the description contains the text (entity-encoded HTML is allowed; see examples), and the link and title may be omitted. All elements of an item are optional, however at least one of title or description must be present.

Element Description Example

title The title of the item. Venice Film Festival Tries to Quit Sinking

link The URL of the item. http://nytimes.com/2004/12/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. 

category Includes the item in one or more categories. More. 

comments URL of a page for comments relating to the item. More. 

enclosure Describes a media object that is attached to the item. More. 

guid A string that uniquely identifies the item. More. 

pubDate Indicates when the item was published. More. 

source The RSS channel that the item came from. More. 

<source> sub-element of <item>

<source> is an optional sub-element of <item>.

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://www.tomalak.org/links2.xml">Tomalak's Realm</source>

The purpose of this element is to propagate credit for links, to publicize the sources of news items. It can be used in the Post command of an aggregator. It should be generated automatically when forwarding an item from an aggregator to a weblog authoring tool.

<enclosure> sub-element of <item>

<enclosure> is an optional sub-element of <item>.

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.

<category> sub-element of <item>

<category> is an optional sub-element of <item>.

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:

<category>Grateful Dead</category>

<category domain="http://www.fool.com/cusips">MSFT</category>

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.

<pubDate> sub-element of <item>

<pubDate> is an optional sub-element of <item>.

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> sub-element of <item>

<guid> is an optional sub-element of <item>.

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.

<guid>http://some.server.com/weblogItem3207</guid>

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:

<guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid>

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.

<comments> sub-element of <item>

<comments> is an optional sub-element of <item>.

If present, it is the url of the comments page for the item.

<comments>http://ekzemplo.com/entry/4403/comments</comments>

More about comments here.

<author> sub-element of <item>

<author> is an optional sub-element of <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>lawyer@boyer.net (Lawyer Boyer)</author>

Comments

RSS places restrictions on the first non-whitespace characters of the data in <link> and <url> elements. The data in these elements must begin with an 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.

Extending RSS

RSS originated in 1999, and has strived to be a simple, easy to understand format, with relatively modest goals. After it became a popular format, developers wanted to extend it using modules defined in namespaces, as 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.

Roadmap

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.

License and authorship

RSS 2.0 is offered by the Berkman Center for Internet & Society at Harvard Law School under the terms of the Attribution/Share Alike Creative Commons license. The author of this document is Dave Winer, founder of UserLand software, and fellow at Berkman Center.

 

Unless otherwise labeled by its originating author, the content found on this site is made available under the terms of an Attribution/Share Alike Creative Commons license, with the exception that no rights are granted -- since they are not ours to grant -- in any logo, graphic design, trademarks or trade names, including the Harvard name. Last update: Sunday, January 30, 2005 at 6:14:58 PM. Webmaster: Rogers Cadenhead.

2 thoughts on “(转帖)rss2.0规范”

  1. RSS 2.0 规范[翻译]

    --------------------------------------------------------------------------------

    http://www.7dspace.com&nbsp; 更新日期:2005-8-16 5:08:21  七度空间

      原文地址:http://blogs.law.harvard.edu/tech/rss

      什么是RSS?

      RSS是一种网页内容联合格式(web content sydication format)。

      它的名字是Really Simple Syndication的缩写。

      RSS是XML的一种。所有的RSS文档都遵循XML 1.0规范,该规范发布在W3C网站上。

      在一个RSS文档的开头是一个<rss>节点和一个规定的属性version,该属性规定了该文档将以RSS的哪个版本表示。如果该文档以这个规范来表示,那么它的version属性就必须等于2.0。

      在<rss>节点的下一级是一个独立的<channel>节点,该节点包含关于channel的信息和内容。

      关于本文档

      该文档是在2002年秋天撰写的,当时的RSS版本为2.0.1。

      它包含从RSS 0.91规范(2000年)开始的所有的修改和添加,以及包含在RSS 0.92(2000年12月)和RSS 0.94(2002年8月)中的新的特性。

      必需的频道节点

      下面有一份必须包含的频道(channel)节点的列表,每一个都有一个简单的描述、

    一个例子、应该出现的位置和更详细描述的超链接。

    元素                  描述              范例

    title 频道(channel)名称。它可以告诉别人如何访问你的服务。如果你有一个与你的RSS文件

    内容一致的HTML网站,你的title元素值应该与你的网站的标题相。

     GoUpstate.com News Headings

    link 响应该频道的网站的URL http://www.goupstate.com/

    description 关于该频道的描述 The latest news from GoUpstate.com,

     a Spartanburg Herald-Joural Web Site

      可选的频道元素

      下面是可选的频道元素列表

    元素                  描述              范例 

    language 使用的语言。这允许聚合器对所有的意大利语站点分组。 en-us

    copyright 版权声明 Copyright 2002, Spartanburg Herald-Journal

    managingEditor 内容负责人的Email geo@herald.com (George Matesky)

    webMaster 技术人员的Email betty@herald.com (Betty Guernsey)

    pubDate 内容的发布时间 Sat, 07 Sep 2002 00:00:01 GMT

    lastBuildDate 最后更新时间 Sat, 07 Sep 2002 09:42:31 GMT

    category 指定该频道所属的一个或多个分类。遵循与item级category元素相同的规则。 <category>Newspapers</category>

    generator 生成该频道的程序名称 MightyInHouse Content System v2.3

    docs 指向rss格式文档的url地址? http://blogs.law.harvard.edu/tech/rss cloud

     允许所有进程注册一个cloud用于获得频道的更新通知,并为rss种子实现一个轻量级

    的发布订阅协议。 <cloud domain="rpc.sys.com" port="80" path="/RPC2"

    registerProcedure="pingMe" protocol="soap"/>

    ttl ttl是Time to live的缩写。它指示cache的有效保存时间。 <ttl>60</ttl>

    image 与频道一起显示的图片地址

    rating 该频道的统计图片地址

    textInput 指定一个textbox与该频道一起显示

    skipHours 告诉使用者哪些时段是可以忽略的

    skipDays 告诉使用着哪些天是可以忽略的

    <channel>子节点<image>

    <image>是一个可选的<channel>子节点,该节点包含三个必需的子元素和三个可选的子元素。

    <url>是GIF、JPEG或PNG图像文件的URL地址,该图像代表整个频道

    <title>用于描述上面的图像,等同于HTML语言中的<img>的alt属性

    <link>是要连接的站点的url,当显示频道时,图像的连接指向该站点。

    <title>和<link>应该与频道的<title>和<link>有相同的值

    可选的节点包括<width>和<height>,它们是数字类型,指定图像的宽度和高度,单位为像素

    <description>就是link的TITLE属性中文本,它将在调用网页时显示出来。

    图像宽度的最大值为144,默认值为88

    图像高度的最大值为400,默认值为31

    <channel>子节点<cloud>

    <cloud>是一个可选的<channel>子节点。

    它指定一个可以支持rssCloud接口的web服务,rssCloud接口可以用HTTP-POST,

    XML-RPC或SOAP1.1实现。

    它的目的是允许通知注册为cloud的进程频道被更新,从而实现一个轻量级的发布订阅协议。

    <cloud domain="rpc.sys.com" port="80" path="/RPC2"

    registerProcedure= "myCloud.rssPleaseNotify" protocol="xml-rpc" />

     在这个例子中,为了请求频道通知,你需要发送一个XML-RPC消息到rpc.sys.com的80端口,

    路径为/RPC2。调用的过程为myCloud.rssPleaseNotify。

    <channel>子节点<ttl>

    <ttl>是一个可选的<channel>子节点。

    ttl是time to live的缩写。它表示频道在被刷新前应该被缓存的时间。这使得rss源

    可以被一个支持文件共享的网络所管理,例如Gnutella

    例如:<ttl>60</ttl>

    <channel>子节点<textInput>

    <textInput>是<channel>的可选的子节点,<textInput>包含四个子节点。

    <title>--提交按钮的标签

    <description>--该文本输入区的描述

    <name>--文本输入区的名称

    <link>--处理文本输入的CGI脚本的URL

    使用<textInput>的目的有些神秘(?)。你可以用它提供一个搜索引擎输入框,

    或让读者提供反馈信息。许多聚合器忽略该节点。

    <item>的节点

    一个频道可以包含许多项目(item)节点。一个项目可以代表一个故事——比如说

    一份报纸或杂志上的故事,如果是这样的话,那么项目的描述则是故事的概要,

    项目的链接则指向整个故事的存放位置。项目的所有节点都是可选的,但是至少要

    包含至少一个标题(title)和描述(description)。

    元素                  描述              范例

    title item的标题 Venice Film Festival Tries to Quit Sinking

    link item的URL http://www.nytimes.com/2002/09/07/movies/07FEST.html

    description item概要 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地址 oprah@oxygen.net

    category item可以包含在一个或多个分类中 Simpsons Characters

    comments 与item相关的评论的地址 http://www.myblog.org/cgi-local/

    mt/mt-comments.cgi?entry_id=290

    enclosure 附加的媒体对象

    guid 可以唯一确定item的字符串 http://inessential.com/2002/09/01.php#a2

    pubDate item发布的时间 Sun, 19 May 2002 15:21:36 GMT

    source rss频道来源 Quotes of the Day

    <item>子节点<source>

    <source>是<item>的可选节点。

    它的值是item来自的rss频道的名称,从item的title衍生而来。它有一个必须包含的属性url,

     该属性链接到XML序列化源。

    <source url="http://static.userland.com/tomalak/links2.xml">

    Tomalak's Realm</source> 该节点的作用是提高连接的声望,进一步推广新闻项目的源头。

    它可以用在聚合器的Post命令中。当从聚合器通过webblog访问一个item时,<source>

    能够自动被生成。

    <item>子节点<enclosure>

    <enclosure>是<item>的可选节点。

    它有三个必要的属性。url属性指示enclosure的位置,length指出它的字节大小,

    type属性指出它的标准MIME类型

    url必须为一个http url。

    <enclosure url=http://www.scripting.com/mp3s/weatherReportSuite.mp3

     length="12216320" type="audio/mpeg" />

    <item>子节点<category>

    <category>是<item>的可选节点。

    它有一个可选属性或域,该属性是一个用来定义分类法的字符串。

    该节点的值是一个正斜杠分割的字符串,它用来在指定的分类法中识别一个分级位置(hierarchic location)。处理器可以为分类的识别建立会话。(Processors may establish conventions for the interpretation of categories)

    下面有两个例子:

    <category>Grateful Dead</category>

    <category domain="http://www.fool.com/cusips">MSFT</category> 你可以根据

    你的需要为不同的域(domain)包含很多category节点,并且可以在相同域的不同

    部分拥有一个前后参照的item。

    <item>子节点<pubDate>

    <pubDate>是<item>的可选节点。

    它的值是item发布的日期。如果它是一个没有到达的日期,聚合器在日期到达之

    前可以选择不显示该item。

    <pubDate>Sun, 19 May 2002 15:21:36 GMT</pubDate>

    <item>子节点<guid>

    <guid>是<item>的可选节点。

    guid是globally unique identifier的缩写。它是一个可以唯一识别item的字符串。

    当item发布之后,聚合器可以选择使用该字符串判断该item是否是新的。

    <guid>http://some.server.com/weblogItem3207</guid&gt;

    guid没有特定的语法规则,聚合器必须将他们看作一个字符串。生成具有唯一性的字符串

    guid取决于种子的源头。

    如果guid节点有isPermaLink属性,并且值为真,读取器就会认为它是item的permalink。

    permalink是一个可在web浏览器中打开的url链接,它指向<item>节点所描述的全部item。

    <guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid&gt;

    isPermaLink是可选属性,默认值为真。如果值为假,guid将不会被认为是一个url或

    指向任何对象的url。

    <item>子节点<comment>

    <comment>是<item>的可选节点。

    如果出现,它指向该item评论的url

    <comments>

    http://rateyourmusic.com/yaccs/commentsn/blogId=705245&itemId=271

    </comments>

    <item>子节点<author>

    <author>是<item>的可选节点。

    它是item的作者的email。对于通过rss传播的报纸和杂志,作者可能是写该item

    所描述的文章的人。对于聚集型webblogs,作者可能不是责任编辑或站长。对于个人维护的webblog,忽略<author>节点是有意义的。

    <author>lawyer@boyer.net (Lawyer Boyer)</author>

  2. 转自:http://hedong.3322.org/archives/000275.html

    RSS 2.0规范

      RSS是 Really Simple Syndication的缩写(对rss2.0而言,是这三个词的缩写,对rss1.0而言则是RDF Site Summary的缩写,1.0与2.0走的是两个体系)

      RSS 基于XML,所有的 RSS 必须遵循w3c网站上公布的XML 1.0 规范。

      在一个RSS文档中,根元素是<rss>,带有一个必备属性version,用以指明该文档遵循的rss规范,如果rss文档遵循本规范,则version值必须是2.0。

      <rss>元素只有一个子元素,包含关于频道的一些信息。频道(channel)是整个blog,项(item)指一篇文章或日志(也有称这为post)。

    RSS2.0元素channel的子元素列表

    元素(Element) 描述(Description) 值域 重要性 举例(Example)

    title 频道名称 必备 GoUpstate.com News Headlines

    link 频道的URL 必备 http://www.goupstate.com/

    Description 频道的描述 必备 The latest news from GoUpstate.com, a Spartanburg Herald-Journal Web site.

    language 频道文章所用语言, 可用netscape或w3c推荐的列表 可选 en-us

    copyright 频道内容的版权说明 可选 Copyright 2002, Spartanburg Herald-Journal

    managingEditor 责任编辑的email 可选 geo@herald.com (George Matesky)

    webMaster 负责频道技术事务的网站管理员email 可选 betty@herald.com (Betty Guernsey)

    pubDate 频道内容发布日期,格式遵循RFC822格式(年份可为2们或4位) 可选 Sat, 07 Sep 2002 00:00:01 GMT

    lastBuildDate 频道内容最后的修改日期 可选 Sat, 07 Sep 2002 09:42:31 GMT

    category 指定频道所属的一个或几个类别 可选 <category>Newspapers</category>

    generator 生成该频道的程序名 可选 MightyInHouse Content System v2.3

    docs 指向该RSS文件所用格式说明的URL 可选 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. More info here. 可选 <cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>

    ttl 有效期,用以指明该频道可被缓存的最长时间 分钟为单位 可选 <ttl>60</ttl>

    image 指定一个 GIF或JPEG或PNG图片,用以与频道一起显示 可选

    rating 这个频道的分级(主要指成人、限制、儿童等) 可选

    textInput 指定一个text输入框供用户输入,具体信息及功能未定。 可选

    skipHours 提示新闻聚合器,那些小时时段它可以跳过。 可选

    skipDays 提示新闻聚合器,那些天它可以跳过。 可选

    RSS2.0元素channel的子元素image的子元素列表

    元素(Element) 描述(Description) 值域 重要性 举例(Example)

    url 图片的url 必备

    title 图片的标题,用于http的alt属性 必备

    link 网站的url(实际中常以频道的url代替) 必备

    width 图片的宽度(象素为单位) 最大144,默认88 可选

    height 图片的高度(象素为单位) 最大400,默认31 可选

    description 用于link的title属性 可选

    RSS2.0元素channel的子元素cloud的子元素列表

    元素(Element) 描述(Description) 值域 重要性 举例(Example)

    domain Cloud程序所在机器的域名或IP地址 radio.xmlstoragesystem.com

    port 访问clound程序所通过的端口 80

    path 程序所在路径(不一定是真实路径) /RPC2

    registerProcedure 注册的可提供的服务或过程 xmlStorageSystem.rssPleaseNotify

    protocol 协议 xml-rpc, soap , http-post 之一 xml-rpc

    RSS2.0元素channel的子元素textInput的子元素列表

    元素(Element) 描述(Description) 值域 重要性 举例(Example)

    title Submit按钮的标签 必备

    description 解释text输入区 必备

    name Text area对象的名字 必备

    link 处理提交的请求的cgi程序 必备

    关于item的内容,请看基于XML-RPC的BloggerAPI学习.

    说明:

      rss2.0要求<link>和<url>的值的非常部分开头,须是在IANA注册过的,如http://或https://或ftp://等。

      一个rss文件中,可以包括没有这儿定义的元素,只要它是在某个命名空间被定义过。

      一个常见问题是与的区别,两者在有些情况下是相同的,但前者可指几某个长文中的某个位置(即所谓的页内锚点吧)。

      关于cloud,我也不很清楚,正在找明白人问呢。:)

    Posted by Hilton at October 8, 2003 07:55 PM | TrackBack

    Comments

    不错、谢谢

    Posted by: at January 20, 2004 05:08 AM

    你好,很高兴能在你的站点上读文章,感觉你是个踏实的作技术的人,我很欣赏,我想我会成为你的常客。

    Posted by: 雪云鹰 at December 19, 2003 08:48 PM

    你的MSN多少啊想和你交流交流啊

    我的是

    tzs225@hotmail.com

    Posted by: Taye at December 16, 2003 07:53 PM

    hilton,

    我没有觉得你的表达有什么问题啊!

    我看不懂你这里的很多东西,并不是你的表达有任何问题,而是我自己对你研究的领域实在知之甚少。

    这两天看到有自己稍稍知道一些的内容,自然有些小得意——我可以好好用上这里的资源啦。:)

    ps:其实我的文字表达实在也不咋地,一幅傻乎乎的大白话模样,没才气。;)

    Posted by: hanyufen at October 10, 2003 10:34 PM

    To Han;

      我也感到很高兴,我的文字大家能看懂。我的一直头疼于我的文字表达能力,能得到han老师的肯定,很高兴:)

    Hilton

    Posted by: Hilton at October 10, 2003 01:14 PM

    又碰上一个能看懂的啦!

    真高兴!;)

    Posted by: hanyufen at October 9, 2003 11:13 PM

    非常感谢!

    Posted by: Hilton at October 9, 2003 09:45 PM

    Matt Mower 做的一个基于RSS2.0的一个project,里面有多cloud的定义的一些应用!或许对你有用! :)

    http://matt.blogs.it/specs/ENT/1.0/

    Posted by: owen at October 9, 2003 12:48 PM

Comments are closed.