shexSpec / spec

ShEx specification
https://shexspec.github.io/spec/
Other
14 stars 10 forks source link

CLOSED shape does not mix with AND #16

Closed jessevdam closed 5 years ago

jessevdam commented 7 years ago

When I define a close shape like

<ShapeExample> CLOSED {
  a [ex:TypeA] ;
  ex:prop1 xsd:String
}

I can define it as closed, however if define something like

<ShapeExample> CLOSED {  
  ex:prop1 xsd:String
} AND 
{
  {
    a [ex:TypeA] ;
  }
  OR
  {
    a [ex:SubTypeA] ;
    ex:prop2 xsd:String;
  }
}

Then the closed statement will fail as the there will be extra properties as seen from the shape:

<ShapeExample> CLOSED {  
  ex:prop1 xsd:String;
}
ericprud commented 5 years ago

After over year, it's unclear that there's any alternative. If you have one, please raise an issue in the language issue list.