RSS was designed to share data like headlines, links and short descriptions of these.
RSS 將數據分成像標題,連接和簡單描述的形式。(濃縮過的信息)
RSS allows fast browsing for news and updates.
RSS能快速瀏覽新聞和更新內容。
What You Should Already Know
哪些是你應該已經知道的
Before you continue you should have a basic understanding of the following:
在繼續學習前你應該有下面這些知識點的基礎:
- HTML / XHTML
- XML / XML 命名空間
What is RSS?
什么是RSS?
- RSS stands for Really Simple Syndication
RSS就是 Really Simple Syndication (真正的簡單聚合) - RSS allows you to syndicate your site content
RSS可以聚合你網站上的內容 - RSS is a selected list of defined items on a site
RSS是一站點上被選中的內容清單 - RSS defines an easy way to share and view headlines and content
RSS是一種更便捷的方法去查看標題和內容 - RSS files can be automatically updated
RSS文件可以自動的更新 - RSS allows personalized views for different sites
RSS允許更具人性化(個性化)的查看不同的站點 - RSS is written in XML
RSS是用XML來書寫的
Why Use RSS?
為什么使用RSS?
RSS was designed to show selected data.
RSS 能展示被選擇的數據(針對性)
Without RSS, users will have to check your site daily to check for new updates. This may be too time-consuming for many users. With an RSS feed (RSS is often called a News Feed or RSS Feed) they can check your site faster using an RSS aggregator (a site or program that gathers and sorts out several RSS feeds).
沒有RSS的話,用戶將必須每天到你的站上看看有沒更新內容。這對于一些用戶來說是很浪費時間的。通過一個RSS feed他們可以使用RSS閱讀器更快的查看你的站是否有更新。
Since RSS data is small and fast-loading, it can easily be used with services like cell phones or PDA's.
因為RSS數據很小而且加載速度很快,它可以容易的在手機或PDA服務上使用。
Web-rings with similar information can easily share data on their sites to make them better and more useful.
Wb-rings通過相似的信息可以方便的共享他們站點的信息。
Who Should Use RSS?
哪些人應該使用RSS?
Webmasters who seldom update their sites do not need RSS.
站長如不是經常更新站帶內信息的話可以不使用RSS
RSS can be useful for Web sites that are updated frequently, like:
RSS對于那些經常更新的站點來說是和有幫助的,像:
- News sites - Lists news with title, date and descriptions
新聞站 - Site changes - Lists changed pages or new pages
站點改動信息版塊 - Companies - Lists news and new products
公司站 - 新聞 和 新產品 - Calendars - Lists upcoming events and important days
日歷
The Future of RSS
展望RSS
RSS is going to be everywhere.
RSS將遍及每個角落
Thousands of sites use RSS and more people understand its usefulness every day.
數千站使用著RSS并且每天有越來越多的人明白了它的有用之處。
By using RSS, information on the Web becomes easier to find and web developers can spread their information more easily to special interest groups.
有了RSS,在WEB上的信息變的容易找到并且WEB開發者能夠容易的將信息傳播給興趣小組。
Hopefully, future RSS versions will include additional fields that will make it even easier to categorize and share.
未來的RSS版本可能包含額外的領域來使分類和分享信息來的更容易。
RSS的歷史
翻譯:Linyupark / 2006-04-24
RSS has been released in many different versions.
RSS發布過一些不同的版本
The History of RSS
RSS的歷史
Here is the history of RSS according to Dave Winer (key developer of most of the RSS formats):
依據Dave Winer(RSS開發的關鍵人物)的描述,RSS有這樣的歷史:
- Dec. 1997 - Dave Winer developed scriptingNews
1997年12月 Dave Winer 開發了新聞腳本
- Mar. 1999 - RSS 0.90 was developed by Netscape, which supported the scriptingNews format. This was simply XML with a RDF Header
1999年三月 - RSS 0.90 由網景公司開發,支持格式化新聞腳本.
- Jun. 1999 - scriptingNews 2.0b1 was developed by Dave Winer at UserLand. This included Netscape's RSS 0.90 features
新聞腳本2.0b1于 1999年6月由Dave Winer開發,包含了網景RSS 0.90的特點
- Jul. 1999 - RSS 0.91 was an attempt by Netscape to move towards a more standard format and included most features from scriptingNews 2.0b1 but they removed the RDF header
1999年7月 - RSS0.91 網景試圖移入更多的標準格式并包含更多來自scriptingNews2.0b1的特性但是他們卻刪除了RDF頭
- Jul. 1999 - UserLand uses RSS 0.91 and gets rid of scriptingNews
1999年7月 - UserLand利用了沒有scriptNews的RSS0.91
- Netscape discontinues their RSS development
網景中斷了他們對RSS的開發 - Jun. 2000 - Official RSS 0.91 specification release from UserLand
UserLand公開了規范文檔
- Aug. 2000 - RSS 1.0 developed by a group lead by Rael Dornfest at O'Reilly. This format uses RDF and namespaces. Because of its name it is often confused as being a new version of 0.91, but this is a completely new format with no ties to RSS 0.91
- Dec. 2000 - RSS 0.92 developed by Dave Winer at UserLand and includes optional elements
- Sep. 2002 - RSS 2.0 is designed by Dave Winer after leaving Userland
- Jul. 2003 - RSS 2.0 specification released through Harvard under a Creative Commons license
What Are The differences?
有什么區別?
Unlike the other RSS formats, RSS 1.0 was developed using the W3C RDF (Resource Description Framework) standard.
不像其他RSS的規格,RSS1.0使用W3C的DRF標準開發.
What RSS Version Should I Use?
我該用哪個版本的RSS?
RSS 0.91 and RSS 2.0 are easiest to understand. RSS 1.0 is more complex to learn and takes more time and bandwidth to process.
RSS0.91和RSS2.0是最容易理解的版本。1.0學起來比較復雜而且需要花更多的帶寬來運作。
Our tutorial is based on RSS 2.0.
我們的教程是基于RSS2.0的
Is There an RSS Web Standard?
有RSS WEB標準嗎?
There is no official standard for RSS. But about 50 % of all RSS feeds use the RSS 0.91 format. About 25 % use the RSS 1.0 format and the last 25 % is split between the other RSS 0.9x versions and RSS 2.0.
沒有正式的RSS標準。但在所有的RSS feeds中大約有50% 使用RSS 0.91規格. 25%使用RSS1.0規格并且至少有25%使用 RSS 0.9x 和 RSS 2.0之間的版本。
RSS語法
翻譯:Linyupark / 2006-04-24
The syntax rules of RSS 2.0 are very simple and very strict.
RSS2.0的語法規則非常簡單并十分的嚴格。
This tutorial teaches how to create your own RSS feed and maintain it.
這個教程會教你如何建立你自己的RSS feed并維護它。
An Example RSS document
一個RSS文檔的例子
RSS documents use a self-describing and simple syntax.
RSS文檔使用了簡單的自描述語法。
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>W3Schools</title>
<link>http://www.w3schools.com</link>
<description>W3Schools Web Tutorials </description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>Check out the RSS tutorial
on W3Schools.com</description>
</item>
</channel>
</rss>
The first line in the document - the XML declaration - defines the XML version and the character encoding used in the document. In this case the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set.
文檔內的第一行為XML聲明-定義了XML的版本和文檔使用的字符編碼。這個例子里文檔使用的是XML1.0版本,編碼為 ISO-8859-1.
The next line describes the RSS element of the document (like it was saying: "this is an RSS document - version 2.0"):
下面的一行描述RSS文檔元素(這個就像在說:"這是一份RSS2.0版本的文檔")
<rss version="2.0">
The next line describes the <channel> element of the document:
再下面的一行描述了文檔的<channel>元素:
<channel>
The next three lines describe three child elements of the <channel> element (<title>, <link> and <description>):
接下來的三行描述了<channel>的三個子元素(<title>,<link>,<description>)
<title>W3Schools</title>
<link>http://www.w3schools.com</link>
<description>W3Schools Web Tutorials</description>
Then there is an <item> element. The <item> element contains the information you would like your RSS feed to show (<title>, <link> and <description>). You can add multiple <item> elements:
然后就是<item>元素,<item>元素包含了RSS展示的一些信息(<title>, <link> 和 <description>)你可以添加數個<item>元素:
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>Check out the RSS tutorial
on W3Schools.com</description>
</item>
Finally, the two last lines close the <channel> and <rss> elements:
最后的兩行關閉<channel> 和 <rss> 元素:
</channel>
</rss>
Did you understand that this was an RSS feed from W3Schools? Don't you agree that RSS is pretty self-descriptive?
你明白這是個來自W3S的RSSfeed了不?難道你不認為這是個很好的RSS自我描述?
RSS is an XML Dialect
RSS 是一種XML的方言
Because RSS is XML, there are a couple of things you must remember.
因為RSS是XML,有一些事你必須了解
- All XML elements must have a closing tag
所有XML元素必須有關閉標簽 - XML tags are case sensitive
XML標簽區分大小寫 - All XML elements must be properly nested
所有XML元素必須合理嵌套 - Attribute values must always be quoted
屬性值必須在引號內
Comments in RSS
RSS注釋
The syntax for writing comments in RSS is similar to that of HTML:
書寫RSS注釋的語法和HTML十分相似:
<!-- This is a comment -->
RSS channel元素
翻譯:Linyupark / 2006-04-24
The <channel> element is where you describe your RSS feed.
<channel>元素內是描述RSS feed的地方
With RSS 2.0 there are a lot of different options for the channel element.
對于channel元素來說RSS2.0有很多不同的選擇(指內部可選擇的元素有很多種)
The <channel> Element
<channel>元素
The RSS <channel> element is where items are displayed. It is like an RSS headline. Channel elements normally do not change very often.
RSS的<channel>元素是項目內容顯示的地方。它就像RSS的標題。一般來講它不會頻繁的改動。
There are three required elements inside the <channel> element: <title>, <link>, and <description>.
有三個內部元素是必須有的:<title>, <link>, 和 <description>.
The <title> element should contain a short description of your site and your RSS feed:
<title>元素里應該包含你的站和你的RSS feed簡短的說明:
<title>W3Schools News Update</title>
The <link> element should define the link to your site's main page:
<link>元素應該定義你網站主頁的鏈界:
<link>http://www.w3schools.com</link>
The final required element is <description>. This element should describe your RSS feed.
最后必須有的元素就是 <description>,這個元素應該描述你的RSS feed.
<description>W3Schools Web Tutorials</description>
Optional Elements in <channel>
<channel>內的可選元素
Element 元素 | Description 描述 |
---|---|
<category> | Defines one or more categories the channel belongs to 定義一個或多個頻道分類 |
<cloud> | Allows notification of updates. 允許更新通告 |
<copyright> | Notifies about copyrighted material 提醒有關版權 |
<docs> | An URL to documentation on the RSS version the channel is using 頻道所使用的RSS版本文檔URL |
<generator> | If the channel is created using an automatic generator, this is defined here 如果頻道是自動生成器產生的,就在這里定義 |
<image> | Inserts a picture to the channel. 給頻道加圖片 |
<language> | Describes what language the channel uses. By using this tag it is possible for RSS aggregators to group sites based on language. 描述了頻道所使用的語言。 |
<lastBuildDate> | Defines the last date the channel was modified 定義頻道最新一次改動的時間 |
<managingEditor> | Defines an e-mail address for the editor of the site 定義編輯站點人員的E-mail地址 |
<pubDate> | Defines the last publication date for the channel 定義頻帶最新的發布時間 |
<rating> | Parental control rating of the page 頁面評估 |
<skipDays> | Defines days where it is unnecessary for RSS aggregators to update the feed |
<skipHours> | Defines hours where it is unnecessary for RSS aggregators to update the feed |
<textInput> | Creates a text input for the channel |
<ttl> | (ttl = time to live) Defines how many minutes the channel can stay cached before refreshing 存活的有效時間 |
<webMaster> | Defines an e-mail address for the webmaster of the site 定義站張的郵件地址 |
RSS item 元素
翻譯:Linyupark / 2006-04-24
The <item> element is where you link to and describe the update on your site.
<item>元素內是你網站連接和描述更新內容的地方。
With RSS 2.0 there are a lot of different options for the item element.
在RSS 2.0 item元素里有很多不同的可選內容
The <item> Element
<item>元素
The RSS <item> is where updates are displayed. It is kind of like a headline for an article. <item> elements are created every time there is an update on your site that you would like displayed in your RSS feed.
<item>是顯示RSS更新內容的地方。它像是文章的標題。當你的站點有更新時RSSfeed中的<item>元素就會被建立起來。
There are several optional <item> elements, but either the <title> or the <description> are required.
<item>元素里有幾個可選的元素,但<title> 或是<description>是必須有的。
A RSS <item> should include the <title>, <link> and <description> elements.
一個RSS的<item>應該包括 <title>, <link> 和 <description>元素
The first element is your news item's title. This should be a very short description of your site and your RSS feed:
第一個元素是項目的題目。應該用十分簡短的描述:
<title>W3Schools New RSS Tutorial</title>
The next element is the link to the part of your site the item is referring to:
接下來的元素項目所關聯的連接:
<link>http://www.w3schools.com/rss</link>
The next line is the RSS feed description. This should describe your RSS feed item.
再下面的一行就是RSS feed的描述部分,這應該是描述你的RSS feed項目的。
<description>W3Schools RSS Tutorial</description>
Optional Elements in <item>
可選的<item>元素
Tag | Description |
---|---|
<author> | Defines the author of the item. 定義作者 |
<category> | Places the item in one or more of the channel categories. 類別 |
<comments> | An URL to a comment's page for the item. 針對項目的評論頁URL |
<enclosure> | Describes a media object related to the item 描述一個與項目有關的媒體對象 |
<guid> | GUID = Globally Unique Identifier. Defines a unique identifier to the item.針對項目定義獨特的標志 |
<pubDate> | The publication date for the item. 項目發布時間 |
<source> | Is used to define a third party source. 轉載地址(源地址) |
RSS發布
翻譯:Linyupark / 2006-04-24
Having a RSS feed is no good unless other people can see it.
光有RSS feed還是不夠的,應該讓別人能看到它
Publish Your RSS Feed
發布你的RSS feed
Publishing and getting people to notice your RSS feed is as important as making one.
發布并讓人們注意到的你RSS就和你制作它一樣重要
First, put your rss.xml file on the internet. You can place it on the same server as your site.
首先,將你的RSS.xml文件放到你的站點服務器上。
Next, let people know you have a RSS feed. Register your feed with an aggregator.
然后,讓人們知道你有一個RSSfeed.到相關的目錄站上注冊你的RSS(下面是一些國外知名的RSS發布站)
- Syndic8: The largest RSS directory. Syndicate has over 300,000 feeds listed. Register your feed here.
- Daypop: A large news oriented RSS aggregator. Over 50,000 news oriented feeds. Register your feed here.
- Newsisfree: A news oriented RSS aggregator. Over 18,000 feeds. Register your feed here.
Then, place this and this
with URL's to a page that explains briefly how other people can view your RSS feed.
接著, 將這兩個含有連接到你RSS地址的圖片放到你站點的頁面上,人們就可以看到你的RSS feed了
Can I Manage my RSS Feed Myself?
我可以自行管理RSS feed嗎?
The best way to be sure your RSS feed includes the things you want, and works the way you want, is to manage it yourself. But this can be very time consuming, especially for pages with a lot of updates.
如你想讓RSS里包括一些你想要的東西或是想按你的想法來做,最好的辦法就是你自己來管理它,但是這將是非常煩瑣的,因為很多頁有不同的東西要更新。
Your other alternative is to use a third party automated RSS.
還有種選擇就是使用第三方的RSS自動生成器
Automated RSS
RSS自動生成
If you don't want to update your RSS feed yourself, there are tools and services you can use to automate it.
如果你不想自己來更新RSS,這有些工具可以為你服務。
===== 以下是幾個工具的官方地址=====
One such service is MyRSSCreator (featured in "RSS for dummies"), who can offer an automated, reliable RSS service in just 10 minutes.
There are also free services such as FeedFire, who offers free creation and distribution of RSS feeds.
For users who just need an easy RSS feed for their personal website, some of the most popular blog (Web Log) managers (like Blogger and Radio) offers built in automated RSS services.
Validate
校驗
You can validate your RSS feed here[校驗地址]. This validator supports all RSS versions.
RSS閱讀器
翻譯:Linyupark / 2006-04-24
A RSS reader gathers your news for you.
一個RSS閱讀器可以為你收集新聞
RSS readers are available for many different devices and OS.
RSS閱讀器可以在很多不同的設備和操作系統上運作
RSS Readers
[下面是國外的幾款閱讀器]
There are a lot of different RSS readers. Some work as web services, and some are limited to windows (or Mac, PDA or UNIX). Here are a few I have tried and liked:
- NewsGator Online - An free online based RSS aggregator. NewsGator Online also includes synchronization with Outlook Edition, viewing content on TV with Media Center Edition, as well as the publication of blogs and headlines.
- RssReader - A free Windows based RSS aggregator. RssReader supports RSS versions 0.9x, 1.0 and 2.0 as well as Atom 0.1, 0.2 and 0.3.
- FeedDemon - A great Windows based RSS aggregator. This is very easy to use and has a very orderly interface. But this is not freeware.
- blogbot - A RSS aggregator plugin for your Outlook or Internet Explorer. The lite version for Internet Explorer is free.
There are a lot of other RSS readers out there. http://www.ourpla.net/cgi-bin/pikie.cgi?RssReaders has a big list of RSS readers, you can even add your own readers to this page or comment on the existing ones.