You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding multiple sh:datatypes would be inconsistent with how the rest of SHACL is working - no other constraint component takes multiple values of the same property.
I agree however that processing this through sh:or is not elegant. The old WG had considered something like sh:datatypeIn which would take an enumeration but rejected this in order to keep the language smaller.
A union datatype has consequences for data exchange though. The import and use of such data must now consider all possibilities or be "by value".
Adding as a library, rather than changing SHACL-core is better. Then a system can publish which libraries it is using, which is a contract it can adhere to even if it is not using all features at one point in time.
In other words - shapes files declare feature sets, whether by imports or a new, specific property.
Some literal (attribute) props naturally admit a variety of datatypes, eg
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
We actually have the first two in Ontotext SOML (GraphQL), which in SHACL is expanded to sh:or
The text was updated successfully, but these errors were encountered: