diff --git a/build.xml b/build.xml
index b448e9e..b25da1f 100644
--- a/build.xml
+++ b/build.xml
@@ -185,6 +185,11 @@
+
+
+
+
+
@@ -218,7 +223,6 @@
-
diff --git a/plugin/conf/grouping-and-sorting/ar/ar.xml b/plugin/conf/grouping-and-sorting/ar/ar.xml
index 6163537..5858589 100755
--- a/plugin/conf/grouping-and-sorting/ar/ar.xml
+++ b/plugin/conf/grouping-and-sorting/ar/ar.xml
@@ -8,7 +8,7 @@
- ar-sort-rules.txt
+ ar/ar-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/bg/bg.xml b/plugin/conf/grouping-and-sorting/bg/bg.xml
index 34655e7..6ebd444 100755
--- a/plugin/conf/grouping-and-sorting/bg/bg.xml
+++ b/plugin/conf/grouping-and-sorting/bg/bg.xml
@@ -7,7 +7,7 @@
- bg-sort-rules.txt
+ bg/bg-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/ca/ca.xml b/plugin/conf/grouping-and-sorting/ca/ca.xml
index c7dd2c8..10b68c9 100755
--- a/plugin/conf/grouping-and-sorting/ca/ca.xml
+++ b/plugin/conf/grouping-and-sorting/ca/ca.xml
@@ -11,7 +11,7 @@
- ca-sort-rules.txt
+ ca/ca-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/cs/cs.xml b/plugin/conf/grouping-and-sorting/cs/cs.xml
index c3f878a..2f24c4a 100755
--- a/plugin/conf/grouping-and-sorting/cs/cs.xml
+++ b/plugin/conf/grouping-and-sorting/cs/cs.xml
@@ -8,7 +8,7 @@
- cs-sort-rules.txt
+ cs/cs-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/el/el.xml b/plugin/conf/grouping-and-sorting/el/el.xml
index 45dc0a0..0f80785 100755
--- a/plugin/conf/grouping-and-sorting/el/el.xml
+++ b/plugin/conf/grouping-and-sorting/el/el.xml
@@ -7,7 +7,7 @@
- el-sort-rules.txt
+ el/el-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/en/en.xml b/plugin/conf/grouping-and-sorting/en/en.xml
index 9d1c54c..2833a14 100755
--- a/plugin/conf/grouping-and-sorting/en/en.xml
+++ b/plugin/conf/grouping-and-sorting/en/en.xml
@@ -9,7 +9,7 @@
diff --git a/plugin/conf/grouping-and-sorting/es/es.xml b/plugin/conf/grouping-and-sorting/es/es.xml
index f10ff6d..b235230 100755
--- a/plugin/conf/grouping-and-sorting/es/es.xml
+++ b/plugin/conf/grouping-and-sorting/es/es.xml
@@ -10,7 +10,7 @@
- es-sort-rules.txt
+ es/es-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/et/et.xml b/plugin/conf/grouping-and-sorting/et/et.xml
index 8f1b77b..dbe4935 100755
--- a/plugin/conf/grouping-and-sorting/et/et.xml
+++ b/plugin/conf/grouping-and-sorting/et/et.xml
@@ -8,7 +8,7 @@
- et-sort-rules.txt
+ et/et-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/fa/fa.xml b/plugin/conf/grouping-and-sorting/fa/fa.xml
index 72587ed..7e2686e 100755
--- a/plugin/conf/grouping-and-sorting/fa/fa.xml
+++ b/plugin/conf/grouping-and-sorting/fa/fa.xml
@@ -8,7 +8,7 @@
- fa-sort-rules.txt
+ fa/fa-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/fi/fi.xml b/plugin/conf/grouping-and-sorting/fi/fi.xml
index 4ec20e1..e463ed0 100755
--- a/plugin/conf/grouping-and-sorting/fi/fi.xml
+++ b/plugin/conf/grouping-and-sorting/fi/fi.xml
@@ -8,7 +8,7 @@
- fi-sort-rules.txt
+ fi/fi-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/fr/fr.xml b/plugin/conf/grouping-and-sorting/fr/fr.xml
index 8bba8ba..4fe1cdf 100755
--- a/plugin/conf/grouping-and-sorting/fr/fr.xml
+++ b/plugin/conf/grouping-and-sorting/fr/fr.xml
@@ -11,7 +11,7 @@
- fr-sort-rules.txt
+ fr/fr-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/he/he.xml b/plugin/conf/grouping-and-sorting/he/he.xml
index 8c36be9..88c6903 100755
--- a/plugin/conf/grouping-and-sorting/he/he.xml
+++ b/plugin/conf/grouping-and-sorting/he/he.xml
@@ -7,7 +7,7 @@
- he-sort-rules.txt
+ he/he-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/hi/hi.xml b/plugin/conf/grouping-and-sorting/hi/hi.xml
index caebb36..2f09af5 100755
--- a/plugin/conf/grouping-and-sorting/hi/hi.xml
+++ b/plugin/conf/grouping-and-sorting/hi/hi.xml
@@ -7,7 +7,7 @@
- hi-sort-rules.txt
+ hi/hi-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/hr/hr.xml b/plugin/conf/grouping-and-sorting/hr/hr.xml
index 63ad97c..9f8c447 100755
--- a/plugin/conf/grouping-and-sorting/hr/hr.xml
+++ b/plugin/conf/grouping-and-sorting/hr/hr.xml
@@ -9,7 +9,7 @@
diff --git a/plugin/conf/grouping-and-sorting/is/is.xml b/plugin/conf/grouping-and-sorting/is/is.xml
index 9a1a4db..b9308e6 100755
--- a/plugin/conf/grouping-and-sorting/is/is.xml
+++ b/plugin/conf/grouping-and-sorting/is/is.xml
@@ -10,7 +10,7 @@
diff --git a/plugin/conf/grouping-and-sorting/ja/ja.xml b/plugin/conf/grouping-and-sorting/ja/ja.xml
index bcb99c9..8901914 100755
--- a/plugin/conf/grouping-and-sorting/ja/ja.xml
+++ b/plugin/conf/grouping-and-sorting/ja/ja.xml
@@ -8,7 +8,7 @@
- ja-sort-rules.txt
+ ja/ja-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/kk/kk.xml b/plugin/conf/grouping-and-sorting/kk/kk.xml
index 06311fd..3480c78 100755
--- a/plugin/conf/grouping-and-sorting/kk/kk.xml
+++ b/plugin/conf/grouping-and-sorting/kk/kk.xml
@@ -7,7 +7,7 @@
- kk-sort-rules.txt
+ kk/kk-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/km/km.xml b/plugin/conf/grouping-and-sorting/km/km.xml
index c544f1f..aa80cff 100755
--- a/plugin/conf/grouping-and-sorting/km/km.xml
+++ b/plugin/conf/grouping-and-sorting/km/km.xml
@@ -7,7 +7,7 @@
- km-sort-rules.txt
+ km/km-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/kn/kn.xml b/plugin/conf/grouping-and-sorting/kn/kn.xml
index f884349..545c40a 100755
--- a/plugin/conf/grouping-and-sorting/kn/kn.xml
+++ b/plugin/conf/grouping-and-sorting/kn/kn.xml
@@ -7,7 +7,7 @@
- kn-sort-rules.txt
+ kn/kn-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/ko/ko.xml b/plugin/conf/grouping-and-sorting/ko/ko.xml
index a59d525..f2cd04c 100755
--- a/plugin/conf/grouping-and-sorting/ko/ko.xml
+++ b/plugin/conf/grouping-and-sorting/ko/ko.xml
@@ -7,7 +7,7 @@
- ko-sort-rules.txt
+ ko/ko-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/lo/lo.xml b/plugin/conf/grouping-and-sorting/lo/lo.xml
index d1e8245..b5801dd 100755
--- a/plugin/conf/grouping-and-sorting/lo/lo.xml
+++ b/plugin/conf/grouping-and-sorting/lo/lo.xml
@@ -7,7 +7,7 @@
- lo-sort-rules.txt
+ lo/lo-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/lt/lt.xml b/plugin/conf/grouping-and-sorting/lt/lt.xml
index fc22dfa..a9f4137 100755
--- a/plugin/conf/grouping-and-sorting/lt/lt.xml
+++ b/plugin/conf/grouping-and-sorting/lt/lt.xml
@@ -9,7 +9,7 @@
- lt-sort-rules.txt
+ lt/lt-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/lv/lv.xml b/plugin/conf/grouping-and-sorting/lv/lv.xml
index 4d46e34..f22e165 100755
--- a/plugin/conf/grouping-and-sorting/lv/lv.xml
+++ b/plugin/conf/grouping-and-sorting/lv/lv.xml
@@ -7,7 +7,7 @@
- lv-sort-rules.txt
+ lv/lv-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/my/my.xml b/plugin/conf/grouping-and-sorting/my/my.xml
index 6272528..cda1211 100755
--- a/plugin/conf/grouping-and-sorting/my/my.xml
+++ b/plugin/conf/grouping-and-sorting/my/my.xml
@@ -7,7 +7,7 @@
- my-sort-rules.txt
+ my/my-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/nl/nl.xml b/plugin/conf/grouping-and-sorting/nl/nl.xml
index a1e4988..4befcd1 100755
--- a/plugin/conf/grouping-and-sorting/nl/nl.xml
+++ b/plugin/conf/grouping-and-sorting/nl/nl.xml
@@ -8,7 +8,7 @@
- nl-sort-rules.txt
+ nl/nl-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/no/no.xml b/plugin/conf/grouping-and-sorting/no/no.xml
index dfff07d..08bb80e 100755
--- a/plugin/conf/grouping-and-sorting/no/no.xml
+++ b/plugin/conf/grouping-and-sorting/no/no.xml
@@ -8,7 +8,7 @@
- no-sort-rules.txt
+ no/no-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/pl/pl.xml b/plugin/conf/grouping-and-sorting/pl/pl.xml
index 99c998f..0aec911 100755
--- a/plugin/conf/grouping-and-sorting/pl/pl.xml
+++ b/plugin/conf/grouping-and-sorting/pl/pl.xml
@@ -8,7 +8,7 @@
- pl-sort-rules.txt
+ pl/pl-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/pt/pt.xml b/plugin/conf/grouping-and-sorting/pt/pt.xml
index 1fffdcc..0f117dc 100755
--- a/plugin/conf/grouping-and-sorting/pt/pt.xml
+++ b/plugin/conf/grouping-and-sorting/pt/pt.xml
@@ -9,7 +9,7 @@
- pt-sort-rules.txt
+ pt/pt-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/ru/ru.xml b/plugin/conf/grouping-and-sorting/ru/ru.xml
index 6774f10..def714a 100755
--- a/plugin/conf/grouping-and-sorting/ru/ru.xml
+++ b/plugin/conf/grouping-and-sorting/ru/ru.xml
@@ -8,7 +8,7 @@
- ru-sort-rules.txt
+ ru/ru-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/si/si.xml b/plugin/conf/grouping-and-sorting/si/si.xml
index 72579de..354d85f 100755
--- a/plugin/conf/grouping-and-sorting/si/si.xml
+++ b/plugin/conf/grouping-and-sorting/si/si.xml
@@ -7,7 +7,7 @@
- si-sort-rules.txt
+ si/si-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/sk/sk.xml b/plugin/conf/grouping-and-sorting/sk/sk.xml
index 2f9bf29..7005206 100755
--- a/plugin/conf/grouping-and-sorting/sk/sk.xml
+++ b/plugin/conf/grouping-and-sorting/sk/sk.xml
@@ -7,7 +7,7 @@
- sk-sort-rules.txt
+ sk/sk-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/sv/sv.xml b/plugin/conf/grouping-and-sorting/sv/sv.xml
index bc99af0..760542c 100755
--- a/plugin/conf/grouping-and-sorting/sv/sv.xml
+++ b/plugin/conf/grouping-and-sorting/sv/sv.xml
@@ -8,7 +8,7 @@
- sv-sort-rules.txt
+ sv/sv-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/sw/sw.xml b/plugin/conf/grouping-and-sorting/sw/sw.xml
index 2c672ac..bb888b0 100755
--- a/plugin/conf/grouping-and-sorting/sw/sw.xml
+++ b/plugin/conf/grouping-and-sorting/sw/sw.xml
@@ -12,7 +12,7 @@
diff --git a/plugin/conf/grouping-and-sorting/ta/ta.xml b/plugin/conf/grouping-and-sorting/ta/ta.xml
index 09cd2fc..74bdf59 100755
--- a/plugin/conf/grouping-and-sorting/ta/ta.xml
+++ b/plugin/conf/grouping-and-sorting/ta/ta.xml
@@ -7,7 +7,7 @@
- ta-sort-rules.txt
+ ta/ta-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/te/te.xml b/plugin/conf/grouping-and-sorting/te/te.xml
index e57d81d..adba6df 100755
--- a/plugin/conf/grouping-and-sorting/te/te.xml
+++ b/plugin/conf/grouping-and-sorting/te/te.xml
@@ -7,7 +7,7 @@
- te-sort-rules.txt
+ te/te-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/th/th.xml b/plugin/conf/grouping-and-sorting/th/th.xml
index 8b69747..8c6deed 100755
--- a/plugin/conf/grouping-and-sorting/th/th.xml
+++ b/plugin/conf/grouping-and-sorting/th/th.xml
@@ -7,7 +7,7 @@
- th-sort-rules.txt
+ th/th-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/tl/tl.xml b/plugin/conf/grouping-and-sorting/tl/tl.xml
index 49ce28f..3d2036f 100755
--- a/plugin/conf/grouping-and-sorting/tl/tl.xml
+++ b/plugin/conf/grouping-and-sorting/tl/tl.xml
@@ -9,7 +9,7 @@
- tl-sort-rules.txt
+ tl/tl-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/uk/uk.xml b/plugin/conf/grouping-and-sorting/uk/uk.xml
index b4d92e3..df6eb49 100755
--- a/plugin/conf/grouping-and-sorting/uk/uk.xml
+++ b/plugin/conf/grouping-and-sorting/uk/uk.xml
@@ -7,7 +7,7 @@
- uk-sort-rules.txt
+ uk/uk-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/vi/vi.xml b/plugin/conf/grouping-and-sorting/vi/vi.xml
index 25c61dd..f6cace7 100755
--- a/plugin/conf/grouping-and-sorting/vi/vi.xml
+++ b/plugin/conf/grouping-and-sorting/vi/vi.xml
@@ -7,7 +7,7 @@
- vi-sort-rules.txt
+ vi/vi-sort-rules.txt
diff --git a/plugin/conf/grouping-and-sorting/zh-TW/zh-TW.xml b/plugin/conf/grouping-and-sorting/zh-TW/zh-TW.xml
index b4ad9e0..53f2dd5 100755
--- a/plugin/conf/grouping-and-sorting/zh-TW/zh-TW.xml
+++ b/plugin/conf/grouping-and-sorting/zh-TW/zh-TW.xml
@@ -11,7 +11,7 @@
- zh-TW-sort-rules.txt
+ zh-TW/zh-TW-sort-rules.txt
diff --git a/src/main/java/org/ditacommunity/i18n/collation/ZhCnAwareCollator.java b/src/main/java/org/ditacommunity/i18n/collation/ZhCnAwareCollator.java
index 553e227..49631e3 100644
--- a/src/main/java/org/ditacommunity/i18n/collation/ZhCnAwareCollator.java
+++ b/src/main/java/org/ditacommunity/i18n/collation/ZhCnAwareCollator.java
@@ -51,7 +51,7 @@ private RuleBasedCollator getConfiguredICUCollator(Locale locale) {
// resolution catalog to resolve it.
final File myJarFile = new File(ZhCnAwareCollator.class.getProtectionDomain().getCodeSource().getLocation().getPath());
final File configFile =
- new File(myJarFile.getParent(),
+ new File(myJarFile.getParentFile().getParentFile(),
CONF_GROUPING_AND_SORTING_GROUPING_AND_SORTING_RULES_XML);
RuleBasedCollator collator;
GroupingAndSortingHelper helper = null;
@@ -67,6 +67,7 @@ private RuleBasedCollator getConfiguredICUCollator(Locale locale) {
@Override
public int compareStrings(String source, String target) {
+
return this.compare(source, target);
}
@@ -113,7 +114,9 @@ public int compare(String source, String target) {
result = delegate.compare(source, target);
}
} else {
+// System.out.println("+ [DEBUG] ZhCnAwareCollator.compare(): Using delegate comparator on \"" + source + "\", \"" + target + "\"");
result = delegate.compare(source, target);
+// System.out.println("+ [DEBUG] ZhCnAwareCollator.compare(): Returning \"" + result + "\"");
}
return result;
}
diff --git a/src/main/java/org/ditacommunity/i18n/saxon/DCI18nCollationUriResolver91.java b/src/main/java/org/ditacommunity/i18n/saxon/DCI18nCollationUriResolver91.java
index 309417d..2fb5688 100644
--- a/src/main/java/org/ditacommunity/i18n/saxon/DCI18nCollationUriResolver91.java
+++ b/src/main/java/org/ditacommunity/i18n/saxon/DCI18nCollationUriResolver91.java
@@ -6,6 +6,10 @@
import net.sf.saxon.sort.StringCollator;
import org.ditacommunity.i18n.collation.ZhCnAwareCollator;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
/**
* Resolves references to the DITA Community zh-CN URI resolver, setting the
* properties specified on the URI.
@@ -15,12 +19,27 @@ public class DCI18nCollationUriResolver91 extends DCI18nCollationUriResolverBase
private final StandardCollationURIResolver defaultResolver;
+ private static final Properties versionProps = new Properties();
+
+ static {
+ try {
+ InputStream inStream = DCI18nCollationUriResolver91.class.getResourceAsStream("version.properties");
+ if (null != inStream) {
+ versionProps.load(inStream);
+ }
+ } catch (Exception e) {
+ System.err.println("Failed to load version.properties resource from jar file. This should not happen.");
+ }
+
+ }
+
public DCI18nCollationUriResolver91() {
super();
defaultResolver = StandardCollationURIResolver.getInstance();
}
public StringCollator resolve(String uri, String base, Configuration configuration) {
+ System.out.println("DCI18nCollationUriResolver91 version " + DCI18nCollationUriResolver91.getVersion());
System.out.println("+ [DEBUG] DCI18nCollationUriResolver91.resolve(): Collation URI=\"" + uri + "\"");
ZhCnAwareCollator collator = resolveToZhCnAwareCollator(uri);
if (null == collator) {
@@ -31,4 +50,8 @@ public StringCollator resolve(String uri, String base, Configuration configurati
return (StringCollator)collator;
}
+ private static String getVersion() {
+ return versionProps.getProperty("version", "Version not set");
+ }
+
}
diff --git a/src/test/java/org/ditacommunity/i18n/saxon/TestSaxonFactorySetup.java b/src/test/java/org/ditacommunity/i18n/saxon/TestSaxonFactorySetup.java
index aecac92..bd7e104 100644
--- a/src/test/java/org/ditacommunity/i18n/saxon/TestSaxonFactorySetup.java
+++ b/src/test/java/org/ditacommunity/i18n/saxon/TestSaxonFactorySetup.java
@@ -43,6 +43,9 @@ public void testSaxonSetup91() throws Exception {
assertTrue("Not an ICU collator", collator instanceof ZhCnAwareCollator);
RuleBasedCollator delegate = ((ZhCnAwareCollator)collator).getBackingCollator();
assertNotNull(delegate);
+ collator = resolver.resolve(DCI18nCollationUriResolver91.DITA_COMMUNITY_I18N_ZH_CNAWARE_COLLATOR + "?lang=es-ES", "", null);
+ assertNotNull(collator);
+ delegate = ((ZhCnAwareCollator)collator).getBackingCollator();
}
diff --git a/version.properties b/version.properties
index a646c94..33aa3f7 100644
--- a/version.properties
+++ b/version.properties
@@ -1 +1 @@
-version=0.1.1
\ No newline at end of file
+version=0.1.2