Node Set Operators incomplete?

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
duplicates.

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

and

((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