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.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 21 May 2003 12:57:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT