rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Can't store N3 triple with subject formula because of incompatible isSubject

Open RubenVerborgh opened this issue 3 years ago • 1 comments

The document at https://drive.verborgh.org/tmp/2022/cha-58-direct.n3 causes problems when read/written in a Solid Pod via Mashlib, with the following error:

Outline.expand: Unable to fetch <https://drive.verborgh.org/tmp/2022/cha-58-direct.n3>: Failed to load  <https://drive.verborgh.org/tmp/2022/cha-58-direct.n3> Fetcher: Error trying to parse <https://drive.verborgh.org/tmp/2022/cha-58-direct.n3> as Notation3:
Error: Subject is not a subject type status: 200

The Subject is not a subject is thrown by src/store.ts, which uses an isSubject call that checks for NamedNodeTermType/VariableTermType/BlankNodeTermType.

So either rdflib needs to be adjusted to output RDF/JS-compatible Notation3 subjects (which is what N3.js does), or the isSubject check needs to be adjusted when working with Notation3.

RubenVerborgh avatar Aug 09 '22 21:08 RubenVerborgh

So either rdflib needs to be adjusted to output RDF/JS-compatible Notation3 subjects (which is what N3.js does), or the isSubject check needs to be adjusted when working with Notation3.

@timbl Can you help with this I don't understand what is missing in isSubject call

bourgeoa avatar Aug 25 '22 15:08 bourgeoa