Skip to content

Commit

Permalink
recursion comments by Peter
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkont committed Sep 26, 2016
1 parent d73a0f2 commit f80725b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions shacl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,19 @@ <h3>Shapes Graph</h3>
<p>
In addition to shape definitions, the shapes graph may contain additional information for the SHACL processor such as <a href="#entailment">entailment</a> directives.
</p>
<section id="shapes-recursion">
<h4>Shape recursion</h4>
<p id="recursion">
A <dfn>recursive shape</dfn> is a shape thar refers to itself directly or transitively via
<a href="#constraints-shape">shape-based constraint components</a> (i.e. <code>sh:shape</code>),
<a href="#constraints-shape">logical constraint components</a> (i.e. <code>sh:or</code>) or
<a href="#filterShape">filter shapes</a> (<code>sh:filterShape</code>).

The handling of recursive shapes is not defined in SHACL and is left to SHACL processor implementations.
SHACL processors MAY disallow validation with shapes graph that contain recursive shapes.
</p>
</section>

</section>

<section id="data-graph">
Expand Down Expand Up @@ -2836,15 +2849,6 @@ <h4>sh:shape</h4>
FILTER (?failure || !?hasShape) .
}</pre>
</div>
<p id="recursion">
A shape may refer to itself directly or indirectly via <code>sh:shape</code>, <code>sh:filterShape</code>, etc.
Such a shape is said to be <em>recursive</em>.
The meaning of non-recursive shapes is always well-founded.
In contrast, the meaning of a recursive shape may not be well-founded.
The handling of recursive shapes in SHACL is left to implementations.
Some implementations MAY reject shapes graphs containing recursive shape definitions.
Some implementations MAY report a <a>failure</a> if a recursion has been detected at validation time.
</p>
<p>
In the following example, all values of the property <code>ex:someProperty</code> will validate with no results for the shape
specified by a blank node that ensures that the property <code>ex:nestedProperty</code> has at least one value.
Expand Down

0 comments on commit f80725b

Please sign in to comment.