Why it fits with generating an XML file is because the generated-path attribute contains the generated URL as the template uses it. These URLs are generated using the routers.

However: you are right that the current templates do not generate using the routers; this is something that needs to be fixed but it is best to combine fixes. Soforth: I am going to merge this. Thank you