W3C home > Mailing lists > Public > semantic-web@w3.org > February 2010

Re: how to define that a relation is a dataype?

From: Pat Hayes <phayes@ihmc.us>
Date: Mon, 22 Feb 2010 13:50:40 -0600
Cc: Story Henry <henry.story@bblfish.net>, Semantic Web <semantic-web@w3.org>, foaf-protocols@lists.foaf-project.org
Message-Id: <BC4A1619-28D4-4DC9-B951-51CE5D517DF3@ihmc.us>
To: Dan Connolly <connolly@w3.org>

On Feb 22, 2010, at 8:42 AM, Dan Connolly wrote:

> On Sun, 2010-02-21 at 23:57 -0600, Pat Hayes wrote:
>> On Feb 21, 2010, at 6:15 PM, Story Henry wrote:
>>
>>> I have a relation :hex defined as
>>>
>>> @prefix : <http://www.w3.org/ns/auth/cert#> .
>>>
>>> :hex a owl:DatatypeProperty,
>>>     owl:InverseFunctionalProperty;
>>>   rdfs:label "hexadecimal"@en;
>>>   rdfs:domain :Integer;
>>>   rdfs:range :String;
>>>   vs:term_status "unstable" .
>>>
>>> This relates a number to a string.
>>
>> Fair enough. But be clear: that is *not* a datatype. It is the  
>> inverse
>> of a datatype mapping, in fact. Datatypes always map FROM strings TO
>> values.
>
> That's completely arbitrary; it makes just as much sense to adopt
> the opposite convention.

Except that RDF already used this one. Its not completely arbitrary,  
but in any case its set in stone now.

>
>>> 1234 :base64 "TU";
>>>    :hex "4D2";
>>>    :dec "1234";
>>>    :oct "2322";
>>>    :bin "11010010" .
>>
>> You could, but by using properties from values to strings, you have
>> kind of shot yourself in the foot.
>
> How so? This works just fine, in my experience.
>
>>> if this WERE equivalent to the two relations:
>>>
>>> :x :dollarValue "1234".
>>> "1234" xsd:int 1234 .
>>
>> No, its certainly not. The literal denotes the value, not the string.
>> So the right way to split that up into two triples would be
>>
>> :x :dollarValue :y .
>> "1234" xsd:int :y .
>
> or:
>
> :x :dollarValue _:y.
> _:y xsd:int "1234".

That will get you an immediate domain/range error. Well, it should.  
The range of xsd:int is numbers, not strings.

>
> or:
>
> :x :dollarValue 1234.

Um... is that legal RDF?

Pat

>
>
>
> -- 
> Dan Connolly, W3C http://www.w3.org/People/Connolly/
> gpg D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
>
>

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes
Received on Monday, 22 February 2010 19:51:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:34 GMT