W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > March 2010

Cool rdfQuery application

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Tue, 16 Mar 2010 11:39:58 -0400
Message-ID: <4B9FA64E.8000005@digitalbazaar.com>
To: RDFa WG <public-rdfa-wg@w3.org>
Toby - this might be useful for the RDF TripleStore API you're

This is really cool - the following code processes the RDFa on the radio
BBC programmes site and extracts the data using SPARQL.

    .prefix('mo', 'http://purl.org/ontology/mo/')
    .prefix('foaf', 'http://xmlns.com/foaf/0.1/')
    .prefix('dc', 'http://purl.org/dc/terms/')
    .where('?track a mo:Track')
    .where('?track foaf:maker ?artist')
    .where('?track dc:title ?trackTitle')
    .where('?artist a mo:MusicArtist')
    .where('?artist foaf:name ?artistName') // not quite working yet
(rdfQuery bug)
    .each(function(i, bindings, triples) {

Fairly easy to read and understand, IMHO. It should look pretty familiar
to database folks. The data is then used to do some really cool stuff in
GreaseMonkey... more here:


-- manu

Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarming Goes Open Source
Received on Tuesday, 16 March 2010 15:40:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:46 UTC