Closed spetrac closed 3 years ago
The provided factory is used to create any terms that come out of the library. But internally, it's possible that some terms created with another factory are used. I think if you follow the RDF/JS spec, these terms should be compatible.
I am using a custom factory implementation and I thought, if I can supply the factory as an argument, it would be used throughout the module. The factory uses the standard rdf/js specified interface, but it only supports elements created by itself! That is the reason that my implementation throws an error, because clownface tries to use its own created nodes to access my datasets:
The error is thrown, because the method only accepts its own NamedNodes and no arbitrary objects. That is exactly the behaviour I want and I am sad, that I cannot use this magnificient shacl module, because it does not create NamedNodes with the supplied factory :(
I consider this a bug and if it will not get fixed, my only option is to write a shacl validator myself!
(using version 0.2.6 of rdf-validate-shacl)