Atom-and-RDF Samples

This is an experiment in making an RDF file that is also Atom 1.0 compatible. See atom.rnc relax-ng schema for Atom, and Tim Bray's announcement for links to spec.

The idea is to explore a class of XML documents that exploit complementary features of the RDF and Atom XML syntaxes, such that instances are both legal Atom and legal RDF/XML at the same time. They'll probably be slightly quirky from both perspectives, but that's what compromise is all about!

RDF allows rdf:RDF to be omitted, if RDFness is clear from other contexts. Atom allows "foreign markup" from extension namespaces to be mixed in at various points (though we can't add elements that separate 'author' from 'name', or 'entry' from 'title' - hence the rdf:parseType used here instead. Atom doesn't like rdf:RDF foreign markup to appear at top level (a2.xml doesn't validate as Atom), so we'd probably need to use the media type to indicate to RDF that rdf:RDF is ommitted, ie. use application/rdf+xml. Is that tolerable from an Atom perspective? The spec says that Atom documents are "identified with the "application/atom+xml" media type."; but I don't see a MUST there...

The RDF validator seems happy with the a1.xml sample RDF/Atom hybrid. It gripes about unprefixed attributes, but that's bearable. Remember to check the 'RDF is NOT enclosed in <RDF>...</RDF>' option.

I'll add some more test files here; they may or may not be valid RDF or Atom. The 'good' ones should be worth exploring in an RDF/XHTML2 context, ie. using the new RDF/A notation for RDF.


To test this with Jing, I've used...

#!/bin/sh
SAMPLES=$HOME/cvs/www.w3.org/WWW/2001/sw/BestPractices/HTML/samples/atom/
JING='java -jar jing-20030619/bin/jing.jar'
$JING -c atom.rnc  $SAMPLES/a1.xml

Previous discussion: AtomAsRDF, and Atom is RDF thread, where I make point (which I still hold to) that syntax-level similarity isn't itself enough to 'prove' that RDF structures can be inferred from Atom syntax. My current thinking: some but not all Atom 1.0 docs will be valid RDF/XML documents, and the intent for them to be treatable as such might be indicated by publishing them as application/rdf+xml.

diagram of an atom-and-rdf graph


$Id: notes.html,v 1.7 2005/07/15 19:47:37 danbri Exp $ danbri