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

node equality: fn:node-equal()

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Tue, 13 May 2003 10:42:18 +0200
Message-ID: <3EC0AFEA.70704@pinkjuice.com>
To: 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.

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 arg 
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.



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

Received on Tuesday, 13 May 2003 04:43:34 UTC

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