DataType Node
A DataType Node specifies the constraints for a literal value.
Key-value table
In the following the basic attributes that a DataType Node can have are listed:
Example
Advanced Constraints
Advanced constraints are introduced with this DS version. They can be used in DataType nodes for specific datatypes. Some of these constraints can have multiple entries; if that is the case, then an array is used to wrap the values.
Value Range Constraint Components
SHACL reference: https://www.w3.org/TR/shacl/#core-components-range
These constraint components dictate a value range that the value of a literal value must have. The datatype for this value must be the same as the datatype of the constrained literal. Datatypes that are allowed to have these constraints are: Date, DateTime, Time, Number, Float, and Integer.
Example:
String based Constraint Components
SHACL reference: https://www.w3.org/TR/shacl/#core-components-string
These constraint components are meant for literals having the datatype string (and their sub-datatypes in some cases).
Example of a DataType Node as range for schema:description
:
Example of a DataType Node as range for schema:telephone
:
Property Value Pair Constraint Components
SHACL reference: https://www.w3.org/TR/shacl/#core-components-property-pairs
These constraints are explained in Property.md since they are expressed on a property-level, and not on a data-type-level.
Other Constraint Components
SHACL reference: https://www.w3.org/TR/shacl/#core-components-others
These constraints can be used on any data type.
Example:
Datatype Mapping
Mapping Functions between XSD datatypes and schema.org datatypes:
(Other datatypes are ignored for now, since they are not used in practice)
Last updated