According to the rule, the oxidation number of Cl -
Let the oxidation number of 'Cl' is 'x'
so, +2 + (−2) + (x) = 0
or, x = 0
Oxidation number of Cl is zero is wrong.
Oxidation number of Cl can be determine by their bonding or structure-
Oxidation number of Cl in CaOCl2
From the structure the oxidation number of Cl is +1 and −1.