This is a legacy fix... if it generates accurate URLs for legacy templates, it should suffice, even if it's inappropriate for new templates, right? Or are there some legacy templates I'm missing here?

And what do you mean anyway by "using routers"? How does that fit into an XML file generation? I mean, I realize that from Twig, you'd essentially call a method, but what about here?