- From: Pierre-Antoine Champin via GitHub <sysbot+gh@w3.org>
- Date: Wed, 23 Jun 2021 06:31:40 +0000
- To: public-shex-dev@w3.org
@herminiogg and @ericprud you both seem to be assuming that a shape applying to a node should constrain the asserted triples *and* the embedded triples involving that node. I am not sure I agree with that. Consider the following graph:
```
:alice a :Person; :name "Alice" ; :birthDate '1987-06-05'^^xsd:date.
:bob :says << :alice a :Genius >>.
```
I can imagine that a shape *Person* would require Alice to have a name, or her birth date to be an `xsd:date`, but I don't see the point in that shape constraining who says what about her...
On the other hand, I see value in constraining the *annotated* triples about a given node, i.e. triples that are both asserted and embedded as subject. This pattern emulates Property Graphs' edge properties, and Turtle-star provides a shorthand for it (see [example 2](https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#example-annotation) in the RDF-star CG report).
This could go like this (reusing the "annotation brackets" of Turtle-star):
```
:User {
schema:name xsd:string ;
schema:birthDate xsd:date? ;
schema:spouse @:User * {|
:from xsd:date ;
:until xsd:date? ;
|}?;
}
```
or even maybe
```
:User {
schema:name xsd:string ;
schema:birthDate xsd:date? ;
schema:spouse @:User * {| @:TemporalAnnotation |}?;
}
:TemporalAnnotation {
:from xsd:date ;
:until xsd:date? ;
}
```
For triples that are embedded only, we would need a dedicated node kind `Triple`, and probably also a dedicated node constraint, for which we could reuse the double-brackets
```
:JudgeOfCharacter {
:says << @:User [ rdf:type ] [ :Genius :Moron ] >>;
}
```
--
GitHub Notification of comment by pchampin
Please view or discuss this issue at https://github.com/shexSpec/shex/issues/107#issuecomment-866567882 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 June 2021 06:31:57 UTC