Re: RDF API updates

Well...

the RDF Concepts say that Literals are compared character-by-character:-( So all your examples below represent, at least formally, different Literals. It does not speak about canonical form:

[[[
All literals have a lexical form being a Unicode [UNICODE] string, which SHOULD be in Normal Form C [NFC].
...
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.
]]]

That being said, I know the RDFLib, in this sense, is wrong insofar as it seems to merge some values (I have not checked all the details). Although the XSD document does talk about the canonical lexical form, the RDF spec does not...

Ivan

On Apr 24, 2011, at 15:42 , Nathan wrote:

> Ivan Herman wrote:
>> On Apr 24, 2011, at 15:01 , Nathan wrote:
>>> Ivan Herman wrote:
>>>> On Apr 23, 2011, at 17:29 , Nathan wrote:
>>>> So... where does it leave us? I believe that
>>>> 1. The Literal lexical value must be stored alongside the lexical-to-value-space mapping results
>>>> 2. Formally, the equality of literals should follow 6.5.1 above. But the API can be silent on that and simply refer to the right section of the RDF Concepts document
> 
> Question! :)
> 
> The lexical value.. is that:
> - the lexical form of the value
> - the canonical lexical form
> - the lexical form as found within the serialization at parse time (assuming there is one)
> 
> so are we saying that the following are all different for purposes of establishing equality?
> 
> "100"^^xsd:double
> "1E2"^^xsd:double
> "1e2"^^xsd:double
> "+100"^^xsd:double
> "+1E2"^^xsd:double
> "+1e2"^^xsd:double
> 
> 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.
> 
> Best,
> 
> Nathan


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Sunday, 24 April 2011 15:16:16 UTC