« Dear Java Programmer | Main | RDF: syntax refuted? »

The RDF.net challenge

The RDF.net Challenge
Tim Bray:

Eventually sometime in 2002 I ran out of patience and tried to figure out the simplest imaginable way to express (R,P,V) triples in XML, and came up with the unimaginatively-named RPV syntax. [...]

Here's how you say that in RPV:
<RPV xmlns="http://www.rdf.net/rpv/">
 <R id="Dave" pbase="http://www.example.com/terms/">
  <PV p="fullName">Dave Beckett</PV>
  <PV p="homePage" v="http://purl.org/net/dajobe" />
  </R>
 <R r="http://www.w3.org/TR/rdf-syntax-grammar">
  <PV p="http://www.example.com/terms/editor" v="#Dave" />
  <PV p="http://purl.org/dc/elements/1.1/title">
    RDF/XML Syntax Specification (Revised)
    </PV>
  </R>
 </RPV>
And here's how you say it in RDF/XML:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:ex="http://www.example.com/terms/">
  <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar"
                   dc:title="RDF/XML Syntax Specification (Revised)">
    <ex:editor>
      <rdf:Description ex:fullName="Dave Beckett">
        <ex:homePage rdf:resource="http://purl.org/net/dajobe/" />
      </rdf:Description>
    </ex:editor>
  </rdf:Description>
</rdf:RDF> 
What do think?

It's not enough?

Fwiw, I agree with everything Tom Bray says - but I don't see RPV as much of an improvement over RDF/XML, at least not enough to write handlers for it, or typing it into an editor, or getting excited about RDF again. I couldn't write RPV down properly either, so it failed that test miserably. RDF for humans seems to work best when you draw a picture of the graph you're after and later write it down as n-triples (more on n-triples below).

I joined the RDF working group after its new charter was announced in 2001. Last time I looked I was still down as a wg member, but I haven't been involved in over a year. I was excited because RDF was the future of the web dammit, it was a practical, bug-fixing charter and everyone seemed to know where the bugs were - the XML syntax, reification, literals, anonymous nodes, containers. But especially the syntax. As it turned out the vast majority of energy in the wg went into the formal aspects of RDF - exactly the bits most people don't want to care about - and to this day I don't understand how a Model Theoretic semantics squares with a bug-fixing charter. I do remember that the DARPA/DAML/OWL folks were mighty unhappy with the state of RDF theory - at one point it seemed possible that those efforts would tear away from RDF. Well that's mostly sorted out and today it seems to me the biggest remaining bug with RDF is that not enough people want to use it, especially those in web services, where they're stuck trying to make WSDL do things it isn't capable of.

The syntax subgroup did a good technical job of cleaning up the XML grammar, but it's not so much easier to work with than what was there before. If it was, I don't believe n-triples would ever have been invented. The n-triple was developed to allow the wg to write down test-cases. Which is a great idea: if I ever work on a standards group again, I will insist on test cases. On the other hand n-triples is as bad a case of not eating your dogfood as you are likely to see - a technical group mandating XML for public consumption, while using something totally different to get its job done speaks volumes about the state of the XML. To this day I feel very awkward about that scenario and I can remember asking whether we shouldn't make n-triples normative, but it's not like I pushed. So I suck for that.

Anyway, what Tim Bray said. I'm convinced that RDF is going to languish until the W3C commits to inventing a usable XML syntax for it.


May 25, 2003 10:48 AM

Comments

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/992