Skip to content

skos as atom

I’ll be the first to admit the tone and content of my last post was a bit off kilter. I guess it was pretty clear immediately from the title of the post. Chalk it up to a second night of insomnia; and also to my unrealistic and probably unnecessary goal of bringing the Atom/REST camp in closer alignment with the RDF/LinkedData camp … at least in my own brain if not on the web.

So, ever the pragmatist, Ian Davis called my bluff a bit on some of the crazier stuff I said:

I know Peter Keane took a stab at this over the summer. But I couldn’t find sample output lying around on the web, so I marked up one by hand to serve as a strawman. So here’s the turtle for the LCSH concept “World Wide Web”:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

<http://id.loc.gov/authorities/sh95000541#concept>
    a skos:Concept ;
    skos:prefLabel "World Wide Web"@en ;
    dcterms:modified "2001-10-01T09:56:06-04:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
    skos:altLabel "W3 (World Wide Web)"@en, "WWW (World Wide Web)"@en, "Web (World Wide Web)"@en, "World Wide Web (Information retrieval system)"@en ;
    skos:broader <http://id.loc.gov/authorities/sh88002671#concept>, <http://id.loc.gov/authorities/sh92002381#concept> ;
    skos:narrower <http://id.loc.gov/authorities/sh2002000569#concept>, <http://id.loc.gov/authorities/sh2003001415#concept>, <http://id.loc.gov/authorities/sh2007008317#concept>, <http://id.loc.gov/authorities/sh2007008319#concept>, <http://id.loc.gov/authorities/sh2008009697#concept>, <http://id.loc.gov/authorities/sh97003254#concept> ;
    skos:related <http://id.loc.gov/authorities/sh92002816#concept> ;
    skos:closeMatch <http://stitch.cs.vu.nl/vocabularies/rameau/ark:/12148/cb13319953j> .

And here’s the “corresponding” atom:

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:skos="http://www.w3.org/2004/02/skos/core#">
    <id>http://id.loc.gov/authorities/sh95000541#concept</id>
    <title>LCSH: World Wide Web</title>
    <author><name>Library of Congress</name></author>
    <updated>2001-10-01T09:56:06Z</updated>
    <skos:prefLabel>World Wide Web</skos:prefLabel>
    <skos:altLabel>W3 (World Wide Web)</skos:altLabel>
    <skos:altLabel>Web (World Wide Web)</skos:altLabel>
    <skos:altLabel>World Wide Web (Information retrieval system)</skos:altLabel>
    <skos:altLabel>WWW (World Wide Web)</skos:altLabel>
    <link rel="http://www.w3.org/2004/02/skos/core#broader" href="http://id.loc.gov/authorities/sh88002671#concept" title="Hypertext systems" />
    <link rel="http://www.w3.org/2004/02/skos/core#broader" href="http://id.loc.gov/authorities/sh92002381#concept" title="Multimedia systems" />
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh2008009697#concept" title="Invisible web"/>
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh2007008317#concept" title="Mashups (World Wide Web)" />
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh2002000569#concept" title="Semantic Web" />
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh2007008319#concept" title="Web 2.0" />
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh97003254#concept" title="WebDAV (Standard)" />
    <link rel="http://www.w3.org/2004/02/skos/core#narrower" href="http://id.loc.gov/authorities/sh97003254#concept" title="WebTV (Trademark)" />
    <link rel="http://www.w3.org/2004/02/skos/core#related" href="http://id.loc.gov/authorities/sh92002816#concept" title="Internet" />
    <link rel="http://www.w3.org/2004/02/skos/core#closeMatch" href="http://stitch.cs.vu.nl/vocabularies/rameau/ark:/12148/cb13319953j" title="Web" />
    <link rel="alternate" href="http://id.loc.gov/authorities/sh95000541" type="text/html" />
    <link rel="alternate" href="http://id.loc.gov/authorities/sh95000541.json" type="application/json" />
</entry>

Maybe I botched something? It could use a GRDDL stylesheet I suppose. At least the Atom validates. I really am a bit conflicted posting any of this here because there is so much about the Linked Data community that I like, and want to be a part of. But I’m finding it increasingly difficult to see a Linked Data future where RDF/XML is deployed all over. Instead I bleakly expect we’ll see more fragmentation, and dueling idioms/cultures … and I’m trying to see if perhaps things aren’t as bleak as they seem by grasping at what the groups have in common. Maybe John Cowan’s idea (in the comments) of coming up with an RDF serialization that is valid Atom wasn’t so bad after all? My apologies to any Linked Data folks who have helped me in the past who may have been rubbed the wrong way by my last blog post.

Update: Sean Palmer clued me in to some earlier work he has done in the area of Atom and RDF, the Atom Extensibility Framework. And Niklas Lindström let me know of some thinking he’s done on the topic that is grounded in some work he has been doing for legal information systems in Sweden.

2 Comments

  1. Hi Ed,

    I’m very interested to see this discussion of Atom. I’m currently working on a new system for managing data and metadata for studies of malaria. It’s at an early stage (not much to show yet), but we’ve tentatively opted to use Atom as the common standard for web service APIs, and then to code the user interface in the browser (using gwt) making direct calls to the Atom API whenever possible.

    FWIW we chose Atom and XML over anything based on RDF primarily because we needed a read-write API. SPARQL is great for querying data, but what we really need is to be able to CRUD arbitrary packages of data/metadata, and also define permissions over different collections of those packages … in addition to querying the data in various ways. While Atom doesn’t give you a query API, it is a good fit for the CRUD side of things.

    (As an aside, we’re also using eXist as the Atom implementation, which works more-or-less out of the box, and has cut down the amount of work we’ve had to do on the server side.)

    I did take a good look at Talis’ API, which has the necessary CRUD capabilities, and was very interested in it. I still think it’s a great offering (the support for change sets instead of just bulk updates is potentially very useful). However, we went for Atom + eXist for two main reasons .. (1) Atom is a standard, so we had a vague hope that if eXist didn’t work out we could swap to a different implementation, and (2) we’re doing a lot of coding for the client-side, and there’s better support for working with XML there (I just couldn’t bring myself to write an rdf api for gwt then implement a gwt client for Talis’ API which involves XML and RDF/XML and reification).

    The main questions we’ve had to figure out with Atom are all to do with what best practice should be when extending Atom to convey a particular type of data entity. We use link elements to relate one entry to another, but what should we use for the rel attribute values to represent different types of relationship? Should we be using URIs? Where should we put the foreign markup that represents our data, directly in the atom:entry element, or inside an atom:content element with type application/xml? And what do you do when a client wants to pull down not just a single entry, but a graph of entries? Is it OK to include the related entries inline within the link elements?

    The other challenge is how to implement query functionality over the data. I would love to use SPARQL, especially as the result set serialisation formats are very easy to work with in the browser. However, right now we’re getting more mileage from writing XQuery scripts that implement simple HTTP query APIs.

    If someone designed a CRUD API for managing RDF graphs that was basically Atom, that was very convenient to use from browser code, and with an implementation that worked out of the box, things would get very interesting :)

    Monday, November 16, 2009 at 4:44 am | Permalink
  2. Sorry, I’m Alistair Miles, should have signed the previous comment – first time I’ve used an OpenID.

    Monday, November 16, 2009 at 4:45 am | Permalink

One Trackback/Pingback

  1. [...] skos as atom [...]

Post a Comment

You must be logged in to post a comment.