<xsl:script language="language-name">
The xsl:script element can encapsulate complete functionality of any HTML capable scripting language. The xml:script tags can be placed between any xsl:stylesheet or xsl:template elements and are thus globally available blocks of script. Also IE 5.01 allows COM object instantiation from within xsl:script tags.
See an xsl:script example in the page on the xsl:eval tag.