  The x-ray absorption spectra of water and ice are calculated with a many-body
approach for electron-hole excitations. The experimental features, including
the small effects of temperature change in the liquid, are quantitatively
reproduced from molecular configurations generated by ab-initio molecular
dynamics. The spectral difference between the solid and the liquid is due to
two major short range order effects. One, due to breaking of hydrogen bonds,
enhances the pre-edge intensity in the liquid. The other, due to a non-bonded
molecular fraction in the first coordination shell, affects the main spectral
edge in the conversion of ice to water. This effect may not involve hydrogen
bond breaking as shown by experiment in high-density amorphous ice.
