I have searched all around to find a solution to my problem, but i just got more questions...
consider the following XML:
If you are using the old Saxon-B or newer Saxon-PE or Saxon-EE as XSLT processor, you can use a saxon extension to achieve dynamic template calls:
Don't forget to declare the saxon-Namespace in xsl-stylesheet element: