W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > April 2011

Re: RDF API updates

From: Ivan Herman <ivan@w3.org>
Date: Sun, 24 Apr 2011 19:41:11 +0200
Message-Id: <80EE9122-A12F-4D3C-BE28-DF0F4A37E4CF@w3.org>
Cc: Shane McCarron <shane@aptest.com>, "public-rdfa-wg@w3.org" <public-rdfa-wg@w3.org>
To: "nathan@webr3.org" <nathan@webr3.org>

On 24 Apr 2011, at 19:33, Nathan <nathan@webr3.org> wrote:

> Shane McCarron wrote:
>> On 4/24/2011 8:42 AM, Nathan wrote:
>>> Also, just what do we do about literals people are creating? for example:
>>> 
>>>  createLiteral(100, "xsd:double");
>>>  createLiteral(10*10, "xsd:double");
>>>  createLiteral(1e2, "xsd:double");
>>>  createLiteral(+1e2, "xsd:double");
>>>  createLiteral(+100, "xsd:double");
>>> 
>>> All of those values are of the type (number) in javascript and have the same value "100" with no access to the original form.
>> To my mind all those are the same.  There is nothing we *can* do.  If you want to put in a note to that effect, it might be reasonable.
> 
> Yes they are all the same, so I guess I'm saying that it feels a little strange to have:
> 
>  createLiteral(100, "xsd:double").equals( createLiteral(+1e2, "xsd:double") ) === TRUE
> 
> whilst if the original source was say turtle, then they would not be considered equal, seems like unexpected functionality to me.
> 
> Back to reality, just what do we write in the RDF API specification?
> 
> - keep it as is, which appears to work, afaict - compare value if you know the datatype, else compare lexical form
> 
> - change to read something like "equality is defined by RDF <link> here"
> 

This is the same discussion as before... We define an API to RDF. We should not define a different form of equality; instead, refer to the relevant RDF spec.

Ivan



> - something else?
> 
> Best,
> 
> Nathan
Received on Sunday, 24 April 2011 17:39:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:09 GMT