Photoabsorption of the 4d Electrons in Xenon and Barium: A Comparison