Re: ACTION: ericP to send proposal for sh:Stem in response to ISSUE-80

[With syntax fixes.]

On 03/10/2016 12:35 PM, Eric Prud'hommeaux wrote:
> * Peter F. Patel-Schneider <pfpschneider@gmail.com> [2016-03-10 11:35-0800]
>> I think that stem1 - stem2
>> is
>> [ sh:pattern "stem1*" ;
>>   sh:not [ sh:pattern "stem2*" ] ]
> 
> Yeah, I buy that. Here's a more exhaustive example:
>   ~<stem1> - ~<stem2> - ~<stem2> - <uri3> # read as ((5-2)-1), not (5-(2-1))
> or
> [ sh:pattern "stem1*" ;
>   sh:and [ sh:not [ sh:pattern "stem2*" ] ]
>          [ sh:not [ sh:pattern "stem3*" ] ]
>          [ sh:not [ sh:hasValue <iri3> ] ] ]
> 
> Can you correct that?
> 
> 
>> peter

This looks OK, assuming that the ~<> are syntactic markers.  If the <> are
part of the IRI then add them to the patterns.

peter

>>
>>
>> On 03/09/2016 12:01 PM, Eric Prud'hommeaux wrote:
>>> 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>
>>>       ]
>>>     ]
>>>   ] .
>>>     
>>> 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"}
>>>               ]
>>>             }
>>>           ]
>>>         }
>>>       }
>>>     }
>>>   }
>>> }
>>>
>>> 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.
>>>
> 

Received on Thursday, 10 March 2016 22:16:22 UTC