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.
Written by Paul Gearon
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#