Using RSS 2.0 and RDF together

I've been working on a series of issue analyses for the RSS 2.0 site. One of the questions I've been wanting to explore is whether RDF might be used in conjunction with RSS 2.0, and if so how. Today, in the comments section of the site, Dan Brickley pointed me to the example I've been looking for. He writes:

This week, a new 'RSS and jobs' site is getting some interest. http://www.rssjobs.com/rssjobs/index.jsp There is a similiar effort at http://jobs.perl.org/rss/ (eg. see http://jobs.perl.org/rss/telecommute.rss) and an old example scenario that Libby and I worked on at http://ilrt.org/discovery/2000/11/rss-query/.

I hope we all agree that such applications are an exciting part of the future of RSS and RSS-like technology. To my mind, the big question is, how can we partition the work so that we have a Web of complementary namespaces which fit together to give us better descriptions in our XML feeds.

Looking at the feeds currently served by rssjobs.com, all the structure is hidden, entity escaped, inside the 'description' tag. Date, job title, employer, location, blurb... all crushed into a single field.

Suppose you wanted to do an RSS 2.0 feed that would expose those job fields as first-class XML. And suppose further that you wanted to express the job data in terms of RDF. What might that look like?

Here's a trial balloon feed (also reproduced below). I'm sure there are problems with it. I have no idea whether, or if so how well, something like this would meet the need -- which, to be clear, is to leverage RSS 2.0 to transmit application-specific data. There's lots that I still don't know about XML namespaces, and even more that I don't know about RDF, so even though this example is valid, I know there are issues to explore, both in terms of RDF usage specifically, and more generally with respect to how namespaces should best work together.

I'd like to surface those issues, in the spirit of better understanding how to achieve the "Web of complementary namespaces" that Dan rightly envisions. Comments.

Update: In the comments, Scott Reynen pointed out that "your rss tag ends (>) before the namespaces (as well as after)." Heh. Good catch. That explains why I couldn't attach the rdf:about attribute to the channel, and some other oddities. Thanks Scott. I've amended the example accordingly. Now, I still have no idea whether this is, or could be, coherent from an RDF perspective. But here's what Dan Brickley added today over on the RSS 2.0 site:

The tricky case is where RDF namespaces are mixed in an XML context where the XML is not generally being arranged as an encoding of an RDF graph. In such cases, all bets are off, we don't really know what is meant by an unknown XML element or attribute, since there is no over-arching set of cross-namespace rules that are being followed.

So, what to do? A stark line (one I don't believe anyone is taking) would be to assert that RDF vocabularies can only appear in XML documents that are structured according to the (current) RDF/XML syntax. So any use of FOAF in non-RDF XML would be illegal, for example. That strikes me as wrong for a couple of reasons. Firstly it increases the gap between RDF and XML when we should be working to reduce it. Secondly, it would create an upgrade hell if W3C (or anyone else) were trying to deploy an alternative XML encoding of RDF graphs (there are a few of these and one may catch on...). There may end up being other XML encodings of RDF graphs, and we won't want to go changing all our RDF vocab namespace URIs to celebrate that occasion.

So a less stark line, and one I'm currently inclined towards, is to explore some rules along the lines of "It is OK for XML markup to draw upon RDF namespaces even when the enclosing XML markup isn't in RDF syntax, so long as all elements below that RDF-namespaced element are structured in accordance with a regular RDF syntax.

So, let's follow through on this. Scott Reynen also points out that he's implemented a service that converts Monster.com and HotJobs.com searches into RSS feeds. Here's one such feed for technology jobs in or around Boston. And here's a sample of the RSS 2.0 results:

<item>
<title>Vice President WW Channel, Enterprise Sales ( Boston, MA ) </title>
<link>http://us.rd.yahoo.com/hotjobs/searchresults.... </link>
<description>DuVall & Associates<br />$160K-$200K </description>
<author>scott@randomchaos.com </author>
<pubDate>Tue, 05 Aug 2003 12:00:00 +0800</pubDate>
</item>
Cool. Now the question I'm asking, which Dan Brickley's comment partly answers, is: "Can Scott Reynen augment this RSS 2.0 feed with RDF-isms that carry application-specific data that a jobs-aware RSS reader could use to filter or more richly display the items in this feed?" Dan seems to be saying "Yes."

I'll ask and answer a more general question. Can a modular extension to RSS, built to carry job-related metadata, add value for users of RSS readers aware of that extension? The answer here is clearly yes. This kind of thing has long been possible, and is now -- I feel sure -- going to explode on the scene.

If RDF can add value above and beyond what a non-RDF job-related metadata extension can offer, I would really like to see that clearly explained, ideally in the context of this example. Can the RDF-isms in this trial-balloon example be made coherent from an RDF perspective? What advantages would they confer, above and beyond the job-related metadata that any application aware of the job: and wn: namespaces could pick up?

Mockup of an RSS 2.0/RDF jobs feed

<?xml version="1.0"?>
<rss version="2.0"
 xmlns:wn="http://xmlns.com/wordnet/1.6/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:job="http://ilrt.org/discovery/2000/11/rss-query/jobvocab.rdf#"
 >
<channel rdf:about="http://ilrt.org/discovery/2000/11/rss-query/jobs-rss.rdf">
  <title>A hypothetical job listings channel</title>
  <link>http://ilrt.org/discovery/2000/11/rss-query/ </link>
  <description>
    This example shows RSS used as a lightweight data transport mechanism
  </description>
  <rdf:items>
     <rdf:Seq>
        <rdf:li resource="http://example.com/job1.html" />
        <rdf:li resource="http://example.com/job2.html" />
     </rdf:Seq>
  </rdf:items>
  <item rdf:about="http://example.com/job1.html">
     <title>The title of job1 goes here</title>
     <link>http://example.com/job1.html </link>
     <description>
        (Job1-Job1-Job1...)
     </description>
  <job:advertises> 
       <wn:Job job:title="Job title for job1 goes here"
          job:salary="100000"
          job:currency="USD"
          >
        <job:orgHomepage rdf:resource="http://www.ukoln.ac.uk/"/>
        </wn:Job>
  </job:advertises>
  </item>
  <item rdf:about="http://example.com/job2.html">
      <title>The title of job1 goes here</title>
      <link>http://example.com/job2.html </link>
      <description>
         (Job2-Job2-Job2...)
      </description>
     <job:advertises> 
          <wn:Job job:title="Job title for job2 goes here"
             job:salary="150000"
             job:currency="UKP"
             >
          <job:orgHomepage rdf:resource="http://ilrt.org/"/>
          </wn:Job>
      </job:advertises>
   </item>
</channel>
</rss>

Former URL: http://weblog.infoworld.com/udell/2003/08/05.html#a767