Class DeepEqual

  • All Implemented Interfaces:
    Callable, Function, GroundedValue, Item, Sequence

    public class DeepEqual
    extends SystemFunction
    Implements the saxon:deep-equal() function, a variant of fn:deep-equal that provides additional control over how the comparison is performed.

    The specification is as follows:

    arg1 The first sequence to be compared

    arg2 The second sequence to be compared

    collation The collation to be used (null if the default collation is to be used)

    flags A string whose characters select options that cause the comparison to vary from the standard fn:deep-equals() function. The flags are:

    • N - take namespace nodes into account
    • J - join adjacent text nodes (e.g, nodes either side of a comment)
    • A - compare type annotations
    • C - take comments into account
    • F - take namespace prefixes into account
    • I - take the is-id() and is-idref() properties into account
    • P - take processing instructions into account
    • S - compare string values, not typed values
    • w - don't take whitespace-only text nodes into account

    returns true if the sequences are deep equal, otherwise false

    • Constructor Detail

      • DeepEqual

        public DeepEqual()
    • Method Detail

      • call

        public BooleanValue call​(XPathContext context,
                                 Sequence[] arguments)
                          throws XPathException
        Evaluate this function call at run-time
        context - The XPath dynamic evaluation context
        arguments - The values of the arguments to the function call. Each argument value (which is in general a sequence) is supplied in the form of a sequence.
        the results of the function.
        XPathException - if a dynamic error occurs during evaluation of the function. The Saxon run-time code will add information about the error location.