W3C home > Mailing lists > Public > www-xpath-comments@w3.org > April to June 2001

Node Set Operators incomplete?

From: Tobias Oberstein <Tobias.Oberstein@gmx.de>
Date: Sun, 8 Apr 2001 00:08:57 +0200
To: <xsl-editors@w3.org>, <www-xpath-comments@w3.org>
Message-ID: <EGECJPMPCPJFHJIBBCJMCEMKCBAA.Tobias.Oberstein@gmx.de>
Have I missed something??

With XPath, there is the operator | which, if applied to a pair of node sets
forms the set union, that is all nodes from both original node sets without

I wondered, where the corresponding operators for node set intersection
(something like &) and node set difference (dif) are.

N1 & N2	: the set of nodes from N1 | N2 which are both members of N1 and N2
N1 dif N2	: the set of nodes, which are members of N1 but not of N2

If there are none, *why* where they rejected from the spec and how could I
simulate such (without modifying the location paths leading to the original
node sets)? Or, will the next spec include sich stuff?

Another issue for me is the semantics of comparison operators on pairs of
node sets. This seems to be rather exotic.
What I really need is ..

NodeSet1 eq? NodeSet2   :<=>   every node in NodeSet1 is member of NodeSet2,
					 and vice versa

NodeSet1 sub? NodeSet2  :<=>   every node in NodeSet1 is member of NodeSet2

Of course, only sub? is needed because of

((N1 sub? N2) and (N2 sub? N1)) <=> (N1 eq? N2)

Together with

count(N1 & N2) = 0	N1 and N2 are totally distinct


((N1 eq? N2) != true) and (count(N1 & N2) > 0)	N1 and N2 are distinct

this would complete the picture.

Could anybody help?

Greets, Toby
Received on Saturday, 7 April 2001 18:09:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:02:14 UTC