On diffraction and absorption of X-rays in perfect crystals