Project

Profile

Help

Bug #4040

Updated by Michael Kay over 5 years ago

Style guides for English generally recommend hyphenating numbers in the range 21-99, for example "twenty-two", "fifty-three". Saxon traditionally uses a space rather than a hyphen in these numbers. (This affects, for example, xsl:number and format-integer). 

 Both conventions are encountered in practice, especially in titles such as "Chapter Twenty Two". Even if the hyphenated style is more common, it wouldn't be a good idea for Saxon to change its output for compatibility reasons. 

 When we incorporated ICU for numbering, we retained the existing convention for compatibility, post-processing the ICU output to remove the hyphens. 

 The standards allow a language code to contain "extensions" of the form "x-variant", and I propose we use "x-hyphen" "x-hyphenated" (for example "en-x-hyphen" "en-x-hyphenated" or "en-GB-x-hyphen" to request hyphenation of numbers. This should work in both xsl:number and format-integer.

Back