shexSpec / shex

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

[Validating RDF Data] Example 44 : Product's status must start with... #99

Closed mistermboy closed 4 years ago

mistermboy commented 4 years ago

This is the example 44 of the Validating RDF Data book:

prefix codes: <http://example.codes/>  

:Product {   
      :status [ codes:good.~ codes:bad.~ ] 
}

I was looking at the grammars and I think that none of them allows you to do that inside a "valueSetValue":

Master branch grammar and Shex2.1 branch grammar

[47]    valueSetValue      ::= iriRange | literal
[48]    iriRange           ::= iri ('~' exclusion*)? | '.' exclusion+
[49]    exclusion          ::= '-' iri '~'?

Shex.io grammar

[49] valueSetValue ::=  iriRange | literalRange | languageRange | exclusion+

[50] exclusion  ::=  '-' (iri  | literal | LANGTAG) '~'?
[51] iriRange  ::=  iri ('~' exclusion*)?

[53] literalRange ::=  literal ('~' literalExclusion*)?
[54] literalExclusion ::=  '-' literal '~'?

[55] languageRange ::= LANGTAG ('~' languageExclusion*)? | '@' '~' languageExclusion*
[56] languageExclusion  ::=  '-' LANGTAG '~'?
ericprud commented 4 years ago

i think those are just two consecutive IRIs valueSetValues with exclusions https://tinyurl.com/wo65j5j

mistermboy commented 4 years ago

I can't see it with those rules unless the '.' be part of the IRI :confused:

ericprud commented 4 years ago

Yeah, perhaps a poor choice, but the goal was to evoke a set of terms with hierarchy at the '.'s