Re: [xdi] RDF -> XDI

From
Erummond Qeed
Date
2009-10-20T13:10:04+00:00
ID
Thread
Re: [xdi] RDF -> XDI
Markus, this is cool in the extreme. Examples like this go miles to explaining the topic of how XDI relates to RDF!

I am working on a slight update to the XDI RDF Model doc (this will be v13) to post this week so we can use it to discuss $ and $$ on this week's telecon.

=Drummond 

On Tue, Oct 20, 2009 at 4:57 AM, Markus Sabadello <> wrote:

Hi XDI TC,

I have built a small new feature into the "XDI Converter" application:
https://graceland.azigo.net/xdi-converter/XDIConverter

It is now possible to use "RDF" as an input format. This is very basic, and not everything is supported. Don't expect blank nodes or certain fancy RDF features to work properly (yet).
Azigo/Higgins needs this for an XDI-based application.

Here's a super quick RDF example:

<?xml version="1.0"?>

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:cd="http://www.recshop.fake/cd#">
<rdf:Description
rdf:about="http://www.recshop.fake/cd/EmpireBurlesque">

  <cd:artist>Bob Dylan</cd:artist>
  <cd:country>USA</cd:country>
  <cd:company>Columbia</cd:company>
  <cd:price>10.90</cd:price>
  <cd:year>1985</cd:year>

</rdf:Description>
<rdf:Description
rdf:about="http://www.recshop.fake/cd/HideYourHeart">
  <cd:artist>Bonnie Tyler</cd:artist>

  <cd:country>UK</cd:country>
  <cd:company>CBS Records</cd:company>
  <cd:price>9.90</cd:price>
  <cd:year>1988</cd:year>
</rdf:Description>
</rdf:RDF>

And here's the same data converted to the X3 Simple format:

=(http://www.recshop.fake/cd/EmpireBurlesque)
    +(http://www.recshop.fake/cd#year)

        "1985"
    +(http://www.recshop.fake/cd#price)
        "10.90"
    +(http://www.recshop.fake/cd#company)

        "Columbia"
    +(http://www.recshop.fake/cd#country)
        "USA"
    +(http://www.recshop.fake/cd#artist)

        "Bob Dylan"
=(http://www.recshop.fake/cd/HideYourHeart)
    +(http://www.recshop.fake/cd#year)

        "1988"
    +(http://www.recshop.fake/cd#price)
        "9.90"
    +(http://www.recshop.fake/cd#company)

        "CBS Records"
    +(http://www.recshop.fake/cd#country)
        "UK"
    +(http://www.recshop.fake/cd#artist)

        "Bonnie Tyler"

A smarter converter would of course also convert RDF property URIs to XRIs from an XDI dictionary (e.g. +country, +artist, etc.), but as I said, it's very basic right now.

Markus