Saxonica.com

saxon:deep-equal()

deep-equal(sequence-1, sequence-2, collation, flags)

This function compares two sequences for deep equality. The two sequences are supplied in the first two arguments.

The collation argument is mandatory. Supply an empty sequence to use the default collation.

The flags argument is a string containing characters acting as flags that cause the function to behave differently from the standard fn:deep-equal() function. The following flags are defined:

N

Include namespace nodes in the comparison. For two elements to be deep-equal, they must have the same in-scope namespaces (that is, same prefix and same URI).

C

Include comment nodes in the comparison. For two element or document nodes to be deep-equal, they must have the same comment node children.

P

Include processing-instruction nodes in the comparison. For two element or document nodes to be deep-equal, they must have the same processing-instruction node children.

S

Compare string values rather than typed values of simple-typed elements and attributes.

A

Compare type annotations on elements and attributes.

w

Exclude whitespace text nodes from the comparison. Any whitespace text node in either tree is ignored (except when determining the typed value of an element annotated with a simple type or a complex type with simple content).

?

Explain reason for a non-match. If the result is not-equal, a warning message explaining the reason will be sent to the ErrorListener. (In general, a sequence of warning messages will be sent, starting with the lowest-level difference and moving up the tree).

Next