4.2 RSS 0.92

RSS 0.92 followed 0.91 in December 2000. It is a historic curiosity that RSS 0.92 actually followed RSS 1.0 by two weeks. By this time, Netscape's interest in all things RSS had waned, and the job of formalizing the latest developments in the simpler side of RSS was taken up by Userland's Dave Winer, building on his previous role of elucidating the RSS 0.91 specification. The 0.92 specification builds extensively on 0.91 and is upwardly compatible with it. Therefore, all 0.91 files are also valid 0.92 files.

4.2.1 Changes to Existing Elements

  • <rss version="0.91"> becomes <rss version="0.92"> .

  • All character limits are now removed. Elements can be as long as you like.

  • You can have as many item elements as you like.

  • All subelements of item are optional.

  • language is now optional.

4.2.2 New Elements to RSS 0.92

RSS 0.92 also introduced four new elements into RSS:

<source url="">

An optional subelement of item . It should contain the name of the RSS feed of the site from which the item is derived, and the attribute url should be the URL of the other site's RSS feed.

<enclosure url="" length="" type=""/>

An optional subelement of item used to describe a file associated with an item . It has no content, but it takes three attributes: url is the URL of the enclosure, length is its size in bytes, and type is the standard MIME type for the enclosure.

<category domain="">

An optional subelement of item that takes one attribute, domain . The value of category should be a forward slash-separated string that identifies a hierarchical location in a taxonomy represented by the domain attribute. See Example 4-3 for an example.

<cloud domain="" port="" path ="" registerProcedure="" protocol="" />

The <cloud/> element is an optional subelement of the channel element. It takes no value, but it has five mandatory attributes: domain , path , port , registerProcedure , and protocol . These attributes provide details that allow for the Publish and Subscribe function, as described in Chapter 12.

Example 4-3 demonstrates these elements in action.

Example 4-3. An example of RSS 0.92, with two items
 <?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="0.92"> <channel>   <title>RSS0.92 Example</title>    <link>http://www.oreilly.com/example/index.html</link>    <description>This is an example RSS0.91 feed</description>    <language>en-gb</language>    <copyright>Copyright 2002, Oreilly and Associates.</copyright>    <managingEditor>editor@oreilly.com</managingEditor>    <webMaster>webmaster@oreilly.com</webMaster>  <rating> <!-- See the text --> </rating>   <pubDate>03 Apr 02 1500 GMT</pubDate>   <lastBuildDate>03 Apr 02 1500 GMT</lastBuildDate>   <docs>http://backend.userland.com/rss091</docs>   <skipDays>     <day>Monday</day>   </skipDays>   <skipHours>     <hour>20</hour>   </skipHours>   <cloud domain="http://www.oreilly.com" port="80" path="/RPC2"  registerProcedure="pleaseNotify" protocol="xml-rpc" />   <image>     <title>RSS0.91 Example</title>      <url>http://www.oreilly.com/example/images/logo.gif</url>      <link>http://www.oreilly.com/example/index.html</link>     <width>88</width>      <height>31</height>      <description>The World's Leading Technical Publisher</description>   </image>   <textInput>     <title>Search</title>     <description>Search the Archives</description>     <name>query</name>     <link>http://www.oreilly.com/example/search.cgi</link>   </textInput>       <item>     <title>The First Item</title>      <link>http://www.oreilly.com/example/001.html</link>      <description>This is the first item.</description>     <source url="http://www.anothersite.com/index.xml">Another Site</source>     <enclosure url="http://www.oreilly.com/001.mp3" length="54321" type"audio/mpeg"/>     <category domain="http://www.dmoz.org"> Business/Industries/Publishing/Publishers/ Nonfiction/</category>   </item>       <item>     <title>The Second Item</title>      <link>http://www.oreilly.com/example/002.html</link>      <description>This is the second item.</description> <source url="http://www.anothersite.com/index.xml">Another Site</source>     <enclosure url="http://www.oreilly.com/002.mp3" length="54321" type"audio/mpeg"/> <category domain="http://www.dmoz.org"> Business/Industries/Publishing/Publishers/Nonfiction/</category>   </item> </channel> </rss> 

Including HTML Within a Feed

Whether the description element within RSS 0.92, 2.0, and 1.0 may contain HTML is a matter of great debate. In my opinion, it should not, for both practical and philosophical reasons. Practically speaking, including HTML markup requires the client software to have the ability to parse or filter it. While this is fine with many desktop agents , it is restricting for developers looking for other uses of the data. This brings us to the philosophical aspect. RSS's second use, after providing headlines and content to desktop readers and sites, is to provide indexable metadata. By combining presentation and content (i.e., by including HTML markup within the description element), we risk breaking this feature.

Content Syndication with RSS
Content Syndication with RSS
ISBN: 0596003838
EAN: 2147483647
Year: 2005
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net