XSLT magick

I never stop wondering about about the strange things in XSLT.. here is one i stumbled upon jesterday. I wanted to pass a variable containing a string(item name) to a template.
this template was written by another developer,.. it didn’t have any parameter defined so using with-param was out of the question. And because it was used elsewhere i couldn’t alter it ,.so after i spend couple hours on searching the web and some trail and error.. i was stunned to find out how it can be done.

the template…

<xsl:template name=giveMeItemname”>

set the paramater in yout c# code.
call template and pass the itemaname


and that’s how it is done (c: