[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: typing of integer operations in Xpath2

Subject: RE: typing of integer operations in Xpath2
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Tue, 20 Apr 2004 22:45:06 +0200
xsl fn max
> -----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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.