Who loves RDF/XML?

| 5 Comments

I wrote the following as a comment on Seth's latest post about RDF/XML syntax, but the blog engine asked me to add two unspecified numbers, and I had a great deal of difficulty doing that correctly. So instead, it will live here, and I'd love to learn answers to this question from Seth or anyone else who might have any answers. Quoting myself:

Hi Seth,

This is a completely serious question: Who are these people who are insisting on RDF/XML as the/a core of the semantic web? Where can I meet them? Or have I met them and not realized it? Or are they mostly straw-men, as part of me suspects?

Inquiring minds -- and SWEO members -- want to know.

thanks,
Lee

5 Comments

I do. ;)
I'm not insisting on RDF/XML, but I actually don't see the issue. OK, I don't really use XML tools, but the toolkits have a serialization option which can produce a predictable, XSLT-friendly RDF/XML variation for those who need it.
Generally,

  • creating RDF/XML from internal structures is as simple as creating any other serialization,
  • reading RDF/XML can easily be done with one of the various parsers, and
  • working with information shouldn't be done at the data level anyway
No?

Now that RDF/XML parsers are ubiquitous, I don't see what the problem is. I don't actually *look* at the XML serializations, I use OINK to look at my RDF, and most of the RDF I use is *generated* anyway, not hand-written.

Real problems are higher up in the proverbial "stack"...

Hi!

I like having RDF/XML around. When I handwrite (I often do), I use (the) Turtle (subset of N3) 90% of the time. But if I were to write a chunk with say lots of XHTML fragment literals, I'd go for RDF/XML. Or XHTML+GRDDL, or RDF/A in XHTML2.. but the first may work better in many cases. And AFAIK, GRDDL is what makes microformats go all namespacey and tripled, using RDF/XML as the medium.

I don't think RDF/XML fits well in documentation examples though - Turtle is far better there. In real (machine) world data creation/communication, I'd guess parsing RDF/XML may be easier if you prefer SAX to EBNF (what with the lex and the yacc, or loads of regexps). Regardless of serialization format, it should be fed to RDF-aware programs. Using XSLT and/or XPath on RDF/XML is rarely - if ever - sensible. I see RDF/XML as an "end format", it makes little sense to transform that (same goes for stuff like SVG I guess). For special (throwaway) cases with deterministic serialization though, it may be practical.

I think Turtle and RDF/XML are complimentary, kinda like choosing either JSON or -uhm- "some simple, sensible XML format" (maybe Atom) when building integrated client/server apps. That is I'd use the plaintext-like stuff up until I either need to go all XMLy in the literals, or must "talk to strangers".

(One thing I do owe RDF/XML is how clearly it made me see the distinction between "data records" and "documents" (with their chimeric infosets) in XML-land.)

To respond to the question though: I'm not sure. The *core* would be the RDF the Model. I think RDF/XML works well as a corner stone in the bottom (syntax) stack though. Without it I'd miss something - perhaps like I'd miss an old, gnarled network cable if my WLAN went haywire..

Hi Benjamin, Ora, Niklas:

I really couldn't agree more with all three of you. My comment to Seth was really a gut reaction to this part of his entry:

"""
“But I love XML! I want RDF/XML!” you cry! To which I reply, Good luck trying to use RDF/XML serialization with your favorite XML tools. XSLT? Forget it. XQuery? Not on your life.
"""

...which admittedly itself was a bit tongue in cheek. I was just a bit curious whether there were RDF/XML devotees out there *at the expense of* other serializations such as Turtle.

As Niklas hinted at, I think it's a great thing that RDF has so many serializations, and that the major toolkits support most of them. It *is* all about the model, and when we or our servile software needs to write down that model, it's nice to be able to choose the easiest way to serialize RDF.

Lee

Indeed, I think we used to say "It's the Model, stupid"... :-)

Anyway, I originally fought hard to make the RDF syntax *not* use XML, because it seemed obvious that most XML tools were not going to be terribly helpful. But now, with XSLT & GRDDL, I am glad we picked XML. This only re-emphasizes my earlier point that much of the serialized RDF is generated, not hand-written.