Last Updated: February 25, 2016
·
676
· quoll

rdfs:range can do more than just rdfs:Class

While not immediately apparent, a careful reading of RDF/RDFS shows that rdfs:range can be applied to properties that refer to RDF Literals. This means that data types can be specified with rdfs:range.

For instance:

ex:age rdf:type rdfs:Property;
       rdfs:range xsd:nonNegativeInteger .

While this is legal, care must be taken not to create nonsensical statements such as:

ex:Fred ex:age 38.5 .

This creates a situation where 38.5 is a non-negative-integer, which is false since floating point numbers are not integers.