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

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

From: Dan Connolly <connolly@w3.org>
Date: Mon, 22 Feb 2010 08:42:31 -0600
To: Pat Hayes <phayes@ihmc.us>
Cc: Story Henry <henry.story@bblfish.net>, Semantic Web <semantic-web@w3.org>, foaf-protocols@lists.foaf-project.org
Message-ID: <1266849751.7402.212.camel@pav.lan>
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.

> > 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".

or:

:x :dollarValue 1234.



-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
gpg D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Monday, 22 February 2010 14:42:35 GMT

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