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

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

Tobi

P.S.

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

-- 
http://www.pinkjuice.com/
Received on Tuesday, 13 May 2003 04:43:34 GMT

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