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

Enumerations

From: Tom Van Eetvelde <tom.van_eetvelde@alcatel.be>
Date: Tue, 26 Sep 2000 14:50:02 +0200
Message-ID: <39D09B7A.C7F86CF5@alcatel.be>
To: Graham Klyne <GK@dial.pipex.com>, Ray Fergerson <fergerson@SMI.Stanford.EDU>, rdf interest <www-rdf-interest@w3.org>, Mor Peleg <peleg@SMI.Stanford.EDU>, Gerard Maas <gerard.maas@alcatel.be>, Erik De Blieck <Erik.De_Blieck@alcatel.be>
Hello RDF comunity,

I did some more thinking as I was not pleased with my own proposal to implement an enumeration of days.

The core problem, I think, is the fact that the 'range' property only accepts classes. When validating
(or maybe better: typechecking), only instances of those classes may appear. This means that literals
can never be used as the instance must be typed, which means that it is a resource (with a 'type'
property)! This questions the use of literals in the RDF schema model. Literals can only be used for the
moment with properties that are not restricted in range. This makes the example 1 of the RDF M&S a bit
akward: what you would like to use is the following:

<s:Person rdf:ID="Mike">
    <s:maritalstatus> Single </s:maritalstatus>
</s:Person>

and not (the way we have to formulate it now):

<s:Person rdf:ID="Mike">
    <s:maritalstatus rdf:resource="Single"/>
</s:Person>

I currently believe that the most elegant way to introduce enumerations is to define a new
constraintproperty instance: 'literalRange'. This constraintproperty can only have 'bag' instances as
value.

Continuing the 'days' example then: make a bag with all the days that you need. Make your property that
you want to see restricted to days and add to this property the literalRange = days bag. When making an
RDF instance using the defined property, the type checker can search for the filled-in value in the bag.
If it is in, validation = ok, else nok.

Conclusion: the current defined 'RDF keywords' do not suffice to capture all kinds of behaviour that the
user wants. The current framework doesn't really support the use of literals when it comes to type
checking.

Greetings,

Tom.

Received on Tuesday, 26 September 2000 08:51:57 GMT

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