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

RE: node equality: fn:node-equal()

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 14 May 2003 02:26:59 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DCE29@daemsg02.software-ag.de>
To: Tobias Reif <tobiasreif@pinkjuice.com>, public-qt-comments@w3.org

> I'd like to compare two nodes for equality. I could do it by testing 
> various aspects of the pair, thus writing my:node-equal(), but I'd 
> prefer to have it available in the language.

You'll have to explain exactly what you mean by node equality. There are a
great many possible definitions. We have provided "eq" and "fn:deep-equal()"
to support two possible definitions; it's not clear that there are other
definitions of node equality that are sufficiently widely accepted that they
should be in the core library. You can always write your own comparison
function.

> 
> BTW, op:node-equal() still tests for identity instead of equality.
> 

Yes, this internal function is designed to support the "is" operator. It's
not a well-chosen name, but the name will never be seen by users.

Michael Kay
Received on Tuesday, 13 May 2003 20:27:19 GMT

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