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
|  
Report Content as Inappropriate

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
[net.sf.saxon.lib.SubstringMatcher
(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
XPathException;
}


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).

Cheers,

Eliot

--
Eliot Kimber
http://contrext.com
 






------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...