- From: Dan Connolly <connolly@w3.org>
- Date: Fri, 14 Oct 2005 11:21:41 -0500
- To: ashok.malhotra@oracle.com
- Cc: public-rdf-dawg-comments@w3.org, w3c-xsl-query@w3.org
On Tue, 2005-09-13 at 08:28 -0700, Ashok Malhotra wrote:
> Notes on SPARQL Query Language for RDF
> Last Call Draft July 21, 2005
[...]
> 7. Section 3. Decimal values cannot be written as literals. This seems like a
> needless limitation. Suggest SPARQL use the literal definitions in XPath 2.0.
First, I'm not sure if you noticed the ^^ syntax:
[[
Examples of literal syntax in SPARQL include:
* "chat"
* "chat"@fr with language tag "fr"
* "xyz"^^<http://example.org/ns/userDatatype>
* "abc"^^myNS:myDataType
* 1, which is the same as "1"^^xsd:integer
* 1.0e6, which is the same as "1.0e6"^^xsd:double
* true, which is the same as "true"^^xsd:boolean
* false, which is the same as "false"^^xsd:boolean
]] --
http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050721/#rdfliterals
I hope it's clear from there that decimal values can be
written as literals: "3.4"^^xsd:decimal .
If you're aware of that and you're asking that we change
SPARQL so that 3.4 is parsed as a decimal...
As of the July last call draft, SPARQL follows turtle, N3, python, Java,
javascript, php, C etc. in parsing that as a double.
In fact, XPath 1 does as well.
http://www.w3.org/TR/1999/REC-xpath-19991116#numbers
I'm mildly surprised to learn that this has changed in XPath 2.0.
I expect you have documented the reasons for this change, but I'm
having trouble finding it.
I don't see it in
I Backwards Compatibility with XPath 1.0 (Non-Normative)
http://www.w3.org/TR/2005/WD-xpath20-20050915/#id-backwards-compatibility
nor
J Revision Log (Non-Normative)
http://www.w3.org/TR/2005/WD-xpath20-20050915/#id-revisions-log
Could you help me find rationale for the change in XPath?
--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541 0875 0F91 96DE 6E52 C29E
Received on Friday, 14 October 2005 16:22:11 UTC