X-ray scattering and condensed-matter experiments: Beyond the nonrelativistic approach