RSS and RDF

Volume 6, Issue 21; 22 May 2003

On RSS, RDF, and making the former an instance of the latter.

This morning, Tim Bray posted some thoughts on RDF, including a passing mention of RDFifying RSS.

Tim argues that the problem with RDF is the syntax, the XML serialization syntax in particular. He may be right. In the general case, or at least in some of the examples from the specification, it does suck.

But in practice, it boils down to name/value pairs, and it's not really that hard to grok. Consider this example from my own personal collection:

<gn_:City
     rdf:about="mb-uuid-...eb72a8">
  <rdf:type rdf:resource="http://..."/>
  <gn_:id>france-castelnaudary</gn_:id>
  <gn_:name>Castelnaudary</gn_:name>
  <gn_:country>FR</gn_:country>
  <geo:lat>43.3</geo:lat>
  <geo:long>1.95</geo:long>
  <p:uri>http://www.getty.edu/...</p:uri>
  <mb:category rdf:resource="..."/>
  <mb:text>France/Castelnaudary</mb:text>
  <mb:uuid>c23478aa-...eb72a8</mb:uuid>
  <xmb:modified>1</xmb:modified>
  <palm:id>A3164A</palm:id>
</gn_:City>

Which, modulo a couple of obscure namespace prefixes, I don't think is all that difficult to figure out through simple inspection. (The “view source” paradigm.) It says there's a city named Castelnaudary in France at a particular latitude and longitude and points to a URI that describes it more completely (from the Getty Thesaurus of Geographic Names). The primary source for this information is a record in my Palm memo book, so says a few other things about my Palm, but they aren't really relevant here.

What does this have to do with RSS?

I have a possibly odd RSS application: I use RSS to keep track of my schedule. I have an “RSS feed” that shows me my todo items, upcoming calendar events, and some other stuff.

I have a feeling that using RSS for this is either a really clever idea or a really stupid one, but I'm not sure which. Anyway, it's working for me. It means that everytime I peek at my RSS viewer, I see my schedule.

The problem is, I want to put additional metadata in the feed. Consider:

<item>
<title>Todo: Application/xslt+xml</title>
<link>tb-uuid-ecd57cf8...a944c6</link>
<dc:subject>Todo</dc:subject>
<p:category>Business</p:category>
<p:priority>1</p:priority>
<tb:due>2003-04-01</tb:due>
<description>Do the paper work for the
XSL WG to register application/xslt+xml
</description>
</item>

The point of the extra metadata is that it allows my RSS viewer to display the data in meaningful ways. (The as-yet unimplemented plan is to filter the feeds through XSLT to HTML for display. If I hadn't spent the last couple of weeks hacking this site into shape, I'd have finished that by now :-)

The point is, this extra metadata is really easy to add with the RDF version of RSS. In point of fact, the example above is valid RSS 2.0 as well, because 2.0 allows foreign namespaced elements even though it isn't in RDF.

So what's my problem?

My problem is that “almost RDF” formats are a pain in the ass, just like all the other “almost” formats you've ever encountered. Yes, the transformation to RDF is easy with XSLT, but it's still an extra step.

From my perspective, the added complexity of RDF in RSS seems pretty minor and the payoff is less irritation for me. I call that a win. But I'm prepared to believe my perspective is a bit skewed.