W3C home > Mailing lists > Public > public-awwsw@w3.org > March 2008

Re: plain literals without language tag compare xsd:string in RDF

From: Pat Hayes <phayes@ihmc.us>
Date: Mon, 10 Mar 2008 12:19:08 -0500
Message-Id: <p06230901c3fb1cd010f8@[]>
To: Alan Ruttenberg <alanruttenberg@gmail.com>
Cc: "Williams, Stuart (HP Labs, Bristol)" <skw@hp.com>, "public-awwsw@w3.org" <public-awwsw@w3.org>, "Carroll, Jeremy John" <jeremy.carroll@hp.com>

At 10:06 AM -0500 3/8/08, Alan Ruttenberg wrote:
>This would seem to be at odds with the RDFS documentation:
>6.5.1 Literal Equality
>Two literals are equal if and only if all of the following hold:
>  - The strings of the two lexical forms compare equal, character by character.
>  - Either both or neither have language tags.
>  - The language tags, if any, compare equal.
>  - Either both or neither have datatype URIs.
>  - The two datatype URIs, if any, compare equal, character by character.
>In this case, the 4th clause is violated.

Its a delicate point, but you have to distinguish between two 
literals being the SAME LITERAL (which is what the above is about) 
and two literals DENOTING THE SAME VALUE (which is what Jeremy is 
talking about, below). In the RDF semantics, a plain literal both is, 
and denotes, a character string; and an xsd:string-typed literal 
denotes a character string, but IS something different.

Unfortunately, we say 'equal' in both cases, even though in one case 
we are talking about syntactic identity and in the other about the 
truth of an equation

<literal> = <literal'>

ie about semantic identity, ie denoting (rather than being) the same value.


>On Mar 7, 2008, at 10:31 AM, Williams, Stuart (HP Labs, Bristol) wrote:
>>I raised you question with my colleague, Jeremy Carrol (Cc'd) who 
>>responded as follows:
>>They are identical
>>"foo" owl:sameAs "foo"^^xsd:string .
>>is necessarily true.
>>as recorded in the RDF Test Cases doc
>>In a further exchange he also confirmed/clarified that it is 
>>neccessarily the case that:
>>         "1234" owl:sameAs "1234"^^xsd:string .
>>ie. (I think) that means that:
>>         "1234" owl:sameAs "1234"^^xsd:integer .  ## or some other 
>>numeric datatype.
>>is necessarily false (which is what I would expect).
>>Hewlett-Packard Limited registered Office: Cain Road, Bracknell, 
>>Berks RG12 1HN
>>Registered No: 690597 England
>>>-----Original Message-----
>>>From: public-awwsw-request@w3.org
>>>[mailto:public-awwsw-request@w3.org] On Behalf Of Alan Ruttenberg
>>>Sent: 04 March 2008 15:29
>>>To: Pat Hayes
>>>Cc: public-awwsw@w3.org
>>>Subject: plain literals without language tag compare xsd:string in RDF
>>>Is there any utility to having these being disjoint classes?
>>>It would seem to me that it would be more sensible to say
>>>that any string that doesn't have a  language type or a
>>>datatype is inferred to be of type xsd:string.
>>>Did this situation come about because it was easier to make
>>>the RDF semantics look cleaner, or was there some principled
>>>reason for making the distinction?

IHMC		(850)434 8903 or (650)494 3973   home
40 South Alcaniz St.	(850)202 4416   office
Pensacola			(850)202 4440   fax
FL 32502			(850)291 0667    cell
http://www.ihmc.us/users/phayes      phayesAT-SIGNihmc.us
Received on Monday, 10 March 2008 17:19:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:06 UTC