[F&O] IBM-FO-039: Argument types in max and min

(IBM-FO-039): Sections 15.3.3 (fn:max) and 15.3.4 (fn:min): These sections 
say that "$arg must contain only items of a single type or one of its 
subtypes for which the gt operator is defined." This would seem to prevent 
(for example) finding the max of two values of type xs:long and xs:short, 
even they are both derived from xs:integer which has a gt operator. It 
would also prevent finding the max of two values whose types are both 
derived from xs:string. I do not think this is intended. I think you mean 
to say that "all the items in $arg must either be numeric or be derived 
from a common base type that has a gt operator." Similarly, Section 15.3.5 
(fn:sum) says that "The input sequence must contain items of a single type 
or one of its subtypes." Again, this would prevent finding the sum of two 
values of type xs:long and xs:short. The rule should be restated to accept 
all numeric values.

--Don Chamberlin

Received on Thursday, 4 March 2004 08:59:18 UTC