djpowell.net

The Web, RDF, and other stuff

Atom/RDF

A vocubulary, and a set of processes for representing Atom in RDF


RDFS XSLT ZIP

This is the project page of Atom/RDF — this page will hold a summary of the current state of the project, and I will make posts to my blog as changes happen.

2008-03-09: This documentation on this page is currently out of date with respect to the actual linked transform. The current version on this page, no longer supports RSS as it has been refactored to be a GRDDL implementation for Atom. Hopefully the RSS transform will be added back as a separate transform later. Also note that the URI resolver now supports the case where the base-URI is unknown, or is relative - in which case it will output relative refs that should be resolved against the source document base. This is consistent with GRDDL use.

The transform is pretty stable now, but I expect that there will be some minor changes once I've had more experience at implementing it in applications.

Atom/RDF is a mapping between Atom Syntax and RDF/XML, implemented in XSLT. I first published it in January 2005, before Atom was published as an RFC, and I have been updating it several times since.

The goal of Atom/RDF is to produce a semantic representation of Atom, that is round-trippable to Atom Syntax and back, with full support for Atom extensions.

Features

  • In addition to Atom 1.0, the transform additionally supports RSS 0.91, RSS 2.0, RSS 1.0, and Atom 0.3, and maps them all to a common Atom/RDF model.
  • Both Simple Extension constructs and Structured Extension constructs are fully supported.
  • URI references are resolved using xml:base by the transform. For Text constucts, content elements, and Structured Extension constructs, the Base URI context is preserved; for links etc, the resolved URI is stored in the model.
  • xml:lang is preserved for language sensitive constructs.
  • Inheritance of author and rights is resolved by the transform, and these properties are stated explicitly in the model.
  • Handling of temporal aspects of the model, without creating triple mush.
  • The RDFS schema contains enough OWL properties to make it dual RDFS & OWL/Lite.

Coming soon...

Some design documentation, giving rationale for various decisions.

I really want to document the process of converting Atom Syntax to Atom RDF, and specifically to document the pre-conditions and post-conditions of the process, so that anyone can implement the process in Java or whatever, and get the same results as via the XSLT.

I have implemented an Atom store in Java using the XSLT and Jena. When it comes to actually using the transform for an application like this, there are some other necessary processes for managing how feeds and entries change over time, and pruning old data without relying on contexts. I will try to document these processes at some point.

I have some UML diagrams somewhere, that I'll try to put up.

Online Examples

The easiest way to test the transform is by using the W3C's XSLT service.

Feed URI:

Feed Atom Syntax Atom/RDF
djpowell.net XML
Sam Ruby's feed XML
AtomPub feed XML
Graham Park's feed XML
Tim Bray's feed XML
An test feed to test defaulting of authors etc. XML
Another test with some unusual constructs XML

Download

You can download everything as a zip file here: atom2rdf.zip, alternatively some of the individual files are linked below:

RDFS schema: http://djpowell.net/schemas/atomrdf/0.3/. [browse the schema]

XSLT transform: http://djpowell.net/atomrdf/0.1/files/atom2rdf-16.xsl.

Note that this transform imports serveral other files, some of the interesting ones are:

baselangutils.xsl and urires.xsl — perform xml:base and xml:lang resolution, including resolving relative URI references.

A test suite for the URI resolver, implemented in XSLT. You can run it in your browser.

News

2006-08-09 — Made a fix to categoryScheme, and fixed link to .zip file.

2006-03-15 — Changed extension handling. No changes were needed to work with RFC4287 btw.

2005-07-26 — Updated for draft-10.

2005-04-06 — Updated to draft-07.

2005-03-21 — Updated to draft-06.

Usage

The easiest way to test the transform is by using the W3C's XSLT service. Enter the URI of the XSL file <http://djpowell.net/atomrdf/0.1/files/atom2rdf-16.xsl>, and the URI of an Atom or RSS file.


[Email a comment]

[Latest] [Archive by Date] [Archive by Category] [Atom Feed]

Last updated: 9th March 6:31 PM (+0000)