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

Re: RDF vocabulary definitions

From: Sandro Hawke <sandro@w3.org>
Date: Tue, 19 Nov 2002 12:32:54 -0500
Message-Id: <200211191732.gAJHWsH02642@roman.hawke.org>
To: Jeen Broekstra <jeen.broekstra@aidministrator.nl>
cc: Manne Miettinen <manne.miettinen@csc.fi>, 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.

While that's all true, the inputs have an identical RDFS closure [1].
That means they'll be treated the same by software which implements
RDFS inference.  When I use a term (such as rdfs:Class) in authoring
RDF documents, I generally assume my readers will "understand" it, and
that means they'll be doing RDFS inference.  Its true there may be
useful RDF processors which do not understand RDFS, but it's hard to
author thinking about all the possible partial-understandings.

      -- sandro

[1] http://www.w3.org/TR/rdf-mt/#rdfs_entail  (although I can't find
    my way through the rules to get the desired triple, it should be
    there.)
Received on Tuesday, 19 November 2002 12:33:31 GMT

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