Class DeepEqual

    • Field Detail

      • INCLUDE_NAMESPACES

        public static final int INCLUDE_NAMESPACES
        Flag indicating that two elements should only be considered equal if they have the same in-scope namespaces
        See Also:
        Constant Field Values
      • INCLUDE_PREFIXES

        public static final int INCLUDE_PREFIXES
        Flag indicating that two element or attribute nodes are considered equal only if their names use the same namespace prefix
        See Also:
        Constant Field Values
      • INCLUDE_COMMENTS

        public static final int INCLUDE_COMMENTS
        Flag indicating that comment children are taken into account when comparing element or document nodes
        See Also:
        Constant Field Values
      • INCLUDE_PROCESSING_INSTRUCTIONS

        public static final int INCLUDE_PROCESSING_INSTRUCTIONS
        Flag indicating that processing instruction nodes are taken into account when comparing element or document nodes
        See Also:
        Constant Field Values
      • EXCLUDE_WHITESPACE_TEXT_NODES

        public static final int EXCLUDE_WHITESPACE_TEXT_NODES
        Flag indicating that whitespace text nodes are ignored when comparing element nodes
        See Also:
        Constant Field Values
      • COMPARE_STRING_VALUES

        public static final int COMPARE_STRING_VALUES
        Flag indicating that elements and attributes should always be compared according to their string value, not their typed value
        See Also:
        Constant Field Values
      • COMPARE_ANNOTATIONS

        public static final int COMPARE_ANNOTATIONS
        Flag indicating that elements and attributes must have the same type annotation to be considered deep-equal
        See Also:
        Constant Field Values
      • WARNING_IF_FALSE

        public static final int WARNING_IF_FALSE
        Flag indicating that a warning message explaining the reason why the sequences were deemed non-equal should be sent to the ErrorListener
        See Also:
        Constant Field Values
      • JOIN_ADJACENT_TEXT_NODES

        public static final int JOIN_ADJACENT_TEXT_NODES
        Flag indicating that adjacent text nodes in the top-level sequence are to be merged
        See Also:
        Constant Field Values
      • COMPARE_ID_FLAGS

        public static final int COMPARE_ID_FLAGS
        Flag indicating that the is-id and is-idref flags are to be compared
        See Also:
        Constant Field Values
      • EXCLUDE_VARIETY

        public static final int EXCLUDE_VARIETY
        Flag indicating that the variety of the type of a node is to be ignored (for example, a mixed content node can compare equal to an element-only content node
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeepEqual

        public DeepEqual()
    • Method Detail

      • deepEqual

        public static boolean deepEqual​(SequenceIterator op1,
                                        SequenceIterator op2,
                                        AtomicComparer comparer,
                                        XPathContext context,
                                        int flags)
                                 throws XPathException
        Determine when two sequences are deep-equal
        Parameters:
        op1 - the first sequence
        op2 - the second sequence
        comparer - the comparer to be used
        context - the XPathContext item
        flags - bit-significant integer giving comparison options. Always zero for standard F+O deep-equals comparison.
        Returns:
        true if the sequences are deep-equal
        Throws:
        XPathException - if either sequence contains a function item
      • call

        public BooleanValue call​(XPathContext context,
                                 Sequence[] arguments)
                          throws XPathException
        Execute a dynamic call to the function
        Parameters:
        context - the dynamic evaluation context
        arguments - the values of the arguments, supplied as Sequences.
        Returns:
        the result of the evaluation, in the form of a Sequence. It is the responsibility of the callee to ensure that the type of result conforms to the expected result type.
        Throws:
        XPathException - (should not happen)
      • getStreamerName

        public java.lang.String getStreamerName()
        Description copied from class: SystemFunction
        Get a name that identifies the class that can be used to evaluate this function in streaming mode, that is, supplying one item or event at a time as it is delivered by the parser. Special streaming support is generally available in Saxon-EE for all system functions that take a sequence as their argument.
        Overrides:
        getStreamerName in class SystemFunction
        Returns:
        a name that identifies a class that supports streamed evaluation of this system function, or null if no such class is available. The mapping of names to classes is defined in the Saxon-EE class StreamerMap. In non-streaming Saxon editions (HE and PE) the method always returns null.