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

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

From: Michael Rys <mrys@microsoft.com>
Date: Tue, 13 May 2003 21:30:05 -0700
Message-ID: <5C39F806F9939046B4B1AFE652500A3A0509B38D@RED-MSG-10.redmond.corp.microsoft.com>
To: "Tobias Reif" <tobiasreif@pinkjuice.com>, <public-qt-comments@w3.org>

How do you define node equality? The whole reason for deep-equal() is to
provide the most common from of node equality. Any other form in my
opinion should be written by the user him-/herself. Having a
proliferation of equality functions in the spec seems not appropriate
(as David C. pointed out).

Best regards

> -----Original Message-----
> From: Tobias Reif [mailto:tobiasreif@pinkjuice.com]
> Sent: Tuesday, May 13, 2003 1:42 AM
> To: public-qt-comments@w3.org
> Subject: node equality: fn:node-equal()
> Hi
> 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.
> I'm not sure if such a function is available already; otherwise, I
> suggest to add something like fn:node-equal(). It would test for
> equality (not identity), and simply return true or false. I think that
> would be like fn:deep-equal(), but would not recurse down the tree; it
> would only test the single node, or the root note of the tree if the
> is a tree.
> Or perhaps something like fn:item-equal() would make sense: pairs of
> nodes or pairs of atomic values could be fed to it.
> Tobi
> P.S.
> BTW, op:node-equal() still tests for identity instead of equality.
> --
> http://www.pinkjuice.com/
Received on Wednesday, 14 May 2003 00:30:14 UTC

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