From bc0f2624333c150f37bc22d419cc8bca70bda4dd Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Tue, 29 Jul 2025 13:37:23 +0300 Subject: [PATCH 1/6] #185: Added subClassOfInShapesGraph parameter --- shacl12-core/index.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 6aeb016e..e38fcb81 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -571,6 +571,9 @@

Terminology

The SHACL types of an RDF term in an RDF graph is the set of its values for rdf:type in the graph as well as the SHACL superclasses of these values in the graph. + Note that some SHACL implementations can be parameterized so that the rdfs:subClassOf triples + that determine the SHACL subclasses may be queried from the shapes graph instead of the data graph. + See .
@@ -1530,6 +1533,11 @@

Class-based Targets (sh:targetClass)

+

+ Note that the rdfs:subClassOf triples may be queried from the shapes graph, + see , in which case the rdfs:subClassOf triple + from the example above would not be required in the data graph. +

@@ -2702,6 +2710,27 @@

Data Graph

several related ontologies, pass all of them to the SHACL processor (together or one by one), do not rely on owl:imports links.

+ +
+

Graph for rdfs:subClassOf Triples

+

+ Some features of SHACL (such as + , + and + ) rely on the notion + of SHACL type to determine whether a node is a SHACL instance of a given class. + By default, this is determined by looking up rdfs:subClassOf and rdf:type triples + in the data graph. + However, in some cases this is impractical as rdfs:subClassOf triples are often stored as part + of the class/shape definitions and not the instance data. +

+

+ SHACL processors SHOULD offer a parameter subClassOfInShapesGraph that, if set to true + should alter the definition of SHACL Type so that the rdfs:subClassOf triples are queried + from the shapes graph instead of the data graph. + The rdf:type triples are always expected in the data graph. +

+

Linking to shapes graphs (sh:shapesGraph)

@@ -7923,6 +7952,7 @@

Changes between SHACL 1.0 Core and SHACL 1.2 Core

  • Added the new constraint component sh:nodeByExpression, see Issue 408
  • Added the new value sh:ByTypes for sh:closed; see Issue 172
  • The values of sh:class and sh:datatype can now also be lists, indicating a union of choices; see Issue 160
  • +
  • Added parameter to look up rdfs:subClassOf triples in the shapes graph instead of data graph; see Issue 185
  • From 93a74674ef724b005f78714aee9b5d800f68e6b2 Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Mon, 4 Aug 2025 16:50:41 +0300 Subject: [PATCH 2/6] Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr --- shacl12-core/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 47c6f135..10d570a4 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -1549,9 +1549,9 @@

    Class-based Targets (sh:targetClass)

    - Note that the rdfs:subClassOf triples may be queried from the shapes graph, - see , in which case the rdfs:subClassOf triple - from the example above would not be required in the data graph. + Note that the rdfs:subClassOf triples may be queried from the shapes graph + (see ) in which case the rdfs:subClassOf triple + from the example above would not be required to be in the data graph.

    @@ -2731,19 +2731,19 @@

    Graph for rdfs:subClassOf Triples

    Some features of SHACL (such as , - and + , and ) rely on the notion of SHACL type to determine whether a node is a SHACL instance of a given class. By default, this is determined by looking up rdfs:subClassOf and rdf:type triples in the data graph. - However, in some cases this is impractical as rdfs:subClassOf triples are often stored as part - of the class/shape definitions and not the instance data. + However, this is impractical in some cases, as rdfs:subClassOf triples are often stored as part + of the class and/or shape definitions and not the instance data.

    - SHACL processors SHOULD offer a parameter subClassOfInShapesGraph that, if set to true + SHACL processors SHOULD offer a parameter subClassOfInShapesGraph that, if set to true, should alter the definition of SHACL Type so that the rdfs:subClassOf triples are queried from the shapes graph instead of the data graph. - The rdf:type triples are always expected in the data graph. + The rdf:type triples are always expected to be in the data graph.

    From d6e6989ee8b2405789cec0d64ae7fb93b087b3b8 Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Mon, 4 Aug 2025 17:53:26 +0300 Subject: [PATCH 3/6] Update shacl12-core/index.html Co-authored-by: Jesse Wright <63333554+jeswr@users.noreply.github.com> --- shacl12-core/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 10d570a4..df0171cf 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2742,7 +2742,7 @@

    Graph for rdfs:subClassOf Triples

    SHACL processors SHOULD offer a parameter subClassOfInShapesGraph that, if set to true, should alter the definition of SHACL Type so that the rdfs:subClassOf triples are queried - from the shapes graph instead of the data graph. + from the shapes graph in addition to the data graph. The rdf:type triples are always expected to be in the data graph.

    From 330abac1bc3b9d89cd54345854e8ce8ce6afdc8a Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Mon, 4 Aug 2025 17:56:03 +0300 Subject: [PATCH 4/6] Updated change entry to new contract --- shacl12-core/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index df0171cf..9e32eaa1 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -7969,7 +7969,7 @@

    Changes between SHACL 1.0 Core and SHACL 1.2 Core

  • Added the new value sh:ByTypes for sh:closed; see Issue 172
  • The values of sh:class and sh:datatype can now also be lists, indicating a union of choices; see Issue 160
  • Added the new constraint component sh:ReifierShape; see Issue 300
  • -
  • Added parameter to look up rdfs:subClassOf triples in the shapes graph instead of data graph; see Issue 185
  • +
  • Added parameter to look up rdfs:subClassOf triples in the union of the shapes graph and the data graph; see Issue 185
  • From 385a83d1888c007d587cb2fd2774d85b0f66e11d Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Mon, 4 Aug 2025 21:19:26 +0300 Subject: [PATCH 5/6] Update shacl12-core/index.html Co-authored-by: Alex Nelson --- shacl12-core/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 9e32eaa1..7b561962 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -2736,7 +2736,7 @@

    Graph for rdfs:subClassOf Triples

    of SHACL type to determine whether a node is a SHACL instance of a given class. By default, this is determined by looking up rdfs:subClassOf and rdf:type triples in the data graph. - However, this is impractical in some cases, as rdfs:subClassOf triples are often stored as part + However, this is insufficient in some cases, as rdfs:subClassOf triples are often stored as part of the class and/or shape definitions and not the instance data.

    From 47ab3a74e9cfcee937ed9a22a3450098d907ca73 Mon Sep 17 00:00:00 2001 From: Holger Knublauch Date: Mon, 4 Aug 2025 21:20:09 +0300 Subject: [PATCH 6/6] Update shacl12-core/index.html Co-authored-by: Alex Nelson --- shacl12-core/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shacl12-core/index.html b/shacl12-core/index.html index 7b561962..f2e51773 100644 --- a/shacl12-core/index.html +++ b/shacl12-core/index.html @@ -587,7 +587,7 @@

    Terminology

    The SHACL types of an RDF term in an RDF graph is the set of its values for rdf:type in the graph as well as the SHACL superclasses of these values in the graph. Note that some SHACL implementations can be parameterized so that the rdfs:subClassOf triples - that determine the SHACL subclasses may be queried from the shapes graph instead of the data graph. + that determine the SHACL subclasses may be queried from the shapes graph in addition to the data graph. See .