[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Casting to xs:integer

Martin Probst martin at x-hive.com
Mon Feb 27 18:46:21 PST 2006

xs integer

I know I should know this, but I really have a difficult time wrapping
my head around the typing and casting system in XQuery.

When casting a value to an xs:integer, the spec says that in the case of
decimal, float and double source values, non-fractional parts are

However the section "Casting from xs:string" says "The resulting
whitespace-normalized string must be a valid lexical form for the
datatype.". So:

5.3 castable as xs:integer => true
"5.3" castable as xs:integer => false
"5" castable as xs:integer => true

Am I right with that?



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.
First Name
Last Name
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.