Class CollatingFunction

    • Field Detail

      • collation

        protected transient java.util.Comparator collation
    • Constructor Detail

      • CollatingFunction

        public CollatingFunction()
    • Method Detail

      • getAtomicComparer

        protected GenericAtomicComparer getAtomicComparer​(int arg,
                                                          XPathContext context)
                                                   throws XPathException
        Get a GenericAtomicComparer that can be used to compare values
        Parameters:
        arg - the position of the argument (starting at 0) containing the collation name. If this argument was not supplied, the default collation is used
        context - The dynamic evaluation context.
        Throws:
        XPathException
      • getCollator

        protected java.util.Comparator getCollator​(int arg,
                                                   XPathContext context)
                                            throws XPathException
        Get a collator suitable for comparing strings. Returns the collator specified in the given function argument if present, otherwise returns the default collator.
        Parameters:
        arg - The argument position (counting from zero) that holds the collation URI if present
        context - The dynamic context
        Returns:
        a Comparator, which will either be a java.text.Collator, or a CodepointCollator
        Throws:
        XPathException