Re: eq operator

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 UTC