A series of samples, Y1-xCaxBa2-xLaxCu3Oy (x = 0 » 0.6), were prepared and studied by X-ray absorption near-edge spectroscopy (XANES). The oxygen content y in these samples remained about the same for all x. Both the O-1s and Cu-2p3=2 XANES results indicate that the total number of holes remained essentially unchanged. The O-1s XANES gives no sign showing that there are La ions on the Y sites. Our data indicated that the Ca^2+ and La^3+ doping changed not only the lattice symmetry but also the electronic structure at the Fermi energy in the valence band. The results derived from the O-1s XANES showed that the holes on the CuO2 planes decreased, while the holes on the O(1) and O(5) sites on the basal plane increased, as the doping concentration x increased. PACS. 74.25.Jb - Electronic structure.PACS. 74.72.Bk - Y-based cuprates.PACS. 78.70.Dm - X-ray absorption spectra.