Using Modules in Your RSS Feed - Simple Semantic Resolution Module
(Page 3 of 4 )
One of the never-ending arguments within the RSS world is that between the pro-and anti-RDF camps. The fork between RSS 0.91 and 1.0 was almost entirely caused by this disagreement. The pro-RDF camp stated, quite rightly, that RDF data has a great deal more meaningful utility than plain XML, whilst the anti-RDF camp stated, also quite rightly, that the RDF syntax was horrible, and that no one can understand it without reading the documentation and having a nice lie down.
That may be--we'll find out your own feelings on this in the next chapters--but in the meantime, the Simple Semantic Resolution module was one idea put forward to bridge the divide between the two cultures.
Written by Danny Ayers, its presence in an RSS 2.0 feed simply means "this data should be considered RDF, and to use it with an RDF-compatible application you should apply this transformation to it first." Whereupon, it points you to a nice XSLT stylesheet. That stylesheet consists of one single element, a subelement of channel, and has the following namespace declaration:
xmlns:ssr="http://purl.org/stuff/ssr"
The element is:
ssr:rdf
It's empty, but contains a single attribute, transform, which is equal to the URL of the necessary stylesheet:
<ssr:rdf transform="http://w3future.com/weblog/gems/ rss2rdf.xsl" />
Example 4-6 shows the SSR module in use.
Example 4-6. Part of an RSS 2.0 feed with the SSR module
<?xml version="1.0"?>
<rss version="2.0" xmlns:ssr="http://purl.org/stuff/ssr"> <ssr:rdf transform="http://w3future.com/weblog/gems/ rss2rdf.xsl" />
...
More details can be found at http://ideagraph.net/xmlns/ssr/.
Trackback Module
The trackback system for weblog content management systems (see
http://www.movabletype.org/docs/mttrackback.html for the technical details) has grown up in the same neighborhood as RSS, so it's only fair that the one should be represented in the other.
This module, also available in tasty RSS 1.0, comes from Justin Klubnik and allows RSS 2.0 feeds to display both the URL that people should trackback to, but also the URL that the item has trackbacked itself. The idea is that aggregators can send pings and also follow links to find related pages, because items might ping places they don't explicitly link to.
This module is made up of two elements, subelements of item, and has the following namespace declaration:
xmlns:trackback="http://madskills.com/ public/xml/rss/module/trackback/"
Here are the elements:
trackback:ping
This contains the item's trackback URL:
<trackback:ping>http://foo.com/ trackback/
tb.cgi?tb_id=20020923</trackback:ping>
trackback:about
This contains any trackback URL that was pinged in reference to the item:
<trackback:about>http://foo.com/ trackback/tb.cgi?tb_id=20020923</trackback:about>
More details can be found at http://madskills.com/public/xml/rss/module/trackback/.
Next: ICBM Module >>
More XML Tutorials Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the book Developing Feeds with RSS and Atom, written by Ben Hammersley (O'Reilly; ISBN: 0596008813). Check it out today at your favorite bookstore. Buy this book now.
|
|