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

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
Michael

> -----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
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 Wednesday, 14 May 2003 00:30:14 UTC