Re: "OR" in Schema spec


This is documented in 3.1.3 of the spec (below). Broadly, you need to
define the range of your property 'pet' to be some general class which
represents a superset of both cats and dogs. You might call this 'Pet'
(not different case convention).

eg.	pet -range-> Pet
	Cat -subClassOf->Pet
	Dog -subClassOf->Pet
	Poodle -subClassOf->Pet

Mammal might be a better example than "Pet" here but hopefully point is
clear. Excerpt from



	although it is not possible to express two or more range constraints on a
	property, a similar outcome can be achieved by defining a
        common superclass for any classes that represent appropriate
	values for some property. For example, to express the constraint that a
        property xyz:drivesMotorVehicle can have values which are Vans,
	Trucks or PassengerVehicles, we assert that
        xyz:drivesMotorVehicle has a rdfs:range of MotorVehicle. If Van,
	Truck and PassengerVehicle are known to be
        sub-classes of MotorVehicle, then all these types of resource
	are acceptable values for xyz:drivesMotorVehicle. In cases where a
        common super-class does not exist, one can be defined in a
	schema in the normal manner. 

On Wed, 5 May 1999, Milla Makelainen wrote:

> Hi,
> At the moment, it seems to be impossible to create an "OR" statement in RDF
> schema. This is because a property can only have one "range" property and
> can therefore belong only to one class. How can I write a schema that says
> for example that "a pet can be either a cat or a dog" and then have a list
> of different breeds of cats and dogs in different classes?
> Milla
> Milla Makelainen
> Smart Network Technology, Nortel Networks
> email:
> tel. +44 (0) 1279 403270
> mobile +44 (0) 780 149 5538
> -- "Wisdom is being able to cope"
> This message may contain information proprietary to Nortel Networks, so any
> unauthorised disclosure, copying or distribution of its contents is strictly
> prohibited.

Received on Wednesday, 5 May 1999 12:57:12 UTC