RDF Schema (RDFS)

RDF Schema (RDFS) is an extension of RDF.

RDF Schema and Application Classes

RDF describes resources through classes, properties, and values.

In addition, RDF also needs a method to define application-specific classes and properties. Application-specific classes and properties must be defined using extensions to RDF.

RDF Schema is such an extension.

RDF Schema (RDFS)

RDF Schema does not provide actual application-specific classes and properties, but provides a framework for describing application-specific classes and properties.

The classes in RDF Schema are very similar to those in object-oriented programming languages. This allows resources to be defined as instances of classes and subclasses of classes.

RDFS Instance

The following example demonstrates some aspects of the capabilities of RDFS:

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base=  "http://www.animals.fake/animals#">
<rdf:Description rdf:ID="animal">
  <rdf:type 
   rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>
<rdf:Description rdf:ID="horse">
  <rdf:type
   rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
  <rdfs:subClassOf rdf:resource="#animal"/>
</rdf:Description>
</rdf:RDF>

In the above example, the resource "horse" is a subclass of the class "animal".

Shortened Example

Since a RDFS class is a RDF resource, we can shorten the above example by using rdfs:Class instead of rdf:Description and omitting the rdf:type information:

<?xml version="1.0"?>
<rdf:RDF 
xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xml:base=  "http://www.animals.fake/animals#">
<rdfs:Class rdf:ID="animal" />
<rdfs:Class rdf:ID="horse">
  <rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
</rdf:RDF>

Just like that!