[xquery-talk] type of 1.2 div 1.2?
Michael Kay
mhk at mhk.me.uk
Tue Mar 22 20:29:33 PST 2005
The result should definitely be of type xs:decimal.
There's some debate about whether it's permissible to return a subtype of
xs:decimal, e.g. xs:integer or my:veryShortInteger; but returning xs:double
is not on.
(Unless this is actually an XPath processor with 1.0 compatibility mode
enabled).
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: talk-bounces at xquery.com
> [mailto:talk-bounces at xquery.com] On Behalf Of Howard Katz
> Sent: 22 March 2005 18:44
> To: talk at xquery.com
> Subject: [xquery-talk] type of 1.2 div 1.2?
>
> What's the type and value of the single atomic returned by the query:
>
> 1.2 div 1.2
>
> I'm looking at different implementations. I see one returning an
> xsd:decimal, value 1 as a result (my understanding as well).
> I see another
> treating the data as untyped and doing two conversions to
> xsd:double first,
> again returning a value of 1 but this time of type xsd:double.
>
> Which one is correct?
> Howard
>
>
>
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
>
More information about the talk
mailing list