saxon:has-same-nodes

Tests whether two sequences contain the same nodes, in the same order.

has-same-nodes($arg1 as node()*, $arg2 as node()*) ➔ xs:boolean

Arguments

 

$arg1

node()*

The first sequence

 

$arg2

node()*

The second sequence

Result

xs:boolean

Namespace

http://saxon.sf.net/

Saxon availability

Requires Saxon-PE or Saxon-EE.

Notes on the Saxon implementation

Available since before Saxon 8.0.

Details

This function returns a boolean that is true if and only if $arg1 and $arg2 contain the same sequence of nodes in the same order. Nodes are compared by identity, not by content. Note this is quite different from both the "=" operator, which tests whether there is a pair of nodes with the same string-value, and also the fn:deep-equal() function, which compares nodes pairwise but by content.