These are chat archives for rdfjs/public

7th
May 2018
Adrian Gschwend
@ktk
May 07 09:15
@awwright that will be rdfjs based interface?
Austin Wright
@awwright
May 07 16:01
@ktk At this point it's an stream that accepts SAX events or DOM nodes and produces a stream of triples and other metadata
Austin Wright
@awwright
May 07 16:07
The triples themselves are instances from my own library https://github.com/awwright/node-rdf ; it's just an object with a prototype and subject/predicate/object properties
This message was deleted
Adrian Gschwend
@ktk
May 07 16:55
ok
Austin Wright
@awwright
May 07 17:24
When I use https://github.com/antoniogarrote/rdfstore-js to verify my parser against the tests, I get 110/177 pass
Austin Wright
@awwright
May 07 18:06
117/177 pass if I change the SPARQL to use uppercase function names since that package parses SPARQL case-sensitive, apparently
Adrian Gschwend
@ktk
May 07 20:31
wtf :)
Austin Wright
@awwright
May 07 23:28
Oh it gets better, the package doesn't support bnodes in SPARQL queries, so if I change _: to ?_ the passing tests go up to 124/177
And there's probably another dozen tests that use [] and () which also aren't supported and I don't know of an easy way to rewrite those except implement a full SPARQL parser, which is what I might end up doing (I've done it before: https://github.com/awwright/sparql-spin-js3 )
That was written at a time when Node.js package management wasn't a thing
124 is more than the Web version at rdfa.info seems to support, though; there, random queries fail even though the SPARQL query lines and my generated Turtle are almost exactly the same, except for whitespace