-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsonld wrong handling of default graph #310
Comments
It seems the quoted lines are now in the add function in store.ts https://github.com/linkeddata/rdflib.js/blob/master/src/store.ts#L422 I also expected parse to use the base parameter as the graph name, but the current implementation of jsonldparser simply doesn't provide a graph name at all, which is why the default is used See comment on relevant commit: 16daad7#r41499395 |
In general, Store.add() should not be called with undefined or null |
I believe this is solved in 80e6b66. I mistakenly merged it into the jsonld branch directly. |
Looks good |
resolved #509 |
I am experimenting with the rdflib and the hydra jsonld API.
myTestcode.ts
If i am not mistaken, all nodes should belong to the default graph. If I parse a turtle document, rdflib uses the base-parameter of the parse function as the graph name. But if I parse the jsonld-document rdflib sets nodeobjects as the graph names. In a result I get a rdf dataset with two different graphs instead of one.
The line of code where the why (graphname) gets set is in indexed-formular.js lines 270-273:
Thus the serializing of docNode does only print 3 rdf-triples instead of 5.
If this behavior is not intended, I could write a fix. I think there must just be a check for the default graph be included in parser.js. If the default graph is detected, why will be set to base.
The text was updated successfully, but these errors were encountered: