W3C home > Mailing lists > Public > public-cwm-talk@w3.org > January to March 2005

data, an RDF syntax born of jetlag and nxml-mode

From: Dan Connolly <connolly@w3.org>
Date: Wed, 19 Jan 2005 13:30:42 +0200
Message-Id: <8D710417-6A0D-11D9-A29A-000D9338C596@w3.org>
To: public-cwm-talk@w3.org

I can't recall the exact train of thought, but at some point, my 
jet-lagged thoughts around an XML syntax that mirrors N3 became 
sufficiently lucent that I felt compelled to code them up. So I took 
the examples from the N3 primer
     http://www.w3.org/2000/10/swap/Primer.html

and rendered them in this syntax, along with some bits of my foaf 
file...

   http://www.w3.org/2005/01/dx/fml.xml

For example
<#pat> <#child>  <#al>, <#chaz>, <#mo> ;
        <#age>    24 ;
        <#eyecolor> "blue" .

becomes...

  <thing ref="#pat">
   <rel ref="#child">
     <thing ref="#al"/>
     <thing ref="#chaz"/>
     <thing ref="#mo"/>
   </rel>
   <rel ref="#age"><val int="24"/></rel>
   <rel ref="#eyecolor"><str>blue</str></rel>
  </thing>

The motivation had something to do with rules, I think, though I never
got beyond the turtle part of N3... and appealing more to XML 
traditions.

and I wrote a relax-ng schema for it:
   http://www.w3.org/2005/01/dx/data.rnc

just 51 lines. Fun!

and an XSLT transformation to standard RDF/XML stuff
   http://www.w3.org/2005/01/dx/grokData.xsl

which is straightforward but doesn't handle is/of.

Hmm... I published them in /2005/01/dx but I worked
on them in swap/util, and I haven't changed the namespace
from
   http://www.w3.org/2000/10/swap/util/data#

I intend to change the namespace and make it grddl-happy.
Beyond that... I'm not sure what made it so interesting
to me in the middle of the night... Enjoy.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 19 January 2005 11:30:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:11:01 GMT