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 ;
sh:class ex:Address ;
]
)
] .
```
```
On Wednesday, September 22, 2021 at 2:20:22 AM UTC+1 Holger
Knublauch wrote:
On 2021-09-22 11:01 am, Maatary Okouya wrote:
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 [ //shprop1
sh:path ex:address ;
sh:or (
[ //shprop2
sh:datatype xsd:string ;
]
[ //shprop3
sh: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
/Note: I have been using all of this thing in my
application without problem, as i had the intuition about
how those works and the support of TBC. But recently i have
had to parse shacl, and that is when the issue of what is
what exactly, or what is allowed where comes in.
/
On Wednesday, September 22, 2021 at 1:44:32 AM UTC+1 Maatary
Okouya wrote:
Just to conclude and be complete about my last
question, which is all that sparked the original
question actually:
/(Note: I'm using rdfs:subclassOf informally here, just
to express the idea)/
When we have
```
ex:PersonAddressShape a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [ //shprop1
sh:path ex:address ;
sh:or (
[ //shprop2
sh:datatype xsd:string ;
]
[ //shprop3
sh:class ex:Address ;
]
)
] .
```
Are we saying that shProp1 rdfs:subClassOf at least
shProp1 or shProp2
On Wednesday, September 22, 2021 at 1:35:56 AM UTC+1
Maatary Okouya wrote:
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 ?
2-2 - With respect to
[
sh:path ex:property ;
sh:maxCount 1 ;
]
is it saying
ex:ExampleAndShape *has the propertyshape i.e.
sh:property*
[
sh:path ex:property ;
sh:maxCount 1 ;
]
???
On Wednesday, September 22, 2021 at 1:01:59 AM UTC+1
Holger Knublauch wrote:
On 2021-09-22 9:54 am, Maatary Okouya wrote:
Taken from the specification:
>>>
A node shape is a shape
<https://www.w3.org/TR/shacl/#dfn-shape> in the
shapes graph
<https://www.w3.org/TR/shacl/#dfn-shapes-graph> that
is not the subject
<https://www.w3.org/TR/shacl/#dfn-subject> of a
triple
<https://www.w3.org/TR/shacl/#dfn-rdf-triple> with
*sh:path* as its predicate
<https://www.w3.org/TR/shacl/#dfn-predicate>.
SHACL instances
<https://www.w3.org/TR/shacl/#dfn-shacl-instance> of
sh:NodeShape cannot
have a value
<https://www.w3.org/TR/shacl/#dfn-value> for
the property sh:path.
>>>
Yet when talking Or Constraint or And
Constraint, that takes list of shapes, we find
example like what follow:
>>>>
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 ;
] ) .
>>>>
With the following explanation
>>>
The following example illustrates the use
of sh:and in a shape to specify the condition
that certain focus nodes have exactly one value
of ex:property. This is achieved via the
conjunction of a separate named shape
(ex:SuperShape) which specifies the minimum
count, and a *blank node shape* that
additionally specifies the maximum count. As
shown here, sh:and can be used to implement a
specialization mechanism between shapes.
>>>>
How on earth is this a Blank Node shape if it
is the subject of an sh:path, am I missing
something ?
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
<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
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/a36d9325-ff9a-4329-86a3-64a463798b1dn%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/a36d9325-ff9a-4329-86a3-64a463798b1dn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/50870f8e-6764-45f3-a775-5960442da2e0n%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/50870f8e-6764-45f3-a775-5960442da2e0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/7821072f-f4f9-4553-930c-e8fc13874afen%40googlegroups.com
<https://groups.google.com/d/msgid/topbraid-users/7821072f-f4f9-4553-930c-e8fc13874afen%40googlegroups.com?utm_medium=email&utm_source=footer>.