sort collations for Greek
Added by Anonymous over 17 years ago
Legacy ID: #4336909 Legacy Poster: CHY-Consultants (chy-consultants)
We are composing documents that, although they are translated to Greek, have some English technical terms in them. My index, as a result, has both Greek and English letters in it. Currently the English sorts to the beginning. We want it to sort to the end. Is there a way to make this change. We are running Saxon8 on a Unix platform (Java) Steve
Replies (1)
RE: sort collations for Greek - Added by Anonymous over 17 years ago
Legacy ID: #4337031 Legacy Poster: Michael Kay (mhkay)
In principle the answer is yes: you can write your own Java RuleBasedCollator class called say com.chy.CollateEnglishAfterGreek, and nominate it as your chosen collation using collation="http://saxon.sf.net/collation?class=com.chy.CollateEnglishAfterGreek" on the xsl:sort element (assuming this is XSLT). More details at http://www.saxonica.com/documentation/extensibility/collation.html Rather than writing a RuleBasedCollator from scratch, you might try writing a simpler Comparator that does a one-to-one substitution of characters to get them into an ordering where codepoint collation (or English language collation, or Greek language collation) will give acceptable results. Michael Kay Saxonica
Please register to reply