Closed NSeydoux closed 4 years ago
This error is caused by a conflict between blank node IDs. The proper way to solve this would be to use the same data factory throughout the whole process:
const { DataFactory } = require('n3');
const parser = new Parser({ factory: DataFactory }); // <- factory option
const data = parser.parse(ttlData);
const shapes = parser.parse(ttlShape);
const validator = new SHACLValidator(shapes, { factory: DataFactory }) // <- factory option
const report = await validator.validate(data)
But because of an issue in N3.js, it won't solve your problem just yet. I'm working on it ⏳
Thanks ! Does this mean that the issue would disappear altogether if the shape did not include blank nodes at all ?
It should, yes :)
Upgrading N3.js to 1.3.6 should fix your issue :)
When trying to validate a closed shape (i.e. with
sh:closed true
), the following error is thrown:To reproduce
Run the following code snippet:
The
rdf-validate-shacl
version is0.1.1
.