Clientside javascript rdf-calendar example: rough notes

Some experiments from a while ago...

http://ilrt.org/discovery/rdf-dev/rudolf/js-rdf/

This is far from baked, but I wanted to circulate the URL anyway. About a
year ago, Dan Connolly and I were hacking about with Jan Grant's
Javascript Prolog engine. Dan wrote some XSLT that extracted calendar data
from an XHTML page, and some rules for manipulating it in Prolog. This was
a stab at a testbed in client-side Javascript, using Jan's stuff. Since
then Jan's code (see http://ioctl.org/logic/) has acquired the ability to
do a few more things, such as call-out to math functions in Javascript.

In a nutshell: clientside javascript rdf queries against calendar data
extracted from XHTML via XSLT transformations.

The javascript example above is rather cluttered if you don't know what's
going on. It does too much at once. I tried hooking up a MinXML (XML
subsetted) .js parser to the logic code, while also demonstrating DanC's
examples. It's a year old and I hope to revisit it as part of this
calendaring effort.

Another ingredient, it uses a _horrible_ flavour of bastardised Prolog. We
should probably use N3 or Jan's (alpha) RDF parser in Javascript.
The example system requires you to parser RDF via a web service (sorry Web
Service) which takes the URI of RDF/XML and returns icky Prolog triples.

eg:  http://snowball.ilrt.bris.ac.uk/cgi-bin/rdf-dot/xrdf2tinyprolog?URI=http://www.w3.org/XML/2000/04soccer-sched/team-2.rdf
(in this case, the RDF it fetches is stuff DanC extracted from XHTML via XSLT)

Jan's .js parser arrived more recently. See http://ioctl.org/rdf/ ->
http://ioctl.org/rdf/jsrdf/ though I've not tested it on these examples
yet. [time passes] It failed with some of the test data, but is a cool
hack regardless. http://www.w3.org/XML/2000/04soccer-sched/team-2.rdf
parsed just fine. Only problem being that my server-side Parser service
generates:

triple({http://www.w3.org/1999/02/22-rdf-syntax-ns#type},{http://www.w3.org/XML/2000/04soccer-sched/team-2.rdf#genid5},{foo:not-assigned-yetTime}).
ie. p/s/o whereas jan's parser outputs triples in s/p/o:
triple({anon:6}, {http://www.w3.org/1999/02/22-rdf-syntax-ns#type},  {foo:no t-assigned-yetEvent}).

Anyway just wanted to send a quick pointer to this in its current form.
Maybe it'll come back to life...

Dan

Received on Thursday, 12 April 2001 13:52:09 UTC