Re: "If" and "else" in RDF

Your second example is getting there.

I'd define a class called 'Gender' with two instances 'Male' and 'Female'
and a property 'address' whose domain is 'Gender' and whose range is
Literal.

<rdfs:Class id="Gender" rdfs:label="Gender"/>
<rdf:Property id="address" rdfs:domain="#Gender"
rdfs:range="http://www.w3.org/2000/01/rdf-schema#Literal"/>

<Gender id="Male">
   <rdfs:label>Male</rdfs:label>
   <address>Mr</address>
</Gender>

James

----- Original Message -----
From: "Jan Winkler" <jan_wi@jan-winkler.de>
To: <www-rdf-interest@w3.org>
Sent: Saturday, April 28, 2001 8:13 AM
Subject: "If" and "else" in RDF


> Hello group.
>
> I was wondering why there is nothing like "if" or "else" (or
> something) in RDF to express differences between things. For example
> to express that, if a person is male, he should be addressed with
> 'Mr.' else with 'Mrs.'. Maybe something like that:
>
> xmlns="mysite.com/myspec#"
>
> <gender>
>  <can-be value="male"/>
>  <can-be value="female"/>
> </gender>
> <if object="gender" has-value="male" />
> <then>
>  <address value="Mr."/>
> </then>
> <else>
>  <address value="Mrs."/>
> </else>
>
> I think, I've to do it like that ...
> <gender>
>  <can-be value="male" address="Mr."/>
>  <can-be value="female" address="Mrs."/>
> </gender>
>
> So, my questions are:
> 1) Why is there nothing like if and else?
> 2) Is the second example correct? - If not: How could I express this
> thing?
>
> Thanks,
> Regards,
> Jan Winkler.
> -----------
> Jan Winkler
> Berlin.
>
> info@jan-winkler.de
> http://www.jan-winkler.de
>

Received on Saturday, 28 April 2001 10:40:05 UTC