Initial release. Barely tested but seems to work.
Initial release. zh-CN collation works, other collations should be using the configured ICU collators.
Code to support constructing localized groups still waiting to be implemented.
Does not work with Saxon 9.6+, only Saxon 9.1 as shipped with the Open Toolkit.
To use it modify the ANT_OPTS environment variable in whatever environment runs the OT to set the javax.xml.transform.TransformerFactory system property to "org.ditacommunity.i18n.saxon.DCI18nSaxonTransformerFactoryImpl91", e.g.:
ANT_OPTS=-Xmx512m -Djavax.xml.transform.TransformerFactory=org.ditacommunity.i18n.saxon.DCI18nSaxonTransformerFactoryImpl91
You can use the custom collator by using a collation URI on xsl:sort
like so:
<xsl:sort collation="http://org.dita-community.i18n.zhCNawareCollator?lang={$lang}"
select="dci18n:getSortKeyForTopicref(.)"
/>
The dci18n:getSortKeyForTopicref() function is defined in the i18n-utils.xsl module included with the plugin.
For zh-CN content it uses the plugin's dictionary-based Simplified Chinese collator to get the pin-yin transliteration for Simplified Chinese words. For all languages it will use any <sort-as>
(or <data name="sort-as">
) value in addition to the referenced topic's title as the sort key.