-
Notifications
You must be signed in to change notification settings - Fork 18
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
Can't use local object to be validated #60
Comments
ShEx.Loader.load is a convenience function to load schema and data remotely. If you've already got the data loaded, you should be able to just let theGraph = someTriplifier(dataObject); # turn the dataObject into triples
ShEx.Loader.load([validationShape], [], [], []).then(function (loaded) {
var db = ShEx.Util.makeN3DB(theGraph);
var validator = ShEx.Validator.construct(loaded.schema, { results: "api" });
var result = validator.validate(db, [{node: dataID, shape: shapeURL}]);
return result;
}).catch(e => console.error(e)); If course the magic is in that |
Thanks for the informations and sorry for the late reply.
Is it a N3 version problem? |
I obviously dropped the ball on this issue, but A. yeah, it looked like a version issue and B. shex.js now uses a 1.0.x N3.js |
I didn't manage to use a local object to be validated. This works:
But this throw an error:
Throw
TypeError: Cannot use 'in' operator to search for 'productions' in undefined
Here is dataObject:
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: