Spectroscopy of highly charged ions and its relevance to EUV and soft x-ray source development