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

Hi Dan:
I did notice the ^^ syntax.

The comment was for compatibility with XQuery/XPath.
I, too, am not sure what the rationale for parsing 3.4 
as a decimal instead of a double was but I remember it 
came from XQuery.  Mike Kay has argued that this was a
good decision as you get decimal arithmetic, where you can,
instead of floating-point arithmetic.

All the best, Ashok
 

> -----Original Message-----
> From: w3c-xsl-query-request@w3.org 
> [mailto:w3c-xsl-query-request@w3.org] On Behalf Of Dan Connolly
> Sent: Friday, October 14, 2005 9:22 AM
> To: ashok.malhotra@oracle.com
> Cc: public-rdf-dawg-comments@w3.org; w3c-xsl-query@w3.org
> Subject: Re: Comments on SPARQL from the XML Query and the 
> XSL WGs (decimal syntax)
> 
> 
> 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-co
mpatibility
> 
> 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 17:29:41 UTC