W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2008

[Bug 5617] [F&O] Summary of numeric-unary-plus

From: <bugzilla@farnsworth.w3.org>
Date: Wed, 02 Apr 2008 14:24:43 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Jh3tL-0004XY-PI@farnsworth.w3.org>





------- Comment #1 from mike@saxonica.com  2008-04-02 14:24 -------
Personal response: this description of the "backing function" needs to be read
in conjunction with B.2 in the XPath language spec, which makes it clear that
when the argument in the op: function signature is given as 

op:numeric-unary-plus($arg as numeric) as numeric

should be read as four function signatures, one of which is

op:numeric-unary-plus($arg as xs:integer) as xs:integer

and therefore the only guarantee if the operand is an xs:int is that the result
is an xs:integer. 

I agree, however, that the spec could be clarified.

I seem to recall (but cannot locate) similar comments on fn:abs() which states
"If $arg is negative returns -$arg otherwise returns $arg." - its not really
clear whether this allows you to return the xs:integer 3 if the supplied
argument is the xs:int 3. 
Received on Friday, 4 April 2008 09:59:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:22 UTC