RDF Schema (RDFS) is extending RDF vocabulary to allow describing taxonomies of classes and properties. It also extends definitions for some of the elements of RDF, for example it sets the domain and range of properties and relates the RDF classes and properties into taxonomies using the RDFS vocabulary.

Let us first illustrate the use of RDFS vocabulary on an example showing taxonomy of classes and properties and usage of range and domain of properties:

    @prefix :     <http://www.example.org/sample.rdfs#> .
    @prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
    :Dog      rdfs:subClassOf :Animal.
    :Person   rdfs:subClassOf :Animal.
    :hasChild rdfs:range :Animal;
              rdfs:domain :Animal.
    :hasSon   rdfs:subPropertyOf :hasChild.
    :Max      a :Dog.
    :Abel     a :Person.
    :Adam     a :Person;
              :hasSon :Abel.

The list of classes defined by RDFS is shown in the table below. All resources can be divided into groups called classes. Classes are also resources, so they are identified by URIs and can be described using properties. The members of a class are instances of classes, which is stated using the rdf:type property. Note that class and a set of instances does not have to be the same. The set of instances is the extension of the class, and two different classes may contain the same set of instances. For example, looking at the RDF example graph, class of people having mailbox mailto:joe.smith@example.org is different from the class of people having homepage http://www.example.org/~joe/, but the extension (i.e., the set of instances) of these classes is the same - it is the resource http://www.example.org/~joe/contact.rdf#joesmith.

Element Class of rdfs:subClassOf rdf:type
rdfs:Resource all resources rdfs:Resource rdfs:Class
rdfs:Class all classes rdfs:Resource rdfs:Class
rdfs:Literal literal values rdfs:Resource rdfs:Class
rdfs:Datatype datatypes rdfs:Class rdfs:Class
rdf:XMLLiteral XML literal values rdfs:Literal rdfs:Datatype
rdf:Property properties rdfs:Resource rdfs:Class
rdf:Statement statements rdfs:Resource rdfs:Class
rdf:List lists rdfs:Resource rdfs:Class
rdfs:Container containers rdfs:Resource rdfs:Class
rdf:Bag unordered containers rdfs:Container rdfs:Class
rdf:Seq ordered containers rdfs:Container rdfs:Class
rdf:Alt containers of alternatives rdfs:Container rdfs:Class
rdf:_1... properties
expressing membership
rdf:Property rdfs:Class

RDFS classes

In RDFS a class may be an instance of a class. All resources are instances of the class rdfs:Resource. All classes are instances of rdfs:Class and subclasses of rdfs:Resource. All literals are instances of rdfs:Literal. All properties are instances of rdf:Property. The rdfs:subClassOf (subclass-of relation) and rdf:type (instance-of relation) for all RDFS classes are shown in the the table above.

Element Relates rdfs:domain rdfs:range
rdfs:range restricts subjects rdf:Property rdfs:Class
rdfs:domain restricts objects rdf:Property rdfs:Class
rdf:type instance of rdfs:Resource rdfs:Class
rdfs:subClassOf subclass of rdfs:Class rdfs:Class
rdfs:subPropertyOf subproperty of rdf:Property rdf:Property
rdfs:label human readable label rdfs:Resource rdfs:Literal
rdfs:comment human readable comment rdfs:Resource rdfs:Literal
rdfs:member container membership rdfs:Resource rdfs:Resource
rdf:first first element rdf:List rdfs:Resource
rdf:rest rest of list rdf:List rdf:List
rdf:_1, rdf:_2, ... container membership rdfs:Container rdfs:Resource
rdfs:seeAlso further information rdfs:Resource rdfs:Resource
rdfs:isDefinedBy definition rdfs:Resource rdfs:Resource
rdf:value for structured values rdfs:Resource rdfs:Resource
rdf:object object of statement rdf:Statement rdfs:Resource
rdf:predicate predicate of statement rdf:Statement rdfs:Resource
rdf:subject subject of of statement rdf:Statement rdfs:Resource

RDFS properties (all are instances of rdf:Property)

Properties in RDFS are relations between subjects and objects in RDF triples, i.e., predicates. The properties as defined by RDFS are listed in the table with RDFS properties. All properties may have defined domain and range. Domain of a property states that any resource that has given property is an instance of the class. Range of a property states that the values of a property are instances of the class. If multiple classes are defined as the domain and range then the intersection of these classes is used. Ranges and domains for RDFS properties are summarized in the table above. An example stating that the domain of hasSon property is Person and that the domain of the same property is Man follows:

    @prefix :        <http://www.example.org/sample.rdfs#> .
    @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#>.
    :hasSon rdfs:domain :Person;
            rdfs:range  :Man.

The taxonomy of classes is formed by property rdfs:subClassOf, taxonomy of properties is formed by property rdfs:subPropertyOf.

RDFS also defines one instance that is neither class nor property. This instance denotes empty list: rdfs:nil, see the table with the RDFS instance.

Element Meaning rdfs:type
rdfs:nil empty list rdf:List

RDFS instance

Previous - RDF Elements           Next - Web Ontology Language OWL

(c) Marek Obitko, 2007 - Terms of use