The <msxsl:script> element belongs to the namespace urn:schemas-microsoft-com:xslt. You can declare variables and define functions within this element. This element can appear within the <xsl:stylesheet> element. A script block thus nested is treated as a global script block.
The <msxsl:assembly> and <msxsl:using> child elements are only available for managed code within the .NET Framework. When used, these elements must be at the beginning of the script block, before any script code.
In unmanaged code, you can also instantiate COM objects in the <msxsl:script> element. However, a user's security settings might prevent your script from instantiating a client-side object.
For high performance, avoid script blocks from XSLT files, because they require loading the script engine multiple times. Instead, create a COM object that is equivalent to the script, producing a DLL. Then use addObject and pass the DLL.