RE: ORA-FO-DEEPEQUAL-EMPTY 15.2.1 fn:deep-equal

fn:deep-equal is used to compare arbitrary sequences, and is true if they
are pairwise equal, that is, if
 
length($S1) eq length($S2) and
 
every $n in 1 to length($S1) satisfies deep-equal($S1[$n], $S2[$n])
 
It would be very odd if the empty sequence were an exception to this rule.
 
fn:sequence-node-identical() did return () if both arguments were () but
this was widely reported as a bug and has now been fixed.
 
fn:contains is a different case since it is comparing strings rather than
sequences, but there have been separate comments suggesting that the way the
string functions handle () is unhelpful.
 
Michael Kay
 

-----Original Message-----
From: Stephen Buxton [mailto:stephen.buxton@oracle.com] 
Sent: 01 July 2003 02:02
To: public-qt-comments@w3.org
Subject: ORA-FO-DEEPEQUAL-EMPTY 15.2.1 fn:deep-equal 



Functions and Operators, Section 15.2.1 fn:deep-equal <fn:deep-equal>  



Why does this function return true if both arguments are the empty sequence
? 


cf fn:contains <fn:contains>  which returns false if either argument (and
presumably if both arguments) is the empty sequence.
cf fn:sequence-node-identical <fn:sequence-node-identical>  which returns
the empty sequence if one or both arguments is the empty sequence.

Received on Tuesday, 1 July 2003 16:44:13 UTC