RDF Schema

RDF Schema (RDFS) is an extension of the RDF.


RDF Schema classes and applications

RDF to describe resources through classes, attributes and values.

In addition, RDF is also a need for a specialized application method defined classes and properties. Application-specific classes and properties must be used to define extensions to RDF.

RDF Schema is such an extension.


RDF Schema (RDFS)

RDF Schema does not provide a practical application-specific classes and attributes, but provides the framework described in the application-specific classes and attributes.

RDF Schema Classes and object-oriented programming language classes are very similar. This allows resources to be used as a subclass instance and class to be defined.


RDFS examples

The following example demonstrates the ability of certain aspects 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 the class "animal" subclasses.


Shorthand examples

Since a class is a RDFS RDF resources, we can use rdfs: Class substituted rdf: Description, and remove rdf: type information to look at the example above shorthand:

<?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>

That's it!