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

On Mon, 2010-02-22 at 13:50 -0600, Pat Hayes wrote:
> 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.

I don't think so. I'm pretty sure the 2004 specs are silent on the
use of datatypes as properties. Both directions are consistent
semantic extensions.


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

I'm pretty sure it's not specified either way.

> > or:
> >
> > :x :dollarValue 1234.
> 
> Um... is that legal RDF?

It's a turtle abbreviation for
  :x :dollarValue "1234"^^xsd:integer.

http://www.w3.org/TeamSubmission/turtle/#abbrev

-- 
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 20:31:31 UTC