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

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

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Thu, 15 May 2003 09:49:16 +0200
Message-ID: <3EC3467C.30901@pinkjuice.com>
To: "Kay, Michael" <Michael.Kay@softwareag.com>
CC: public-qt-comments@w3.org

Kay, Michael wrote:

> Since you don't seem able to give a precise definition,

The most common idea of "fn:shallow-equal", parallel to fn:deep-equal.

> perhaps I can give
> you a multiple choice question. Here are some elements. Which pairs of
> elements do you regard as being "equal"?
> 1: <a/>
> 2: <a> </a>
> 3: <a xsi:nil="true"/>
> 4: <a att="2"> </a>
> 5: <a><!-comment--> </a>
> 6: <a><b/> </a>
> 7: <b> </b>

Various sensible answers are possible; I don't know which one is the 
most common one (on this list, in the community, in the WG(s)).

> I'm sure that if you asked ten people this question, they would come up with
> ten different answers.

The most common answer could be chosen and specified.

> Certainly, from the information you have given, I
> have no way of knowing which of these elements you regard as being equal to
> each other.

Any answer is arguable, and many would be sensible.

As with any other aspect of the spec(s), one definition is chosen after 
discussion. I would think that there aren't many aspects of the spec(s) 
that everyone agrees on.

> We have provided access to most of the interesting properties of an element
> using basic functions: the string value, the name, the typed value, the base
> URI, the set of in-scope namespaces, the attributes. You can combine these
> properties in any way you like to create a definition of node equality that
> suits your own view of what it means for two nodes to be equal.

Yes, as I wrote: 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 

I still see reasons for including it, but I also see the reasons against 
that which you and Michael Rys list.

Thank you very much for taking the time to discuss such topics! As I 
said many times before, I'm already enjoying coding in XSLT 2. An open 
process makes sure that it will continue to get even better :)


You wrote 'We have provided "eq"'; what's the URL to its definition? TIA.


Received on Thursday, 15 May 2003 03:50:36 UTC

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