/////////////////////////////////////////////////////////////////////////////
// 本文章由 codez 翻译,转载请保留该信息!谢谢!
// 最先发布于: www.donews.net/codez
/////////////////////////////////////////////////////////////////////////////


RSS v0.91 规范
==============


什么是 RSS?
-----------


    对于 RSS 名称的由来,没有一个标准的认定,所以,它不是一个缩写,它只是一个名字。此说明的最后一个版本可能会说它是一个缩写,希望他不会影响太多的应用软件。
    RSS 是 XML 的一种。所有的 RSS 文件必须遵守 W3C 委员会发布的 XML 1.0 规范。
    一个 RSS 文档是以 <rss> 元素作为最顶层,以及一个被称作 version 的托管属性,它说明了该 RSS 文件所适用的规格版本。
    <rss> 元素的下属是一个单一的 <channel> 元素,包含了频道及其内容的信息。

<channel>子元素要素
---------------------


    下面是<channel>元素的要素。

    <title> -- channel 名。通过它人们知道如何查阅你的服务。如果你拥有一个同你的 RSS 文件相同信息的 HTML 网站,你的 channel 标题应该同你的网站标题相同。最大长度为 100 个字符。

    <link> -- 指向<title>中同名的网站的 URL。最大长度为 500 个字符。

    <description> -- 一个描述你的 channel 的短语,你的 channel 的状态情况。最大长度为 500 个字符。

    <language> -- 提示你的 channel 使用的语言。这允许将所有使用意大利语言站点集合起来,例如,对于一个单一页面。该元素的允许值类表位于:http: //backend.userland.com/stories/storyReader$16

    <image> -- 一个包含若干个子元素的 XML 元素,具体可以查看这里(*)。

<channel> 的可选子元素
----------------------


    <copyright> -- channel 内容的版权信息。最长 100。
    
    <managingEditor> -- channel 管理编辑的 email 地址,用来进行编辑内容查询的联系人。最长 100。RSS 元素建议 email 地址格式为: bull@mancuso.com (Bull Mancuso)。
    
    <webMaster> -- channel 网管的 email 地址,技术问题咨询人员联系方式。最长 100。
    
    <rating> -- channel 的 PICS 率。最长 500。
    
    <pubDate> -- channel 内容的发布日期。例如,the New York Times publishes on a daily basis, the publication date flips once every 24 hours.它记录了 channel pubDate 的改变时间。所有 RSS 使用的日期和时间格式规格请参看 RFC822.
    
    <lastBuildDate> -- channel 最后改变的日期时间。
    
    <docs> -- 一个指向 RSS 文件中格式文档的 URL 连接。它也可能指向当前页。当一个人无意间在网站服务器上发现一个 RSS 文件,并且想知道 25 年前它是什么的时候。最长 500。
    
    <textInput> -- 一个包含若干个子元素的 XML 元素,具体情况请见后面的说明。
    
    <skipDays> -- 一个最多可能包含了七个<day>子元素,分别是 Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday。聚集者可能在这几天不阅读该 channel。(大多数聚集者忽略这个元素)
    
    <skipHours> -- 一个最多包含 24 <hour> 子元素,其值分别为: 1-24,代表 GMT 时间,如果聚集者支持该属性,那么它不会在每天的所列时间读取 channel。(大多数聚集者忽略该元素)
    
什么是 <image>
--------------


<image> 是 <channel> 的子元素,它包含三个必要的和三个可选的子元素。
    <url> 是一个描绘 channel 的 gif, jpeg 或者 png 的 URL。最长 500。
    <title> 描述一个 image,当 html 中提交 channel 时,它使用 HTML <img> tag 的 ALT 属性。最长 100。
    <link> 是一个网站的 url,当 channel 被提交,image 是到站点的一个连接。(注意,image 的 <title> 和 <link> 实际上应该同 channel 的 <title> 和 <link> 的值相同) 最长500。
    
    可选元素包括 <width> 和 <height>,numbers,表明 image 的宽和高的像素。<description> 包含了被包含在 image 周围环绕的 TITLE 属性属性。
    
    最大宽度为 144,缺省为 88.
    最大高度为 400,缺省为 31.
    
什么是 <item>
-------------


    一个 channel 可以包括任何数量的 <item>,每个连接都指向一个包含可选的描述项的内容。
    <title> 为内容的标题。最长 100。
    <link> 为内容的 URL。最长 500。
    <description> 为内容的大纲。最长 500。
    
什么是 <textInput>
------------------


    一个 channel 能够可选包含一个 <textInput> 子元素,它包含四个必要子元素。
    <title> -- 文本输入域的提交按钮标签。最长 100。
    <description> -- 文本输入域的描述。最长 500。
    <name> -- 文本输入域中文本对象的名称。最长 20。
    <link> -- 文本输入请求过程的 cgi 脚本 url。最大 500。
    
注释
====


    RSS 0.91 在 <link> 和 <url> 元素数据的第一个非空白字符设置了限制。这些数据元素必须以 http:// 或者 ftp:// 开头。而其他的, https:, file:, mailto:, news:, 以及 javascript: 等等都是不允许的。
    
Copyright and disclaimer
========================


? Copyright 1997-2000 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 protocol 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.

========================
The End



Trackback: http://tb.donews.net/TrackBack.aspx?PostId=56977


[点击此处收藏本文]  发表于2004年08月01日 10:22 PM




正在读取评论……
添加评论
大名
网址


验证码
评论