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

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 UTC