W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > October 2005

Re: Comments on SPARQL from the XML Query and the XSL WGs (decimal syntax)

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
Message-Id: <1129306901.19638.16.camel@dirk>

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
]] --

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.

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)


J Revision Log (Non-Normative)

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:52:06 UTC