I think this article is a good guide to creating a sitemap that you like - I can easily understand how you can adapt this depending on your specific needs. (Although I think that I would prefer to output the route generation to the template in a general way - this way you do not have to pass the host name to.)
source share