Inconsistency in Docs and Code for Collation URI Resolver

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Inconsistency in Docs and Code for Collation URI Resolver

Eliot Kimber-2
I'm trying to see if I can have a single collation URI resolver that will
work for both Saxon 9.1 and Saxon 9.6+.

The docs for both 9.1 and 9.6 say:

The result of the method is in general a Java Comparator, though if the
collation is to be used in functions such as contains() which match parts
of a string rather than the whole string, then the result must also be an
instance of eitherjava.text.RuleBasedCollator, or of the Saxon interface
(9.7)|net.sf.saxon.sort.SubstringMatcher (9.1)].

However, signature for net.sf.saxon.lib.CollationURIResolver.resolve()
(9.7) is:

public interface CollationURIResolver {
    StringCollator resolve(String var1, Configuration var2) throws

Note that it returns a StringCollator, not a java.text.Collator.

Likewise, the 9.1 version returns a net.sf.saxon.sort.StringCollator (the
9.1 version of StringCollator).

This appears to be an inconsistency between the docs and the code and
means I can't have a single URI resolver that will work with both versions
(not a deal breaker, just annoying).



Eliot Kimber

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
saxon-help mailing list archived at
[hidden email]