Closed
Description
Some literal (attribute) props naturally admit a variety of datatypes, eg
- dc:date, dct:created etc can be xsd:date, xsd:dateTime, xsd:dateTimeStamp
- s:name can be xsd:string, rdf:langString
- ex:age can be byte, int, integer, and their nonNegative variants (Inspired by Improve validation rules for XSD integer datatypes #142)
- sh:order can be integer or decimal (SHACL vocabulary is inconsistent #125)
SHACL can express this with sh:or property shapes, but it gets tedious.
Can we allow multiple values of sh:dataType?
Alternatively, we could think of some synthetic "union datatypes", eg
- sh:dateOrDateTimeStamp
- sh:stringOrLangString (rdf:PlainLiteral means the same)
- sh:natural, sh:nonNegativeNatural, etc
We actually have the first two in Ontotext SOML (GraphQL), which in SHACL is expanded to sh:or