[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: typing of integer operations in Xpath2
> -----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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|