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

[F&O] deep-equal

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 3 Dec 2003 12:37:58 GMT
Message-Id: <200312031237.MAA00639@penguin.nag.co.uk>
To: public-qt-comments@w3.org

I commented on the previous draft (a day or so before the release of the
current draft) that deep-equal would be better in the user-defined appendix:


The version in this draft appears to be unchanged, so the comments made
there still apply. (deep-equal appears to be completely broken wrt to
document nodes).

In addition I have noticed some further problems with the given

1) The is-namespace-node() function should be in some non null
   (example.org) namespace so that this definition is legal in xslt as a
   user-defined function.

2) the note 

     The contents of comments and processing instructions are
     significant only if these nodes are used directly as arguments to
     the function, not if they appear as children of the nodes supplied
     as arguments.

is strictly true (the content is insignificant) but it is rather  misleading.
The _content_ of comments are (bizarrely) not compared by the given
definition unless they are items in the sequence being compared, but
comments are not ignored: their _presence_ affects the equality.


1 <x>ab</x>
2 <x><!-- z -->ab</x>
3 <x>a<!-- z -->b</x>
4 <x>ab<!-- z --></x>
5 <x>a<!-- zz -->b</x>

1 == 2 == 4
3 == 5

as in 1,2,4 x has a single text node child with value ab but in 3 and 5
there are two text node children.

This is a particularly arbitrary choice of equality definition.


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Wednesday, 3 December 2003 07:38:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:51 UTC