shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
25 stars 8 forks source link

StemRange exclusions unordered #64

Closed ericprud closed 7 years ago

ericprud commented 7 years ago

ShExC and ShExJ *StemRanges preserve order: ShExC

<http://a.example/S1> {
   <http://a.example/p1> ["v"~  - "v1"~   - "v2"~  - "v3"~]
}

ShExJ

…
{ "type": "LiteralStemRange",
  "stem": "v",
  "exclusions": [
    { "type": "LiteralStem", "stem": "v1" },
    { "type": "LiteralStem", "stem": "v2" },
    { "type": "LiteralStem", "stem": "v3" } ] }

but ShExR does not: ShExR:

[ a sx:LiteralStemRange ;
  sx:stem "v"  ;
  sx:exclusion
    [ a sx:LiteralStem ; sx:stem "v1" ],
    [ a sx:LiteralStem ; sx:stem "v2" ],
    [ a sx:LiteralStem ; sx:stem "v3" ] ]

(Note that the objects of sx:exclusion are unordered.)

PROPOSAL: change exclusions to be a list.

CHANGES: context.jsonld:

+     "exclusions": {"@id": "mf:entries", "@container": "@list", "@type": "@id"},

ShExR.shex

-   sx:exclusion @<objectValue> OR @<IriStem>*
+   sx:exclusion @<ExclusionList1Plus>
+ <ExclusionList1Plus> CLOSED {
+   rdf:first @<objectValue> OR @<IriStem> ;
+   rdf:rest  [rdf:nil] OR @<SemActList1Plus>
+ }
jimkont commented 7 years ago

RESOLVED on 20170623 meeting with following votes: