- From: Andy Seaborne <andy@apache.org>
- Date: Wed, 11 Mar 2026 11:38:00 +0000
- To: "public-rdf-star-wg@w3.org" <public-rdf-star-wg@w3.org>
On 10/03/2026 14:46, Franconi Enrico wrote:
> Hi,
> knowing very little about SHACL, I can’t understand the example 59
> <https://www.w3.org/TR/shacl12-core/#example-59> about sh:reifierShape.
> and how/why the shape constrains the example data graph.
> Can you explain this to us SHACL-less people? 😊
> cheers
> —e.
Good question.
The example is wrong and there is a PR to fix it.
IMO This is a reading of a corrected form.
-----
Data:
ex:Bob
rdf:type ex:Person ;
ex:age 23 {|
ex:date "2019-12-05"^^xsd:date .
ex:author ex:Claire
|}.
Shapes:
First find a starting point (described by "targets") then walk the graph
using property shapes and sh:path.
ex:PersonShape
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property ex:PersonShape-age ;
.
Validation starts at nodes with a class of ex:Person (ex:Bob in the
data) and then validates with ex:PersonShape-age.
ex:PersonShape-age
a sh:PropertyShape ;
sh:path ex:age ;
sh:datatype xsd:integer ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:reifierShape ex:ProvenanceShape ;
sh:reificationRequired true ;
.
There are 4 constraints
1. The object of ex:age must be an xsd:integer.
2&3. The node ex:Bob must have ex:age property
4. There must a reifer.
I think that means an rdf:reifies property, subject ?reifier
and object the triple term for the current triple
Then ?reifier validates with ex:ProvenanceShape
For (4):
Reifier: https://www.w3.org/TR/rdf12-concepts/#dfn-reifier
so there must be one or more triples:
?reifier rdf:reifer <<( ex:Bob ex:age 23 )>> .
then validate each ?reifier with ex:ProvenanceShape
ex:ProvenanceShape
a sh:NodeShape ;
sh:property ex:ProvenanceShape-date ;
sh:property ex:ProvenanceShape-author ;
.
Validate with two property shapes
ex:ProvenanceShape-date
a sh:PropertyShape ;
sh:path ex:date ;
sh:datatype xsd:date ;
sh:minCount 1 ;
sh:maxCount 1 ;
.
There are 3 constraints for property ex:date:
1. sh:datatype xsd:date ;
2&3: sh:minCount and sh:maxCount 1
?reifier must have exactly one property property ex:date,
and that triple must have object xsd:date.
ex:ProvenanceShape-author
a sh:PropertyShape ;
sh:path ex:author ;
sh:nodeKind sh:IRI ;
sh:minCount 1 ;
sh:maxCount 1 ;
.
?reifier must have exactly one property, ex:author,
and that triple must have object which is an IRI.
Received on Wednesday, 11 March 2026 11:38:21 UTC