Oh dear, you're still confused. Well I suppose it's not surprising - programs that generate programs often are confusing.
The XSLT code is generating the Javascript code. The XSLT code cannot possibly have access to the value of a variable computed by the Javascript code that it is generating - unless of course you think that Escher's famous drawing reflects a possible reality:
http://en.wikipedia.org/wiki/Drawing_Hands
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference