PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2851 *** shadow/2851 Fri Jul 27 01:31:02 2001 --- shadow/2851.tmp.25569 Fri Jul 27 01:31:02 2001 *************** *** 0 **** --- 1,41 ---- + +============================================================================+ + | xsl:sort does not sort locale-sensitive | + +----------------------------------------------------------------------------+ + | Bug #: 2851 Product: XalanJ2 | + | Status: NEW Version: 2.2.x | + | Resolution: Platform: All | + | Severity: Normal OS/Version: All | + | Priority: Other Component: org.apache.xalan.transf | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + xsl:sort does not sort according to the given language string (lang attribute + within xsl:sort tag). This happens (at least) due to a bug in the constructor + of NodeSortKey. The value of the lang attribute ("langValue") is used the + following way to instatiate a locale (since version 2.0.0): + + m_locale = new Locale(langValue.toUpperCase(), + Locale.getDefault).getDisplayCountry()); + + This is an error. The correct code would be + + m_locale = new Locale(langValue.toLowerCase(), + Locale.getDefault().getCountry()); + + Reason: + The constructor of Locale is defined as + public Locale(String language, String country) + with + language - lowercase two-letter ISO-639 code + country - uppercase two-letter ISO-3166 code + a) language must be provided as a lower-case ISO-code + instead of an upper-case code + b) country must be provided as an ISO-code + instead of a full localized country name (e.g. "France") + + Greetings, + Flo
