- From: Dimitris Kontokostas <kontokostas@informatik.uni-leipzig.de>
- Date: Thu, 31 Mar 2016 09:05:57 +0300
- To: "Eric Prud'hommeaux" <eric@w3.org>
- Cc: public-data-shapes-wg <public-data-shapes-wg@w3.org>
- Message-ID: <CA+u4+a2KTjPbjnHsaZu0wTQvmrChW=6TW9Aa+ZqcDSUO4bSZ1g@mail.gmail.com>
Hi Eric,
can you send you proposal adapted to the current SHACL spec?
Some people might not be comfortable with Peter's proposed syntax yet
Thanks
On Thu, Mar 31, 2016 at 1:03 AM, Eric Prud'hommeaux <eric@w3.org> wrote:
> PROPOSAL: add stem in
>
> * Eric Prud'hommeaux <eric@w3.org> [2016-03-09 15:01-0500]
> > Oops, forgot about this action.
> >
> > In general, stems look like this in ShExC:
> >
> > <http://a.example/S1> {
> > <http://a.example/p1> [<http://a.example/v>~]
> > }
> >
> > this in ShExJ:
> >
> > {
> > "type": "Schema",
> > "prefixes": {},
> > "shapes":{
> > "http://a.example/S1": {
> > "type": "Shape",
> > "expression": {
> > "type": "TripleConstraint",
> > "predicate": "http://a.example/p1",
> > "valueExpr": {
> > "type": "ValueClass", "values": [
> > { "type": "StemRange",
> > "stem": "http://a.example/v"
> > }
> > ]
> > }
> > }
> > }
> > }
> > }
> >
> > and this in RDF:
> >
> > [ a shex:Schema ;
> > shex:shape <http://a.example/S1> ] .
> >
> > <http://a.example/S1>
> > a shex:Shape ;
> > shex:expression [
> > a shex:TripleConstraint ;
> > shex:predicate <http://a.example/p1> ;
> > shex:valueExpr [
> > a shex:ValueClass ;
> > shex:values [
> > a shex:StemRange ;
> > shex:stem <http://a.example/v>
> > ]
> > ]
> > ] .
>
> PROPOSAL: write stems in shacl like:
>
> <http://a.example/S1> a sh:Shape;
> sh:propValues (
> <http://a.example/p1> [
> sh:values [
> a sh:StemRange;
> shex:stem <http://a.example/v>
> ]
> ]
> ).
>
> This matches { <s1> <http://a.example/p1> <http://a.example/v123> }
> and { <s1> <http://a.example/p1> <http://a.example/v> }
> but fails { <s1> <http://a.example/p1> <http://a.example/uv> }
>
>
> > We also have stem (- stem)* a la
> >
> > <http://a.example/S1> {
> > <http://a.example/p1> [<http://a.example/v>~
> > - <http://a.example/v1>~
> > - <http://a.example/v2>~
> > - <http://a.example/v3>~]
> > }
> >
> > and
> >
> > {
> > "type": "Schema",
> > "prefixes": {},
> > "shapes":{
> > "http://a.example/S1": {
> > "type": "Shape",
> > "expression": {
> > "type": "TripleConstraint",
> > "predicate": "http://a.example/p1",
> > "valueExpr": {
> > "type": "ValueClass", "values": [
> > { "type": "StemRange",
> > "stem": "http://a.example/v",
> > "exclusions": [
> > { "type": "Stem", "stem": "http://a.example/v1"},
> > { "type": "Stem", "stem": "http://a.example/v2"},
> > { "type": "Stem", "stem": "http://a.example/v3"}
> > ]
> > }
> > ]
> > }
> > }
> > }
> > }
> > }
>
> PROPOSAL: write exclusions in shacl like:
>
> <http://a.example/S1> a sh:Shape;
> sh:propValues (
> <http://a.example/p1> [
> sh:values [
> a sh:StemRange;
> shex:stem <http://a.example/v>
> sh:exclusions: (
> [ "type": "Stem", "stem": <http://a.example/v1> ],
> [ "type": "Stem", "stem": <http://a.example/v2> ],
> [ "type": "Stem", "stem": <http://a.example/v3> ]
> )
> ]
> ]
> ).
>
> This matches { <s1> <http://a.example/p1> <http://a.example/v4> }
> and { <s1> <http://a.example/p1> <http://a.example/v456> }
> but fails { <s1> <http://a.example/p1> <http://a.example/v2> }
> and { <s1> <http://a.example/p1> <http://a.example/v234> }
>
>
> > You can find the stem tests in <
> http://raw.githubusercontent.com/shexSpec/shexTest/master/validation/manifest.ttl>
> with
> >
> > SELECT * { ?s <http://www.w3.org/ns/shacl/test-suite#trait> <
> http://www.w3.org/ns/shacl/test-suite#Stem> }
> >
> > Gotta put my child to bed. will try to write to formalize later.
> > --
> > -ericP
> >
> > office: +1.617.599.3509
> > mobile: +33.6.80.80.35.59
> >
> > (eric@w3.org)
> > Feel free to forward this message to any list for any purpose other than
> > email address distribution.
> >
> > There are subtle nuances encoded in font variation and clever layout
> > which can only be seen by printing this message on high-clay paper.
>
> --
> -ericP
>
> office: +1.617.599.3509
> mobile: +33.6.80.80.35.59
>
> (eric@w3.org)
> Feel free to forward this message to any list for any purpose other than
> email address distribution.
>
> There are subtle nuances encoded in font variation and clever layout
> which can only be seen by printing this message on high-clay paper.
>
>
--
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Projects: http://dbpedia.org, http://rdfunit.aksw.org, http://
http://aligned-project.eu
Homepage:http://aksw.org/DimitrisKontokostas
Research Group: AKSW/KILT http://aksw.org/Groups/KILT
Received on Thursday, 31 March 2016 06:06:54 UTC