Home

rdfsrange

rdfs:range is a term in the RDF Schema (RDFS) vocabulary used to indicate the class of objects that a property can point to. It specifies that, for statements using a given property, the object position should be a member of a particular class. Together with rdfs:domain, which constrains the subject, rdfs:range expresses a type expectation for the value on the object side of a triple. In standard RDF semantics, if a triple s p o exists and p rdfs:range C, then o is expected to be an instance of C (or a subclass of C) in any interpretation. Literals are treated specially and are not always subject to the same range constraints.

Usage and implications: A common pattern is to define a property with a domain and a range.

Relationship to validation and reasoning: rdfs:range provides a lightweight constraint that supports inference rather than strict

Examples in Turtle:

:hasAuthor rdfs:domain :Book .

:hasAuthor rdfs:range :Person .

Example: :Book1 :hasAuthor :Alice . (implies :Alice rdf:type :Person)

For
example,
ex:hasAuthor
rdfs:domain
ex:Book
and
rdfs:range
ex:Person.
Then,
if
ex:Book1
ex:hasAuthor
ex:Alice,
reasoning
can
infer
ex:Alice
rdf:type
ex:Person.
If
multiple
range
declarations
are
present
for
a
property,
each
corresponding
class
can
be
inferred
for
the
object.
data
validation.
Real-world
data
may
not
always
conform,
and
reasoners
may
be
used
to
derive
type
information.
In
OWL,
more
expressive
constraint
mechanisms
exist,
but
rdfs:range
remains
a
foundational,
widely
supported
feature
for
describing
expected
object
types.