shacl-engine
Version:
A fast RDF/JS SHACL engine
71 lines (63 loc) • 2.16 kB
text/turtle
@prefix ex: <http://example.org/>.
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix shn: <https://schemas.link/shacl-next#>.
@prefix sht: <http://www.w3.org/ns/shacl-test#>.
<> a mf:Manifest;
mf:entries (<multi-node>).
ex:OtherShape a sh:NodeShape;
sh:property [
sh:path ex:otherProperty
].
ex:RootShape a sh:NodeShape;
sh:node
ex:OtherShape,
ex:SomeShape;
sh:targetNode ex:ValidInstance1.
ex:SomeShape a sh:NodeShape;
sh:property [
sh:path ex:someProperty
].
ex:ValidInstance1
ex:otherProperty 4;
ex:someProperty 3.
<multi-node> a sht:Validate;
rdfs:label "Test multiple sh:node triples";
mf:action [
sht:dataGraph <>;
sht:shapesGraph <>
];
mf:result [ a sh:ValidationReport;
sh:conforms true;
sh:result [ a sh:ValidationResult;
sh:detail [ a sh:ValidationResult;
sh:focusNode ex:ValidInstance1;
sh:resultPath ex:someProperty;
sh:resultSeverity shn:Trace;
sh:sourceConstraintComponent shn:TraversalConstraintComponent;
sh:sourceShape [];
sh:value 3
];
sh:focusNode ex:ValidInstance1;
sh:resultSeverity shn:Debug;
sh:sourceConstraintComponent sh:NodeConstraintComponent;
sh:sourceShape ex:RootShape;
sh:value ex:ValidInstance1
], [ a sh:ValidationResult;
sh:detail [ a sh:ValidationResult;
sh:focusNode ex:ValidInstance1;
sh:resultPath ex:otherProperty;
sh:resultSeverity shn:Trace;
sh:sourceConstraintComponent shn:TraversalConstraintComponent;
sh:sourceShape [];
sh:value 4
];
sh:focusNode ex:ValidInstance1;
sh:resultSeverity shn:Debug;
sh:sourceConstraintComponent sh:NodeConstraintComponent;
sh:sourceShape ex:RootShape;
sh:value ex:ValidInstance1
]
].