shexSpec / shex

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

Specifying both a literal datatype and a value set in ShExC #121

Open tombaker opened 1 year ago

tombaker commented 1 year ago

I expected the following to work:

my:IssueShape {
  ex:status xsd:integer [0 1];
}

However, it apparently only works with AND:

PREFIX my: <http://my.example/>
PREFIX ex: <http://ex.example/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

my:IssueShape {
  ex:status [0 1] AND xsd:integer;
}
tombaker commented 1 year ago

This is the error encountered (line breaks inserted for readability):

error parsing input schema:
Parse error on line 7:
...:status xsd:integer [0 1];}
-----------------------^
Expecting 'IT_OR', 'IT_AND', 'REGEXP', 'IT_LENGTH', 'IT_MINLENGTH', 'IT_MAXLENGTH', 'IT_MININCLUSIVE', 
'IT_MINEXCLUSIVE', 'IT_MAXINCLUSIVE', 'IT_MAXEXCLUSIVE', 'IT_TOTALDIGITS', 'IT_FRACTIONDIGITS', 
'}', '|', ',', ';', '*', '+', '?', 'REPEAT_RANGE', '//', '%', got '['