- From: Jeen Broekstra <jeen.broekstra@aidministrator.nl>
- Date: Tue, 19 Nov 2002 16:23:36 +0100
- 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 UTC