You can't access these variables outside the for-each but you can define them with a specific XPath expression such as
Code:
<xsl:variable name="Mandatory" select="../../Check/Node[@Name = $Name]/Type/@name[@name = 'MANDATORY']"/>
Actually the value is always 'MANDATORY' if such an attribute exists...