RE: [XPath] Duration times number

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 UTC