RSS and Atom in Action: Newsfeed Formats | Page 2
[previous] [next]
RSS and Atom in Action: Newsfeed Formats
4.1.2 The elements of RSS 0.91
The definitive source of information about RSS 0.91 is the specification itself, but for your convenience we have provided a summary diagram in figure 4.1. Each box in the diagram represents an XML element, and the arrows indicate containment. For example, the <rss>
element contains the <channel>
element, which contains <description>
, <link>
, <language>
, and so on.
We saw the <rss>
, <channel>
, and <item>
elements in listing 4.1, but some new
elements here deserve mention:
|
Let's get back to our history lesson, picking up the story with RSS 1.0.
4.2 The RDF fork: RSS 1.0
RSS 0.91 was clearly useful, but just about everybody agreed that it needed some improvement and additional metadata. Unfortunately, the RSS user and developer community was divided about how RSS should be improved. A group of RDF advocates wanted to bring the full power of RDF back into RSS. Dave Winer, on the other hand, wanted to keep RSS as simple as possible. The two sides did not get along well and eventually, in December 2000, the RDF advocates released what they called RSS 1.0Âa new version of RSS with RDF back in the mix and with support for extension modules.
RSS 1.0 was well received. It was adopted by the popular Movable Type blogging system and as a result is still in widespread use. Let's take a close look at it, starting with the sample RSS 1.0 newsfeed shown in listing 4.2. This feed is taken from the specification itself. Some optional elements have been removed for the sake of brevity.
Listing 4.2 Example of an RSS 1.0 format newsfeed
The first thing to note is that the newsfeed is an RDF document [line 2]. Next, notice that the containment hierarchy is different from that of earlier forms of RSS. The <item>
elements are not contained within the <channel>
element [line 5]. The channel is essentially the header for the file. It contains the <title>
[line 6], <link>
[line 7], and <description>
[line 9] of the newsfeed, as well as an RDF-style table of contents [line 13] that lists the items in the newsfeed.
Each <item>
contains the same <title>
, <link>
, and <description>
elements as in previous versions of RSS, except that the item permalink is specified twice—once in the rdf:about
attribute [line 19] and once in the <link>
element [line 21]. Note that an item-level <dc:date>
element in each item. We'll show you how to do that in section 4.2.2.
[previous] [next]
URL: