RDF Parser Updated

I’ve made a couple of changes to the Javascript RDF-Parser, this was to include Opera and Safari support, based on a patch provided Gorm H Eriksen via Chaals. And to fix a couple of bugs found by Ian Dickinson related to xmlbase and some leaking of global variables.

At the same time I’ve updated the very limited documentation and included the owl:sameAs code I wrote some time ago which never made it into a “released” version, also the rdf:datatype and xml:lang support hadn’t previously been mentioned, so that’s documented too now.

If anyone is using it, good luck, and please let me know of bugs, I’ll gladly fix them!

Comments

  1. Jim Says:

    Interesting. I think I subconciously based part of Swapi’s Graph query api on that. Since JavaScript supports first class functions, why don’t you add a listener-like API. That is:

    visitor = myData.visit(trip,subj,pred,obj,function(trip) { … });
    for(visitor.start(); visitor.isSearching(); visitor.search()) {};
    visitor.close();

    Sesame supports something like that. Another possibility is a matching function like:

    myData.match(trip, function(subj, pred, obj) { … return false; });

    Jena supports matching like that.