High-resolution photoionization of core-excited atoms and molecules using synchrotron radiation