shexSpec / shex

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

^^-style facet arguments #41

Closed ericprud closed 7 years ago

ericprud commented 7 years ago

The ShEx2 grammar currently allows both numeric literals (5, 5.0, 5E0) and ^^-style arguments. ShExR.shex accepts xsd:integer OR xsd:decimal OR xsd:double for those arguments. (I noticed this because I had to add OR xsd:float for the three {Min,Max}{in,ex}clusive-float.ttl files.)

We have tests for ^^xsd:float but would have to define what datatypes were permitted, decide what to do with schemas with different datatypes, and add comprehensive tests. Alternatively, we can eliminate the ^^-style arguments without reducing expressivity (c.f. 1floatMininclusiveINTEGER_pass-equalLead) because of numeric type promotion.

PROPOSE: remove | string "^^" datatype from numericFacet, the three schemas 1floatMaxinclusivexsd-float, 1floatMinexclusivexsd-float, 1floatMininclusivexsd-float, and the related validation tests. REASON: complex and does not add expressivity PARTICIPANTS: @ericprud, @gkellogg, @labra DIFFS: see facet-typed-literal branches in spec, grammar, shexTest, shex.js

gkellogg commented 7 years ago

^^ literals useful for date, dateTime, and time, also boolean. May also be useful for restrictions on numbers and dates. Right now, dates/times/boolean fall into the numericFacet, but perhaps we need something else?

gkellogg commented 7 years ago

These come into play for datatype validation, not necessarily facets, so I'm good.

ericprud commented 7 years ago

merged