I have searched all around to find a solution to my problem, but i just got more questions...
consider the following XML:
If you have only a finite number of possible templates, would it work to use an xsl if construct to select what to do in the master template?