I have a requirement in which I have to compare the XSL node attribute value with a variable which is a parameter to java script function.
Please observe the following code snippet:
document.write('<xsl:for-each select="level1/level2/level3/level4[@id=(here I need the value of the parameter id)]/level5"><xsl:value-of select="name"/></xsl:for-each>');
you cannot evaluate an XSLT instruction in order to build the body of a function that will receive an argument dynamically (after the XSLT finishes writing it). The only option is to run the for-each on 'level5' inside the 'level4' loop, gather the 'name' values into an array and pass that array to showPopUp.