RE: [xsl] typing of integer operations in Xpath2

Subject: RE: [xsl] typing of integer operations in Xpath2
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Tue, 20 Apr 2004 22:45:06 +0200
> -----Original Message-----
> From: David Carlisle [mailto:davidc@xxxxxxxxx]


Hi,

> In my stylesheet all input values
> are integers and the only operations I use are:
>  + - idiv min max and sum.
>

Ouch!
Currently the XQuery1.0/XPath2.0 function specs of the latter three all
share one line:

> 15.3.3 fn:max
> ...
> Any values of type xdt:untypedAtomic in the sequence $arg are cast to
xs:double.

> 15.3.4 fn:min
> ...
> Any values of type xdt:untypedAtomic in $arg are cast to xs:double.

> 15.3.5 fn:sum
> ...
> Any values of type xdt:untypedAtomic in $arg are cast to xs:double.

Maybe there's your bugger (?) However, this only seems to go for the input
sequence. If the implementation opts to use the cast type for the output as
well... It doesn't seem to be an explicit no-go, but the examples do seem to
indicate that one may reasonably expect these to be the 'original' type
(--untypedAtomic?), unless asked for by explicitly adding an xs:double to
the sequence.

All with you on this one!


Cheers,

Andreas

Current Thread