Re: Fwd: Is this an error in the spec?

Hi Roman,

the example looks correct to me. Any property shape can be wrapped into 
a basically equivalent node shape, and the one you show below would 
indeed be equivalent. However, the members of an sh:and list just need 
to be shapes - either node or property shapes. If a property shape is 
used, then it is interpreted as specified in the spec.

Maybe you can elaborate which particular issue you find confusing here. 
We did discuss variations of this topic in the WG and there were 
different opinions about whether property shapes can be used 
"stand-alone" but the group decided to allow this.

Regards,
Holger


On 11/10/2017 4:16, Roman Evstifeev wrote:
> Hi. I found one confusing example in the shacl core spec:
>
> In the "and" constraint description, there is an example shape graph
> (https://w3c.github.io/data-shapes/shacl/#AndConstraintComponent)
>
> =========
> ex:SuperShape
>    a sh:NodeShape ;
>    sh:property [
>     sh:path ex:property ;
>     sh:minCount 1 ;
>    ] .
>
> ex:ExampleAndShape
>    a sh:NodeShape ;
>    sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
>    sh:and (
>     ex:SuperShape
>     [
>      sh:path ex:property ;
>      sh:maxCount 1 ;
>     ]
>    ) .
> =========
>
> In this example sh:and combines two shapes - one is
> node shape (ex:SuperShape) and another is a property shape
> (written inline). Does it make any sense?
>
> I thought that the second shape should also be node shape.
> i.e. replace
>
> [
>      sh:path ex:property ;
>      sh:maxCount 1 ;
> ]
>
> with:
>
> [
>    a sh:NodeShape ;
>    sh:property [
>     sh:path ex:property ;
>     sh:maxCount 1 ;
>    ]
> ]
>
> Is this right? Or am i missing something?
>

Received on Tuesday, 10 October 2017 23:02:36 UTC