Templates can have parameters just like stylesheets.
Their names can't conflict with variables.
Example:
<xsl:template match="element"> <xsl:param name="namespace"/> <xsl:element name="{@name}" namespace="{$namespace}"/> </xsl:template>
Bad:
<xsl:template match="element"> <xsl:param name="namespace"/> <xsl:variable name="namespace" select="namespace()"/> <xsl:element name="{@name}" namespace="{$namespace}"/> </xsl:template>