Use of the Z+1-core analogy model: examples from the core-excitation spectra of CO2 and N2O