W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2002

Re: RDF vocabulary definitions

From: Jeen Broekstra <jeen.broekstra@aidministrator.nl>
Date: Tue, 19 Nov 2002 16:23:36 +0100
Message-ID: <3DDA5778.6080907@aidministrator.nl>
To: Manne Miettinen <manne.miettinen@csc.fi>
CC: www-rdf-interest@w3.org

Manne Miettinen wrote:

 > Here's a beginners' question, please tolerate...
 >
 > I would like to know what is the difference between rdfs:Class and
 > rdf:Description when defining a class in my own RDF vocabulary. Are
 > the following two class definitions equivalent?
 >
 > <rdfs:Class rdf:ID="MyClass">
 >   <rdfs:subClassOf
 >    rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
 > </rdfs:Class>
 >
 > <rdf:Description rdf:ID="MyClass">
 >   <rdf:type
 >    rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
 > </rdf:Description>

No, these are not equivalent. It becomes easier when you try to take
into account which triples an RDF parser would produce from the above
syntax.

The first one produces these two triples:

<_:MyClass> <rdf:type> <rdfs:Class>
<_:MyClass> <rdfs:subClassOf> <rdfs:Class>

The second one produces just this one triple:

<_:MyClass> <rdf:type> <rdfs:Class>

As an aside, I'm not quite sure why you would want the subClassOf
statement in the first example, it's not forbidden but certainly awkward
modeling.

Going back to XML syntax, the <rdfs:Class> element is just a shorthand
notation for stating that the description being given is of type
rdfs:Class. So the following two definitions _are_ equivalent:

<rdfs:Class rdf:ID="MyClass"/>

<rdf:Description rdf:ID="MyClass">
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
</rdf:Description>

Hope that helps.

Best regards,

Jeen
-- 
jeen.broekstra@aidministrator.nl
aidministrator nederland bv - http://www.aidministrator.nl/
julianaplein 14b, 3817 cs amersfoort, the netherlands
tel. +31-(0)33-4659987, fax. +31-(0)33-4659987
Received on Tuesday, 19 November 2002 10:24:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:57 GMT