While I'm at it, format-number() also contains a (rather serious) bug: format-number(17.957, '#.0') gives '17.10' as output instead of '18.0' robert