Hello again!

I found a good amount of information [1] on how to do a custom Java collation for Apache Derby, including all the packaging and metainformation.

Now the only uncertain point for me is:
* where should I put the collation packaged as jar file
* how to make BaseX aware of the new collation

Best regards
Kristian K

[1] https://blogs.oracle.com/kah/entry/user_defined_collation_in_apache


05.07.2016 13:58 Kristian Kankainen kirjutas:

Hello!

In a lexicographic application I need a custom collation for ordering. The documentation for XML, Xquery and XSLT all somehow state that system available collations are to be used and all seem to support custom collations by specifying the URI. Is this possible also for custom created Java collators?

I have been looking at the Java docs [1] and it looks easy enough for me, but I would like to get an affirmative from this list that it does work with BaseX.

My initial guesses is that I'd need to package my collator class as a jar and install it in the Xquery module repository [2]. But how to use it from there I'm not sure. Is BaseX able to automatically use it correctly if I specify the correct URI as collation in the prolog "declare default collation 'URI';"?

I'd me more than glad to write about it in the documentation/wiki if I get it working.

Cheers!
Kristian

[1] http://docs.oracle.com/javase/7/docs/api/java/text/RuleBasedCollator.html
[2] http://docs.basex.org/wiki/Repository