3rd try

I have a list of Items that I am inserting into working memory.
Here is the rule that is failing:

rule "Cannot select X if both Y and Z are not selected"
when
     Item(code == "X")
     (or (not Item(code == "Y"))
           (not Item(code == "Z")))
then
     System.out.println("Error: You cannot select X unless both Y and Z are selected");
end

This rule works correctly when X and Y are there, and when X and Z are there.
However, when both Y and Z are missing, the error prints twice.
Can anyone tell me what I am doing wrong.

Thanks a lot
Vithal 
Rediff Shopping