Interpretation of x-ray magnetic circular dichroism and x-ray absorption near-edge structure in Ni