[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: testing for string and number in XSLT 2.0 was Re:
> y variable value(so we know we are selecting it): 3123123 > Test y as string:true > Test y as integer:true > > back to my original question, how can I test if a value is a string or > integer (with the very real constraint of data not being > explicitly typed). > If the data is untyped then ($x castable as xs:string) will always be true. If the string consists of digits then ($x castable as xs:integer) will also be true, as your experiments show. Michael Kay http://www.saxonica.com/
|
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
|