It should be a "blank property shape". I have recorded a bug report to the spec's Errata:
https://github.com/w3c/data-shapes/issues/140
Note the error is in an informative block of text, so it doesn't
change implementations.
Thanks for pointing this out
Holger
```
[sh:path ex:property ;sh:maxCount 1 ;]
```--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/a36d9325-ff9a-4329-86a3-64a463798b1dn%40googlegroups.com.
1 - Does that mean that fundamentally, the list of shape in an sh:Or or sh:And is heterogenous ? That is, it may contain both propertyShape and NodeShape at the same time ?
2 - This bring me to the question of how to read this ?
>>>>
ex:ExampleAndShape a sh:NodeShape ;sh:targetNode ex:ValidInstance, ex:InvalidInstance ;sh:and (ex:SuperShape[sh:path ex:property ;sh:maxCount 1 ;] ) .
>>>>2-1 - With respect to s:SuperShape: is it saying that ex:ExampleAndShap rdfs:SubClassOf ex:SuperShape ?
sh:node ex:SuperShape ;
In general, sh:and is not needed and can be substituted with
multiple sh:node constraints, or sh:property.
2-2 - With respect to[sh:path ex:property ;sh:maxCount 1 ;]ex:ExampleAndShape has the propertyshape i.e. sh:property
is it saying
[sh:path ex:property ;sh:maxCount 1 ;]
It means that the target nodes must conform to the given property shape, i.e. have at most one value of ex:property.
Yes, this could alternatively be written using sh:property, as I mentioned above sh:and is redundant and was only added for symmetry reasons.
There are subtle differences though in how validation errors
would be reported between sh:property and sh:and. With sh:and you
would only get a single violation, while with sh:property it would
report each individual property violation separately.
OTOH sh:or is of course not redundant.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/5ff52c6b-ca27-4a18-b0d6-a5e7795a48bfn%40googlegroups.com.
sh:node ex:SuperShape ;
In general, sh:and is not needed and can be substituted with multiple sh:node constraints, or sh:property.
I assumed that in my example that the list is made up of blank Property Shape? am i correct ?
```ex:PersonAddressShape a sh:NodeShape ;sh:targetClass ex:Person ;sh:property [ //shprop1sh:path ex:address ;sh:or ([ //shprop2sh:datatype xsd:string ;]
[ //shprop3sh:class ex:Address ;])] .```
The prop2 and prop3 constraints above are node shapes. But they are applied to all value nodes of the surrounding property shape.
Hence i am interested in how one read this informally as much as formally. I don't think, as in the previous example above, sh:node or sh:property applies. Hence, little confused on this one
In general, both types of shapes apply to a focus node and its value node(s). For node shapes the value node == the focus node. If you would do
ex:PersonAddressShape
sh:property [
sh:path ex:address ;
sh:or (
[
sh:path ex:postalCode ;
sh:maxLength 4 ;
sh:minCount 1 ;
]
...
this would mean that all value nodes of ex:address must have another property ex:postalCode with min length 4.
So basically the terminology "focus node" and "value node" matters a lot. Once this is clear, both types of shapes can be used interchangeably.
In the WG we had long long discussions about whether property
shapes and node shapes can be used interchangeably, and I was
hesitant and actually actively against too much flexibility here
because it would confuse users. Sometimes less is more, and I
believe your discussion and input from many other users have
confirmed that the current design requires quite a level of
abstraction to understand properly.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/50870f8e-6764-45f3-a775-5960442da2e0n%40googlegroups.com.
Modified below
Holger
Before, i go back and do my due diligence,
Would be able to expand that into its full form, i mean representing explicitly the NodeShape
```
ex:PersonAddressShape a sh:NodeShape ;sh:targetClass ex:Person ;
sh:property [ //shprop1
a sh:PropertyShape ;
sh:path ex:address ;sh:or (
[ //shprop2
a sh:NodeShape ;
sh:datatype xsd:string ;]
[ //shprop3
a sh:NodeShape ;
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/7821072f-f4f9-4553-930c-e8fc13874afen%40googlegroups.com.
I think I get your point about focus node and value node, and i will wrap my head around that.
Weird that there is no one example that show that type of construction
ex:X a sh:NodeShape ;
sh:datatype xsd:string ;
But for the little i just understood, this means that the two are equivalent ?
ex:aNodeShape a sh:NodeShapesh:targetClass ex:Person
This means "All constraints defined by aNodeShape apply to all instances of Person".
(But the shape above doesn't define any constraints)
ex:aNodeShape a sh:NodeShape
sh:class ex:Person
This means "The constraints defined by aNodeShape are: - all value nodes must be instances of Person"
(But the shape doesn't define a target so it doesn't apply to anything in the graph).
For something to "happen" you need to have both a target and
constraints, but
ex:aNodeShape
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:class ex:Person ;
would be meaningless because it will only apply to Persons and then verifies that they are in fact Persons which is of course true.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/741ae122-5e5e-44d2-9f42-08f845696536n%40googlegroups.com.