---
title: "RSS1.0规范"
author: "jedy"
date: "2005-11-30T01:16:00Z"
tags: []
slug: "rss1-0"
draft: false
lastmod: "2005-11-30T01:16:00Z"
id: 304781
url: "https://jedy.iteye.com/blog/304781"
---

[http://yanghongyu.blogdriver.com/yanghongyu/90316.html](http://yanghongyu.blogdriver.com/yanghongyu/90316.html)                          

[RDF Site Summary (RSS) 1.0](http://web.resource.org/rss/1.0/spec)是一个轻量级多目的可扩展元数据描述和同步(syndication)格式。RSS是对XML的一种应用，遵循w3c的RDF规范，并且通过基于xml-命名空间和/或RDF的模块进行扩展。

[**rss1.0核心语法**  
\
元素 重要性 结构 说明 必备属性 &lt;?xml version="1.0"?&gt; 可选(除非指定编码) &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"&gt; 必备(如示) (channel, image?, item+, textinput?) RSS1.0的最外层元素(根元素) &lt;channel rdf:about="{resource}"&gt; 必备 (title, link, description, image?, items, textinput?) 标题、简介、URL等描述channel自身的元数据 　　&lt;title&gt;{channel\_title}&lt;/title&gt; 必备 (#PCDATA) 最大长度40字符(建议) 　　&lt;link&gt;{channel\_link}&lt;/link&gt; 必备 (#PCDATA) 最大长度500字符(建议)，通常指向站点的主页或新闻页 　　&lt;description&gt;{channel\_description}&lt;/description&gt; 必备 (#PCDATA) 最大长度500字符(建议)，频道内容、功能、资源的简介 　　&lt;image rdf:resource="{image\_uri}" /&gt; Image元素出现时必备 此{image\_uri}须与image元素的rdf:about的 {image\_uri} 一致，将一个频道与一个图片关联 　　&lt;items&gt;&lt;rdf:Seq&gt;&lt;rdf:li resource="{item\_uri}" /&gt; ... &lt;/rdf:Seq&gt;&lt;/items&gt; 必备 此{item\_uri}须与相应的item元素的rdf:about的 {item\_uri} 一致，用RDF Seq表明item之间的顺序 　　&lt;textinput rdf:resource="{textinput\_uri}" /&gt; 有textinput元素时必备 此{textinput\_uri}须与textinput元素的rdf:about的 {textinput\_uri} 一致 &lt;image rdf:about="{image\_uri}"&gt; 可选(有则须在channel中描述) (title, url, link) 频道图片，格式需多数浏览器支持，宽1-144，高1-400,建议88\*31 rdf:about 　　&lt;title&gt;{image\_alt\_text}&lt;/title&gt; 有image元素时必备 (#PCDATA) 最大长度40字符(建议)，用作img标签的alt属性。 　　&lt;url&gt;{image\_url}&lt;/url&gt; 有image元素时必备 (#PCDATA) 最大长度500字符(建议)，图片的URI。 　　&lt;link&gt;{image\_link}&lt;/link&gt; 有image元素时必备 (#PCDATA) 最大长度500字符(建议)，图片超链指向的URL，常为站点主页或新闻页面。 &lt;item rdf:about="{item\_uri}"&gt; 不小于1个，建议1-15个 (title, link, description?) item的唯一标志，如果可能，{item\_uri}应和link子元素的值一致,item可以是任何有uri的对象 rdf:about 　　&lt;title&gt;{item\_title}&lt;/title&gt; 必备 (#PCDATA) 最大长度100字符(建议)，item的标题。 　　&lt;link&gt;{item\_link}&lt;/link&gt; 必备 (#PCDATA) 最大长度500字符(建议)，item的URL。 　　&lt;description&gt;{item\_description}&lt;/description&gt; 可选 (#PCDATA) 最大长度500字符(建议)，item的简介或摘要。 &lt;textinput rdf:about="{textinput\_uri}"&gt; 可选(有则须在channel中描述) (title, description, name, link) 提供一种方法提交数据到任意URL，{textinput\_uri}要与link子元素的值一致，URL所对应的程序假定处理HTTP GET方法提交的数据。 rdf:about 　　&lt;title&gt;{textinput\_title}&lt;/title&gt; 有textinput元素时必备 (#PCDATA) 最大长度40字符(建议)，输入框的描述标题 　　&lt;description&gt;{textinput\_description}&lt;/description&gt; 有textinput元素时必备 (#PCDATA) 最大长度100字符(建议)，输入框目的的简介。 　　&lt;name&gt;{textinput\_varname}&lt;/name&gt; 有textinput元素时必备 (#PCDATA) 最大长度500字符(建议)，输入框的变量名。 　　&lt;link&gt;{textinput\_action\_url}&lt;/link&gt; 有textinput元素时必备 (#PCDATA) 最大长度500字符(建议)，表单action的URL。  
\
跟rss1.0一起发布的有两个模块， 都柏林核心体系(Dublin Core) 和同步体系(Syndication).前者，]()[上海图书馆](http://dc.library.sh.cn/DC/1-4.htm)的刘炜先生进行了翻译。  
　　DC模块的主要内容：  
命名空间定义：xmlns:dc=" [http://purl.org/dc/elements/1.1/](http://purl.org/dc/elements/1.1/)"  
对&lt;channel&gt;, &lt;item&gt;, &lt;image&gt;, and &lt;textinput&gt;等元素扩展了下列子元素。

&lt;dc:title&gt; ( #PCDATA ) 元素1：题名 应用级别：M。DC 定义为：给予资源的名称。 &lt;dc:creator&gt; ( #PCDATA ) 元素2：创建者 应用级别: O。DC定义为: 对资源内容制作负主要责任的实体。 &lt;dc:subject&gt; ( #PCDATA ) 元素5：主题 应用级别：MA。DC定义为：资源内容的论题。 &lt;dc:description&gt; ( #PCDATA ) 元素6：说明 应用级别：R。DC定义为：对资源内容的叙述。 &lt;dc:publisher&gt; ( #PCDATA ) 元素4：出版者 应用级别：O。DC定义为：负责制作可获资源的实体。 &lt;dc:contributor&gt; ( #PCDATA ) 元素3：其他责任者 应用级别：MA。DC定义为：对资源内容作出贡献的实体。 &lt;dc:date&gt; ( #PCDATA ) \[W3CDTF] 元素7：日期 应用级别：MA。DC定义为：资源生命周期中关联事件的日期。 &lt;dc:type&gt; ( #PCDATA ) 元素8：类型 应用级别：O。DC定义为：资源内容的性质或类型。 &lt;dc:format&gt; ( #PCDATA ) 元素9：格式 应用级别：R。DC定义为：资源的物理或数字形式。 &lt;dc:identifier&gt; ( #PCDATA ) 元素10：标识符 应用级别：MA。DC定义为：资源的特定指向。 &lt;dc:source&gt; ( #PCDATA ) 元素11：来源 应用级别：O。DC定义为：被衍生资源的指引。 &lt;dc:language&gt; ( #PCDATA ) 元素12：语种 应用级别：MA。DC定义为：资源知识内容的语种。 &lt;dc:relation&gt; ( #PCDATA ) 元素13：关联 应用级别：O。DC定义为：相关资源的指引。 &lt;dc:coverage&gt; ( #PCDATA ) 元素14：覆盖范围 应用级别：O。DC定义为：资源内容的量度和范围。 &lt;dc:rights&gt; ( #PCDATA ) 元素15：权限 应用级别：R（如果存在债权关系）。

　　syn模块的主要内容：  
命名空间： xmlns:sy="[http://purl.org/rss/1.0/modules/syndication/](http://purl.org/rss/1.0/modules/syndication/)"

对&lt;channel&gt;扩展下列元素

1. &lt;sy:updatePeriod&gt; ( 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' )
2. &lt;sy:updateFrequency&gt; ( a positive integer )
3. &lt;sy:updateBase&gt; ( #PCDATA ) \[W3CDTF]

例子：

```
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
   xmlns:co="http://purl.org/rss/1.0/modules/company/"
   xmlns:ti="http://purl.org/rss/1.0/modules/textinput/"
   xmlns="http://purl.org/rss/1.0/"  >   <channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0">
     <title>Meerkat</title>
     <link>http://meerkat.oreillynet.com</link>
     <description>Meerkat: An Open Wire Service</description>      <dc:publisher>The O'Reilly Network</dc:publisher>
     <dc:creator>Rael Dornfest (mailto:rael@oreilly.com)</dc:creator>
     <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>      <dc:date>2000-01-01T12:00+00:00</dc:date>
     <sy:updatePeriod>hourly</sy:updatePeriod>
     <sy:updateFrequency>2</sy:updateFrequency>
     <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>      <image rdf:resource="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg" />      <items>
       <rdf:Seq>
         <rdf:li resource="http://c.moreover.com/click/here.pl?r123" />
       </rdf:Seq>      </items>      <textinput rdf:resource="http://meerkat.oreillynet.com" />    </channel>    <image rdf:about="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg">
     <title>Meerkat Powered!</title>      <url>http://meerkat.oreillynet.com/icons/meerkat-powered.jpg</url>
     <link>http://meerkat.oreillynet.com</link>
   </image>    <item rdf:about="http://c.moreover.com/click/here.pl?r123">      <title>XML: A Disruptive Technology</title>     <link>http://c.moreover.com/click/here.pl?r123</link>
     <dc:description>
       XML is placing increasingly heavy loads on the existing technical
       infrastructure of the Internet.
     </dc:description>
     <dc:publisher>The O'Reilly Network</dc:publisher>      <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
     <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
     <dc:subject>XML</dc:subject>      <co:name>XML.com</co:name>
     <co:market>NASDAQ</co:market>
     <co:symbol>XML</co:symbol>
   </item>   <textinput rdf:about="http://meerkat.oreillynet.com">      <title>Search Meerkat</title>
     <description>Search Meerkat's RSS Database...</description>
     <name>s</name>
     <link>http://meerkat.oreillynet.com/</link>      <ti:function>search</ti:function>
     <ti:inputType>regex</ti:inputType>
   </textinput>  </rdf:RDF>
```