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

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 UTC