Casting to xs:integerMartin Probst martin at x-hive.com
Mon Feb 27 18:46:21 PST 2006
Hi, 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 dropped. 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? Martin
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