Re: [xsl] () eq () vs () = ()

Subject: Re: [xsl] () eq () vs () = ()
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 03 Oct 2011 13:04:12 +0100
Your concept of "starting from a position of true/false" is leading
you to faulty logic.  The statements made so far about the meaning of
deep-equal, including yours, have used the XPath "every" operator,
about which the XPath 2 spec (section 3.9, subpoint 2) states
(emphasis mine):

"If the quantifier is every, the quantified expression is true if
every evaluation of the test expression has the effective boolean
value true; otherwise the quantified expression is false. This rule
implies that, __if the in-clauses generate zero binding tuples, the
value of the quantified expression is true__."



It's a common misunderstanding about universal quantification. The proposition


every S satisfies P

is always true when S is empty, regardless of P.

For example, the statement "every hotel on St Kilda is fully booked" is true, as is the statement "every hotel on St Kilda has vacancies" (there are no hotels on St Kilda).

Michael Kay
Saxonica

Current Thread