Thu 16 Jun 2005

Nearly there

* (sparql :select :distinct t 
:vars '(name mbox)
:from "http://www.holygoat.co.uk/foaf.rdf"
:where '(graph-pattern
(triple x !foaf:knows !rich:RichardNewman)
(triple x !foaf:name name)
(triple x !foaf:mbox_sha1sum mbox)))

<?xml version="1.0"?>
<sparql xmlns="http://www.w3.org/2001/sw/
DataAccess/rf1/result2">
<head>
<variable name="NAME" />
<variable name="MBOX" />
</head>
<results>
<result>
<result>
<binding name="NAME">
<literal>Timothy Putnam</literal>
</binding>
<binding name="MBOX">
<literal> ✂ </literal>
</binding>
</result>
<result>
<binding name="NAME">
<literal>Matthew Fowler</literal>
</binding>
<binding name="MBOX">
<literal> ✂ </literal>
</binding>
</result>
Well, I'm pleased, anyway! Basic queries (no optionals, union, &c. yet), SPARQL XML result format output, remote fetching, s-expression syntax that should be easy to generate from the SQL-like syntax, fully-commented code, and even untested implementations of ASK, DESCRIBE, and CONSTRUCT. Two days' work, and 450 lines. When I'm done I'll throw an Araneida frontend on, et voila: a SPARQL endpoint for Lisp.

This post might not look perfect in NetNewsWire. Indeed, thanks to pre's lack of wrapping (and thus my hard-wrapping) it probably won't look any good anywhere. Sue me.

Posted at 2005-06-16 10:50:46 by RichardLink to Nearly there
Comments, trackbacks.

Little boxes, all the same

A nice little poem about what we do, via ziggy.

Posted at 2005-06-16 02:45:38 by RichardLink to Little boxes, all …
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: