Skip to content

Commit fea6669

Browse files
HolgerKnublauchTallTedjeswrajnelson-nist
authored
#185: Added subClassOfInShapesGraph parameter (#447)
* #185: Added subClassOfInShapesGraph parameter * Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr <[email protected]> * Update shacl12-core/index.html Co-authored-by: Jesse Wright <[email protected]> * Updated change entry to new contract * Update shacl12-core/index.html Co-authored-by: Alex Nelson <[email protected]> * Update shacl12-core/index.html Co-authored-by: Alex Nelson <[email protected]> --------- Co-authored-by: Ted Thibodeau Jr <[email protected]> Co-authored-by: Jesse Wright <[email protected]> Co-authored-by: Alex Nelson <[email protected]>
1 parent bf3e332 commit fea6669

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

shacl12-core/index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ <h3>Terminology</h3>
586586
<div>
587587
The <dfn data-lt="type|types|SHACL type">SHACL types</dfn> of an <a>RDF term</a> in an <a>RDF graph</a> is the set of its <a>values</a> for <code>rdf:type</code> in the
588588
<a>graph</a> as well as the <a>SHACL superclasses</a> of these <a>values</a> in the <a>graph</a>.
589+
Note that some SHACL implementations can be parameterized so that the <code>rdfs:subClassOf</code> triples
590+
that determine the <a>SHACL subclasses</a> may be queried from the <a>shapes graph</a> in addition to the <a>data graph</a>.
591+
See <a href="#subClassOfInShapesGraph"></a>.
589592
</div>
590593
</div>
591594
<div class="def">
@@ -1545,6 +1548,11 @@ <h4>Class-based Targets (sh:targetClass)</h4>
15451548
</div>
15461549
</div>
15471550
</aside>
1551+
<p>
1552+
Note that the <code>rdfs:subClassOf</code> triples may be queried from the <a>shapes graph</a>
1553+
(see <a href="#subClassOfInShapesGraph"></a>) in which case the <code>rdfs:subClassOf</code> triple
1554+
from the example above would not be required to be in the <a>data graph</a>.
1555+
</p>
15481556

15491557
</section>
15501558

@@ -2717,6 +2725,27 @@ <h3>Data Graph</h3>
27172725
several related ontologies, pass all of them to the SHACL processor (together or one by one), do not rely on <code>owl:imports</code> links.
27182726
</p>
27192727
</section>
2728+
2729+
<section id="subClassOfInShapesGraph">
2730+
<h3>Graph for rdfs:subClassOf Triples</h3>
2731+
<p>
2732+
Some features of SHACL (such as
2733+
<a href="#ClassConstraintComponent"></a>,
2734+
<a href="#targetClass"></a>, and
2735+
<a href="#implicit-targetClass"></a>) rely on the notion
2736+
of <a>SHACL type</a> to determine whether a <a>node</a> is a <a>SHACL instance</a> of a given class.
2737+
By default, this is determined by looking up <code>rdfs:subClassOf</code> and <code>rdf:type</code> <a>triples</a>
2738+
in the <a>data graph</a>.
2739+
However, this is insufficient in some cases, as <code>rdfs:subClassOf</code> triples are often stored as part
2740+
of the class and/or shape definitions and not the instance data.
2741+
</p>
2742+
<p>
2743+
SHACL processors SHOULD offer a parameter <code>subClassOfInShapesGraph</code> that, if set to <code>true</code>,
2744+
should alter the definition of <a>SHACL Type</a> so that the <code>rdfs:subClassOf</code> triples are queried
2745+
from the <a>shapes graph</a> in addition to the <a>data graph</a>.
2746+
The <code>rdf:type</code> triples are always expected to be in the <a>data graph</a>.
2747+
</p>
2748+
</section>
27202749

27212750
<section id="sh-shapes-graph">
27222751
<h3>Linking to shapes graphs (sh:shapesGraph)</h3>
@@ -7936,9 +7965,11 @@ <h2>Changes between SHACL 1.0 Core and SHACL 1.2 Core</h2>
79367965
<li>Moved SPARQL-based validators from Core to an Appendix of SHACL-SPARQL; see <a href="https://github.com/w3c/data-shapes/issues/271">Issue 271</a></li>
79377966
<li>Added the new constraint component <a href="#ExpressionConstraintComponent"><code>sh:expression</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/357">Issue 357</a></li>
79387967
<li>Added the new constraint component <a href="#NodeByExpressionConstraintComponent"><code>sh:nodeByExpression</code></a>, see <a href="https://github.com/w3c/data-shapes/issues/408">Issue 408</a></li>
7968+
<li>Added new <a href="#core-components-list">List constraint components</a>, see <a href="https://github.com/w3c/data-shapes/issues/391">Issue 391</a> and <a href="https://github.com/w3c/data-shapes/issues/414">Issue 414</a></li>
79397969
<li>Added the new value <code>sh:ByTypes</code> for <a href="#ClosedConstraintComponent"><code>sh:closed</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/172">Issue 172</a></li>
79407970
<li>The values of <a href="#ClassConstraintComponent"><code>sh:class</code></a> and <a href="#DatatypeConstraintComponent"><code>sh:datatype</code></a> can now also be lists, indicating a union of choices; see <a href="https://github.com/w3c/data-shapes/issues/160">Issue 160</a></li>
79417971
<li>Added the new constraint component <a href="#ReifierShapeShapeConstraintComponent"><code>sh:ReifierShape</code></a>; see <a href="https://github.com/w3c/data-shapes/issues/300">Issue 300</a></li>
7972+
<li>Added parameter <a href="#subClassOfInShapesGraph"></a> to look up rdfs:subClassOf triples in the union of the shapes graph and the data graph; see <a href="https://github.com/w3c/data-shapes/issues/185">Issue 185</a></li>
79427973
</ul>
79437974
</section>
79447975

0 commit comments

Comments
 (0)