Variables can be used to save computed values.
Variables are created with <xsl:variable>.
Variables are "single assignment" (no side effects)
Variables are lexically scoped
Once created, variables can be used to generate content:
And control conditional processing:
<xsl:if test="$count = 3">...</xsl:if>