Photochemical evolution of elliptical galaxies - I. The high-redshift formation scenario