W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2000

Re: Enumerations

From: Tom Van Eetvelde <tom.van_eetvelde@alcatel.be>
Date: Wed, 27 Sep 2000 14:10:30 +0200
Message-ID: <39D1E3B6.125B8127@alcatel.be>
To: Mark Grossman <msg@geocast.com>
CC: rdf interest <www-rdf-interest@w3.org>
Hello Mark,

It is not only a matter of syntax.

I could easily fool the current system by writing:

 <s:maritalstatus rdf:resource="Nonsense"/>

The parser looks at the type of the resource, which is 'maritalstatus' and is satisfied. It cannot
check if Nonsense really is intended to be a correct instance of the class MaritalStatus. In order
to do this, it has to run through x amount of schema's to look for all allowed instances of
maritalstatus.
When using bags for your enumerations, all allowed elements are bundled. The RDF supports bag
elements easier than class instances. Just look at the graph picture: get me all bag elements is
just following the 'li' arcs to their values. Get me all class instances is starting from the
classtype and reversing all arc arrows. Class instances have more chance of being scattered around
then bag elements.

What is more: if you are always going to hang types to property values, then you might as well say
goodbye to Literals as they will never be used anymore. I believe sets of literals should not always
be encapsulated in a class. This looks a bit unnatural sometimes.

If you want a person to make a choice out of getting: a car, a travel ticket, a movie, a new
haircolour. Are you going to stuff al these choices in a class? I guess not. I think you just want a
wrapper called 'Choices' and paste all the elements in it. When creating classes, you focus on
objects sharing some property. You could always look for some artificial link between the elements
of Choices and use this as an argument to create a class, but then again, that smells like an
unnatural implementation. It even gets messier if the elements of 'Choices' are classes themselves.

The latter is the fundamental reason why I was looking for a natural implementation of enumerations
(which also supports enumerations of classes and even classes/Literal mixes). This is just my
opinion of course.

regards,

Tom.

Mark Grossman wrote:

> Making enumerants be members of a class seems like the perfect application of existing RDFS
> constructs, and I don't see the syntax
>
>    <s:maritalstatus rdf:resource="Single"/>
>
> any more burdensome than
>
>    <s:maritalstatus>Single</s:maritalstatus>
>
>    -- Mark
>
>

Received on Wednesday, 27 September 2000 08:16:31 GMT

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