|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Sorting in Ancient Greek
David Carlisle wrote:
sort order is processor specific, but there is a processor independent way to achieve A general solution to locale-specific sorting in XSL 1.0 is to provide a custom collator implementation. This is often needed because the correct collation sequence for a given body of information in a given language may be determined by any number of variables, including editorial preference, the type of document it is, the information being sorted (part numbers vs index entries vs glossary items). Saxon 6.5 provides a simple extension mechanism by which you create a simple Java class named com.icl.saxon.sort.Compare_xx where "xx" is the language code for the language you want to sort on. You then use the normal Java rule-based-collator mechanism to define the collation rules for your language. Finally, you use the lang= attribute of xsl:sort to specify your language code, which Saxon will then attempt to match to a collator class, e.g., if your language code is "gr-AN" (a made-up code for ancient Greek), then you would need a collator class named Compare_gr-AN and would specify xsl:sort as: <xsl:sort lang="gr-AN" ... Saxon 7 uses a somewhat different approach for integrating custom collators but the basic concepts are the same. Also XSL 2 has more built-in features for specifying custom collators but cannot eliminate the requirement that specific collation rules must be implemented and integrated with your XSLT engine. As far as I know Saxon is the only XSLT 1 engine that enables the integration of custom collators. If there are others I do not know about them. I don't know about XSLT 2 engines. Cheers, Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 9030 Research Blvd, #410 Austin, TX 78758 (512) 372-8122 eliot@xxxxxxxxxxxxxxxxxxx www.innodata-isogen.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








