Project

Profile

Help

Bug #4194

closed

CollationKey for AlphanumericCollator always does codepoint collation

Added by Michael Kay about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Localization
Sprint/Milestone:
-
Start date:
2019-04-09
Due date:
% Done:

100%

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

Description

At some point the alphanumeric collator (which, for example, sorts "Chap2" before "Chap10") was enhanced so that the non-numeric parts could be compared using some base collation, rather than always being compared using codepoint collation. However, AlphanumericCollator.getCollationKey() returns a collation key that assumes codepoint collation for the non-numeric parts.

Actions #1

Updated by Michael Kay about 3 years ago

I have created a new test in xslt30extra, collation-007, to test this; there was indeed a bug and it is now fixed.

Along the way, I found that collation URIs of the form

http://saxon.sf.net/collation/alphaNumeric?base=<some-other-collation>

are partially implemented but not actually working; it's a simple bug, but since the feature is undocumented and untested and is in any case superseded by proper UCA collations, I'm going to fix the bug on the 9.9 branch without documenting the feature, and on 10.0 I shall withdraw it.

The collation used in the test is

http://saxon.sf.net/collation?alphanumeric=yes;ignore-case=yes

which should give the same collation key for "chap001" and "CHAP1"

Actions #2

Updated by Michael Kay about 3 years ago

  • Category set to Localization
  • Status changed from New to Resolved
  • Priority changed from Low to Normal
  • Applies to branch 9.9, trunk added
  • Fix Committed on Branch 9.9, trunk added
Actions #3

Updated by O'Neil Delpratt about 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.3 added

Bug fix applied to the Saxon 9.9.1.3 maintenance release

Please register to edit this issue

Also available in: Atom PDF