  The electronic structure and magnetic ordering in La$_{1-x}$Pr$_x$Co$_2$P$_2$
($x=$0, 0.25, and 1) phosphides have been studied theoretically using the fully
relativistic spin-polarized Dirac linear muffin-tin orbital (LMTO)
band-structure method. The X-ray absorption and X-ray magnetic circular
dichroism spectra at the Co$L_{2,3}$ and Pr$M_{4,5}$ edges have been
investigated theoretically within the framework of the LSDA+$U$ method. The
core-hole effect in the final state as well as the effects of the electric
quadrupole $E_2$ and magnetic dipole $M_1$ transitions have been investigated.
Good agreement with experimental measurements has been found.
