Probing the Electronic Structures of Ternary Perovskite and Pyrochlore Oxides Containing Sn4+ or Sb5+.