Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:deep-equal

Check for items in two arguments that compare equal in corresponding positions.


Syntax

fn:deep-equal(item()* $param1, item()* $param2) => xs:boolean
fn:deep-equal(item()* $param1, item()* $param2, string $collation) => xs:boolean

Top of page

Description

This function checks whether two sequences are deep-equal to each other. Deep equality means that the sequence must contain items that are pairwise deep-equal. Two items are deep-equal when they are either atomic values that compare equal or when they are nodes of the same kind with the same name whose children are deep-equal. More precisely, the following rules apply:

You can also supply a collation argument that is used at all recursion levels where strings are compared.

Top of page

Arguments

$param1

sequence

$param2

sequence

$collation

valid collation string literal

Top of page

Examples

Consider the following expression and the subsequent calls of fn:deep-equal():

let $at := <attendees>
  <name last='Parker' first='Peter'/>
  <name last='Barker' first='Bob'/>
  <name last='Parker' first='Peter'/>
</attendees>

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page