View Single Post
  #5 (permalink)  
Old January 5th, 2010, 10:22 AM
bonekrusher bonekrusher is offline
Friend of Wrox
Points: 1,676, Level: 16
Points: 1,676, Level: 16 Points: 1,676, Level: 16 Points: 1,676, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2006
Location: , , .
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Sam,

Great link. I created a class to do the custom sorting for Saxon:

here is a copy if any needs one:

Code:
package xsltcollations;

import java.text.ParseException;
import java.text.RuleBasedCollator;

public class RomanNumeralCollation extends RuleBasedCollator {

    public RomanNumeralCollation() throws ParseException {
        super(romanNumerals);
    }

    private static String romanNumerals = ("< I < II < III < IV < V < VI< VII <" +
            "VIII < IX <X <XI <XII <XIII <XIV <XV <XVI <XVII <XVIII <XIX <XX" +
            " < XXI < XXII < XXIII < XXIV < XXV < XXVI < XXVII < XXVIII <XXIX <" +
            " XXX < XXXI< XL< L < LX< LXX < LXXX < XC < C < CI " +
            "< CL < CC < CCC < CD < D < DC <DCC <DCCC <CM <M < MDC < MDCC <MCM");
}
Thanks again.
Reply With Quote