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

Re: RDF API updates

From: Nathan <nathan@webr3.org>
Date: Sun, 24 Apr 2011 18:33:59 +0100
Message-ID: <4DB45F07.9030707@webr3.org>
To: Shane McCarron <shane@aptest.com>
CC: public-rdfa-wg@w3.org, Ivan Herman <ivan@w3.org>
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"

- something else?

Best,

Nathan
Received on Sunday, 24 April 2011 17:35:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:51 UTC