Absorption and photoemission spectroscopy of rare-earth oxypnictides