- From: James Hudson <jameshudson3010@gmail.com>
- Date: Mon, 30 Mar 2020 07:59:59 -0400
- To: Public Shacl W3C <public-shacl@w3.org>
- Message-ID: <CAEUVO9HQ0Qm=yaDJ=uXcqR-CPJXm5n5XLvrZdGMG-Gt58Ef-Xw@mail.gmail.com>
Hello,
If this is not the appropriate forum for this question, please let me know.
I have a gist with all of the relevant files at:
https://gist.github.com/James-Hudson3010/65be952d586859da380d949e7b520320
If I execute:
$ pyshacl -a -f human employees.ttl
I get the following, correct validation report...
Validation Report
Conforms: False
Results (3):
Constraint Violation in MaxInclusiveConstraintComponent (
http://www.w3.org/ns/shacl#MaxInclusiveConstraintComponent):
Severity: sh:Violation
Source Shape: hr:jobGradeShape
Focus Node: d:e4
Value Node: Literal("8", datatype=xsd:integer)
Result Path: hr:jobGrade
Constraint Violation in DatatypeConstraintComponent (
http://www.w3.org/ns/shacl#DatatypeConstraintComponent):
Severity: sh:Violation
Source Shape: hr:jobGradeShape
Focus Node: d:e3
Value Node: Literal("3.14", datatype=xsd:decimal)
Result Path: hr:jobGrade
Constraint Violation in MinCountConstraintComponent (
http://www.w3.org/ns/shacl#MinCountConstraintComponent):
Severity: sh:Violation
Source Shape: hr:jobGradeShape
Focus Node: d:e2
Result Path: hr:jobGrade
However, if I split employees.ttl into three files containing the schema,
shape, and instance data and run:
pyshacl -s shape.ttl -e schema.ttl -a -f human instance.ttl
the result is:
Validation Report
Conforms: True
I assume I am calling pyshacl correctly.
If there are other tools similar to pySHACL that allow me to split the
shape, schema, and instance files, I would be interested in learning about
them. Or, is it a best practice to always put everything into a single file?
Regards,
James
Received on Monday, 30 March 2020 12:00:26 UTC