XSLT doesn't know anything about the variables in the (VB.NET) program that initiated the transformation.
There are two different ways to pass values of variables to the transformation:
Pass them as global parameters to the transformation. Read more how to do this together with XslCompiledTransform.Transform()
:::: here.
Modify the source XML document (after loading it, to contain the values of the variables in certain nodes.
I recommend method 1. above.
UPDATE:
Obviously you are using a variation of method 2. above. In this case it is not a good idea at all to put the values of the variables inside the same string.
Much better than:
<link><![CDATA[/<% = countryVar %>/<% = langVar %>/products/index.aspx]]></link>
(and it would be straightforward to process with XSLT afterwards, is:
<link>
<country><% = countryVar %></country>
<slash>/</slash>
<lang><% = langVar %></lang>
<tail-link>/products/index.aspx</tail-link>
<linkName>Whatever link text</linkName>
</link>
Then the XSLT code that processes this will be just:
<a href="{link}"><xsl:value-of select="linkName"/></a>
(this assumes that you have <xsl:strip-space elements="*"/>
at the global level in your stylesheet).
and the values of the variables are:
link/country
and
link/lang