W3C home > Mailing lists > Public > www-archive@w3.org > October 2001

Python RDF API

From: Sean B. Palmer <sean@mysterylights.com>
Date: Sat, 20 Oct 2001 04:44:12 +0100
Message-ID: <061201c15919$995f5220$7ce793c3@y0r1d9>
To: "Aaron Swartz" <aswartz@swartzfam.com>
Cc: <www-archive@w3.org>
Cool API. A few points:-

   return 'data:' + urllib.quote(`value`)

that should be 'data:,': don't forget the comma. I'm still not sure how it
manages to decode the literal back into a u'' literal, seeing as how there
is no reverse function.

Can we have a few more "useful namespaces" defined, please?

This bit's funny:-

   if type(value) is type(u''):               # It's a Literal!
      value = literalToURI(value)            # Convert it to a URI

Great, but... er... what about bNodes? How on earth does one add a bNode to
the store? Also, have you considered that if you feed in:-

     _:x _:y _:z .

and have internally "(x, y, z)", if you feed in the same document again,
you have to add different bNode labels into the store. So you end up with
something like "(x, y, z), (x1, y1, z1)". I presume that you'll be wanting
to convert bNodes into URIs too? The urn-anon scheme to the rescue! If you
find that a good way to do it, I will register it.

   """An RDF triple, the basic unit of association."""

I know, I know: it's an RDF 1.0 API. But is there any chance of a Quad
class too?


Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Friday, 19 October 2001 23:45:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:42:02 UTC