- From: Ivan Herman <ivan@w3.org>
- Date: Sun, 24 Apr 2011 19:41:11 +0200
- To: "nathan@webr3.org" <nathan@webr3.org>
- Cc: Shane McCarron <shane@aptest.com>, "public-rdfa-wg@w3.org" <public-rdfa-wg@w3.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 UTC