Interesting, so maybe a two stage transform:
1) Dynamically build an XSL file with replacements for the common DNN token....Username, PortalName, TabName, etc..., and then
2) Current implementation of a static XSL file.
I've thought a number of the common extensions of other modules (HTML and such...) are possibly more XSL transforms anyway...