W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2004

RE: [XPath] Duration times number

From: Michael Rys <mrys@microsoft.com>
Date: Mon, 29 Mar 2004 15:28:42 -0800
Message-ID: <EB0A327048144442AFB15FCE18DC96C7027709F0@RED-MSG-31.redmond.corp.microsoft.com>
To: "Ashok Malhotra" <ashokma@microsoft.com>, "Michael Kay" <mhk@mhk.me.uk>, <public-qt-comments@w3.org>

Doesn't the mapping to an op: function trigger the promotion rules?

Thanks
Michael

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of Ashok Malhotra
> Sent: Monday, March 29, 2004 2:21 PM
> To: Michael Kay; public-qt-comments@w3.org
> Subject: RE: [XPath] Duration times number
> 
> 
> Mike:
> I made the same point in my mail
> http://lists.w3.org/Archives/Member/w3c-xsl-query/2004Mar/0075.html
> on 3/11.  It seems to me that we need numeric promotion rules for
> operators
> just like we have for functions.
> 
> All the best, Ashok
> 
> -----Original Message-----
> From: public-qt-comments-request@w3.org
> [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay
> Sent: Monday, March 29, 2004 1:26 PM
> To: public-qt-comments@w3.org
> Subject: [XPath] Duration times number
> 
> 
> 
> According to the current spec (12 Nov 2003 public draft as well as 25
> March
> 2004 internal draft) the following is a type error:
> 
> xs:yearMonthDuration("P2Y") * 2
> 
> Multiplication of a duration by a double is allowed, but not by an
> integer.
> There is no rule anywhere that causes the integer to be promoted to an
> xs:double in this situation.
> 
> This is clearly an oversight.
> 
> Michael Kay
Received on Monday, 29 March 2004 19:33:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:07 GMT