-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: using property shapes in logical constraints
- Loading branch information
Showing
7 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"rdf-validate-shacl": patch | ||
--- | ||
|
||
Gracefully handle Property Shapes used inside logical constraints (fixes #140) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
PREFIX schema: <http://schema.org/> | ||
@prefix dash: <http://datashapes.org/dash#> . | ||
@prefix ex: <http://datashapes.org/sh/tests/core/property/uniqueLang-001.test#> . | ||
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@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 sht: <http://www.w3.org/ns/shacl-test#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
<> | ||
rdf:type mf:Manifest ; | ||
mf:entries | ||
( | ||
<and-minCount> | ||
) ; | ||
. | ||
<and-minCount> | ||
rdf:type sht:Validate ; | ||
rdfs:label "Test of unexpected validation error as reported in issue zazuko/rdf-validate-shacl#140" ; | ||
mf:action | ||
[ | ||
sht:dataGraph <> ; | ||
sht:shapesGraph <> ; | ||
] ; | ||
mf:result | ||
[ | ||
rdf:type sh:ValidationReport ; | ||
sh:conforms "false"^^xsd:boolean ; | ||
sh:result | ||
|
||
[ | ||
rdf:type sh:ValidationResult ; | ||
sh:focusNode ex:Instance ; | ||
sh:resultPath schema:age ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:AndConstraintComponent ; | ||
sh:sourceShape ex:age ; | ||
sh:value 18 ; | ||
], | ||
[ | ||
rdf:type sh:ValidationResult ; | ||
sh:focusNode ex:Instance ; | ||
sh:resultPath schema:name ; | ||
sh:resultSeverity sh:Violation ; | ||
sh:sourceConstraintComponent sh:AndConstraintComponent ; | ||
sh:sourceShape ex:name ; | ||
sh:value "John" ; | ||
] ; | ||
] ; | ||
mf:status sht:proposed ; | ||
. | ||
ex:Instance | ||
schema:age 18 ; | ||
schema:name "John" ; | ||
a schema:Person ; | ||
. | ||
ex:PersonAddressShape | ||
a sh:NodeShape ; | ||
sh:targetClass schema:Person ; | ||
sh:property ex:name, ex:age . | ||
|
||
ex:ps1 a sh:PropertyShape ; | ||
sh:minCount 2 ; | ||
. | ||
|
||
ex:name a sh:PropertyShape ; | ||
sh:path schema:name ; | ||
sh:and ( ex:ps1 ) ; | ||
. | ||
|
||
ex:age a sh:PropertyShape ; | ||
sh:path schema:age ; | ||
sh:and ( ex:ps1 ) ; | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters