[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML Schema union type is evil (for XPath 2.0 proc
or more naturally just if (quantity ='out-of-stock') then 'Bummer' If the typed value of quantity is an integer, then this comparison will fail with a type error. You could protect yourself by If (string(quantity) = 'out-of-stock')) My own preference was that "=" should return false (rather than error) when comparing to incomparable values; but the strong typists carried the day. There are other functions where you do get the "false" behaviour, and you can exploit this: If (deep-equal(quantity, 'out-of-stock')) ... Apologies for the rogue capitalisation, I'm using a reinstalled Outlook, and I haven't worked out how to switch off Microsoft's random-error-generation software. 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
|