Study of the valence bands of FePS3 and NiPS3 by resonant-photoemission spectroscopy