This article does not apply to Umbraco 8.
The concepts and code in this article have been deprecated in Umbraco 8 and no longer apply.
If you are using Umbraco 7, this article is perfect for you!
Using Variables and Parameters
Variables and parameters are temporary storage devices in XSLT for holding values to complete node sets of data.
Variables are defined with a name, and can be filled two different ways. The first method is to select the data into the variable as follows:
<xsl:variable name="myID" select="$currentPage/@id"/>
The second method is to fill the variable by having the content rendered into the variable.
<xsl:variable name="myID">
<xsl:value-of select="$currentPage/@id"/>
</xsl:variable>
The second method is useful when applying logic to filling the variable, in which case an if command or choose command would allow you to have the value selected logically.
Parameters are handled the same way, except their command is "xsl:param".
As for the difference, it is a matter of where they can be assigned.
This was copied the original book from Casey Neehouse from the books section of umbraco.org