Measurement and prediction of the NEXAFS spectra of pyrimidine and purine and the dissociation following the core excitation