Skip to content

Commit

Permalink
property scopes (v2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkont committed May 3, 2016
1 parent d2d70f5 commit d91acf3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions shacl/index.html
Expand Up @@ -734,20 +734,23 @@ <h4>General scopes (sh:scope)</h4>
<section id="PropertyScope">
<h5>Property scopes (sh:PropertyScope)</h5>
<p>
The property scope for a property <code>p</code> is defined as the set of subjects that appear in a triple with <code>p</code> as a predicate.
Property scopes can be set by linking a shape to a resource <code>r</code> of type <code>sh:PropertyScope</code> with the <code>sh:scope</code> property.
The property <code>p</code> is linked from <code>r</code> with the property <code>sh:predicate</code>.
A property scope for property <code>p</code> is defined as the set of subjects in the data graph that appear in a triple with <code>p</code> as a predicate.
</p>

<div class="def def-sparql">
<div class="def-header">SPARQL DEFINITION</div>
<pre class="def-sparql-body">
SELECT DISTINCT ?this
WHERE {
?this $predicate ?any .
?this $p ?any .
}</pre>
</div>
<p>
The following example uses <code>sh:PropertyScope</code> to define that the constraint that applies to all resources that have any value for the property <code>ex:knows</code>:
A shape defines a property scope with the <code>sh:scope</code> predicate and object an RDF node <code>r</code> of type <code>sh:PropertyScope</code>.

The RDF node <code>r</code> must provide exactly one value for <code>p</code> with the <code>sh:predicate</code> property.


</p>
<pre class="example-shapes">
ex:PropertyScopeExampleShape
Expand Down

0 comments on commit d91acf3

Please sign in to comment.