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/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--