You can't put an XSLT instruction in the middle of your Javascript code any more than you can put a Javascript instruction in the middle of a C program.
What you can do is to invoke a stylesheet transformation using the API provided by your XSLT processor. This starts the XSLT processing at the top level - it must supply an input document to be processed, and the stylesheet produces an output document which the Javascript code can then manipulate (typically by displaying it).
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference