xsl-list
[Top] [All Lists]

RE: Comparing node for identity using union

2005-01-13 16:38:07
I run to the debuger i see that

(count(parent::Menu|$snode)=1) is allways true, even when $snode no
node, and even when there is no parent::Menu .

count(A|B)=1 will be true if A contains one node and B is empty, or if B
contains one node and A is empty, or if both A and B contain a single node
and this is the same node.

This is only a safe test for identity if you know that each of the node-sets
A and B is a single node. If you're not sure of that, a safer test is

count(A)=1 and count(B)=1 and count(A|B)=1

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--