W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2001

Re: "If" and "else" in RDF

From: James Tauber <jtauber@jtauber.com>
Date: Sat, 28 Apr 2001 10:43:43 -0400
Message-ID: <00d001c0cff1$a2c5bdb0$11030a0a@EHUD>
To: <info@jan-winkler.de>, <www-rdf-interest@w3.org>
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 GMT

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