Re: fun with sh:hasShape

What would happen if the ex:foo5 s:shape s:s1 and ex:foon1 s:shape s:s2 were
removed?

peter


On 09/27/2016 12:44 AM, Dimitris Kontokostas wrote:
> As with other types of recursion, this is also unspecified in the spec
> 
> I placed the sh:hasShape function in the recursive shape list
> https://github.com/w3c/data-shapes/commit/52396ff9014e055a6332c28516ac0574fb3c3211
> 
> On Mon, Sep 26, 2016 at 10:01 PM, Peter F. Patel-Schneider
> <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>> wrote:
> 
>     What happens here?  Why?  Is what happens reasonable?
> 
> 
>     Data graph
> 
>     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
>     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .
>     @prefix sh:  <http://www.w3.org/ns/shacl#> .
>     @prefix ex:  <http://example.org/ex/> .
>     @prefix s:   <http://example.org/s/> .
> 
>     ex:foo1 rdf:type ex:foo ;
>             rdf:type ex:bar ;
>       s:shape s:bar .
> 
>     ex:foo2 rdf:type ex:foo ;
>             rdf:type ex:baz ;
>       s:shape s:bar .
> 
>     ex:foo3 rdf:type ex:foo ;
>             rdf:type ex:baz ;
>       s:shape s:baz .
> 
>     ex:foo4 rdf:type ex:foo ;
>             rdf:type ex:baz ;
>       s:shape s:s0 .
> 
>     ex:foo5 rdf:type ex:foo ;
>             rdf:type ex:baz ;
>       s:shape s:s1 .
> 
>     ex:foon1 rdf:type ex:foon ;
>             rdf:type ex:baz ;
>       s:shape s:s2 .
> 
> 
> 
>     Shapes graph
> 
>     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
>     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> .
>     @prefix sh:  <http://www.w3.org/ns/shacl#> .
>     @prefix ex:  <http://example.org/ex/> .
>     @prefix s:   <http://example.org/s/> .
> 
>     s:s1 rdf:type sh:Shape ;
>       sh:targetClass ex:foo ;
>       sh:sparql [
>         sh:select
>           """SELECT $this WHERE {
>             $this s:shape ?shape ;
>             BIND (sh:hasShape($this,?shape,$shapesGraph) AS ?hasShape)
>             BIND (!bound(?hasShape) AS ?failure )
>             FILTER (?failure || !?hasShape) }""" ] .
> 
>     s:bar sh:class ex:bar .
> 
>     s:baz sh:class ex:baz .
> 
>     s:s2 rdf:type sh:Shape ;
>       sh:targetClass ex:foon ;
>       sh:sparql [
>         sh:select
>           """SELECT $this WHERE {
>             $this s:shape ?shape ;
>             BIND (sh:hasShape($this,?shape,$shapesGraph) AS ?hasShape)
>             BIND (!bound(?hasShape) AS ?failure )
>             FILTER (?failure || ?hasShape) }""" ] .
> 
> 
>     Peter F. Patel-Schneider
>     Nuance Communications
> 
> 
> 
> 
> -- 
> Dimitris Kontokostas
> Department of Computer Science, University of Leipzig & DBpedia Association
> Projects: http://dbpedia.org, http://rdfunit.aksw.org, http://aligned-project.eu
> Homepage: http://aksw.org/DimitrisKontokostas
> Research Group: AKSW/KILT http://aksw.org/Groups/KILT
> 

Received on Tuesday, 27 September 2016 10:55:38 UTC