rdflib.js
rdflib.js copied to clipboard
Can't store N3 triple with subject formula because of incompatible isSubject
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.
So either rdflib needs to be adjusted to output RDF/JS-compatible Notation3 subjects (which is what N3.js does), or the
isSubjectcheck needs to be adjusted when working with Notation3.
@timbl Can you help with this I don't understand what is missing in isSubject call