Bug #4040
closedHyphenation of spelled-out English numbers
100%
Description
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" (for example "en-x-hyphen" or "en-GB-x-hyphen" to request hyphenation of numbers. This should work in both xsl:number and format-integer.
Updated by Michael Kay over 5 years ago
- Status changed from New to Resolved
- Applies to branch 9.9 added
- Fix Committed on Branch 9.9 added
The goal of backwards compatibility turns out to be made more tricky by the fact that ordinal numbering is currently incompatible depending on whether ICU is used. With Saxon-HE, we currently get "twenty-third", with EE, we get "twenty third".
So I'll introduce "en-x-nohyphen" to force the use of space as separator, and if neither is specified, it continues to behave inconsistently.
I have committed the change on the 9.9 branch, and have updated the documentation on the trunk.
Updated by Debbie Lockett over 5 years ago
Documentation change copied from trunk to 9.9 branch (and from src/extensibility/locales-ICU-numbering.xml, to its generating stylesheet style/document-ICU.xsl).
[Online documentation to be updated with next maintenance release.]
Updated by O'Neil Delpratt over 5 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.9.1.1 added
Bug fix applied to the Saxon 9.9.1.1 maintenance release.
Updated by O'Neil Delpratt over 5 years ago
- Status changed from Resolved to Closed
Please register to edit this issue