#HCl#...we gots #stackrel(+I)H-stackrel(-I)Cl#
#Cl_2# is a neutral diatomic molecule, we gots #stackrel(0)Cl-stackrel(0)Cl#
And #"sodium hypochlorite"#, we gots #""^(-)stackrel(-II)O-stackrel(+I)Cl#...and #stackrel(+I)Na^+#
...for #"chloride"# we simply have #stackrel(-I)Cl#, i.e. the charge on the atomic ion is the oxidation number....
And for #"chloric acid"#, we gots #stackrel(+I)H-O-stackrel(+V)Cl(=O)_2#...the oxygens are all #stackrel(-II)O#...and its conjugate base, #ClO_3^(-)#, RETAINS these oxidation numbers....
#"Potassium chlorite"#, we gots #K^+#, and #""^(+III)ClO_2^(-)#
And finally with #"perchloric acid"# we gots #Cl(VII+)#...
As always, the SUM of the oxidation numbers in a given compound or ion EQUALS the charge on the ion. For neutral molecules, such as #HClO_4#..the weighted sum of the elemental oxidation numbers is ZERO....i.e. #+I_H -4xxII_(O)+VII_(Cl)=0# as required.
Happy?