W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

Re: eq operator

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 21 May 2003 17:57:25 +0100
Message-ID: <181-633910886.20030521175725@jenitennison.com>
To: Tobias Reif <tobiasreif@pinkjuice.com>
CC: public-qt-comments@w3.org

Hi Tobi,

>  > Most data types that you can compare for equality have a op:X-equal()
>  > operator defined in the F&O WD, where X is the name of the data type.
> [...]
>  > A complete list of the possible comparisons and the relevant
>  > operators/functions from the F&O WD are given in Appendix B.2 Operator
>  > Mapping in XPath 2.0 at:
>  >
>  >   http://www.w3.org/TR/xpath20/#mapping
> Somehow I hit the same walls as before:
> Why does op:node-equal test for identity, not for equality?

Note that eq and op:node-equal() are not at all related. eq is used
for comparing atomic values; if you try to compare two nodes using eq
then you will compare their atomised values. op:node-equal() is used
by the "is" and "isnot" operators, not the eq operator.

> If there is eq and op:node-equal, why is there no fn:node-equal? (or
> fn:shallow-equal)

Could you give an example of a transformation where you think such a
function would be useful? I have great difficulty understanding what
your idea of fn:shallow-equal() is and, more importantly, why you
think it would be useful.



Jeni Tennison
Received on Wednesday, 21 May 2003 12:57:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:12 UTC