  We present a reciprocal-space pseudopotential scheme for calculating X-ray
absorption near-edge structure (XANES) spectra. The scheme incorporates a
recursive method to compute absorption cross section as a continued fraction.
The continued fraction formulation of absorption is advantageous in that it
permits the treatment of core-hole interaction through large supercells
(hundreds of atoms). The method is compared with recently developed
Bethe-Salpeter approach. The method is applied to the carbon K-edge in diamond
and to the silicon and oxygen K-edges in alpha-quartz for which polarized XANES
spectra were measured. Core-hole effects are investigated by varying the size
of the supercell, thus leading to information similar to that obtained from
cluster size analysis usually performed within multiple scattering
calculations.
