Project

Profile

Help

Bug #4040

closed

Hyphenation of spelled-out English numbers

Added by Michael Kay over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Localization
Sprint/Milestone:
-
Start date:
2018-11-20
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
9.9
Fixed in Maintenance Release:
Platforms:

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.

Please register to edit this issue

Also available in: Atom PDF