I'm running into a bug when I have a global variable, that has another variable nested within it, that is called by a Java Extension Function.
For some reason, when this happens the last global variable takes on the value of the nested variable above. For example, in the document below the output would be "Real output Should not be output". The java function is irrelevant. In this case it is as simple as returning the value it is passed. This seems to occur with multiple versions of Xalan, but I'm using 2.4.1. There is an obvious work-around of not nesting variables in global variables, but I'd like to understand why this is happening. Here's my example stylesheet: <?xml version='1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:toolPackage="xalan://tools"> <xsl:variable name="gVar1"> <xsl:variable name="lVar1" select="' Should not be output'"/> <xsl:value-of select="'Data for java function'"/> </xsl:variable> <xsl:variable name="gVar2"> <xsl:value-of select="'Real output'"/> </xsl:variable> <xsl:template match="/"> <xsl:value-of select="$gVar2"/> <xsl:variable name="lJava" select="toolPackage:Test.TestString($gVar1)"/> <xsl:value-of select="$gVar2"/> </xsl:template> </xsl:stylesheet> Thank you. Kristopher Cole Software Engineer Nexis Content and Conversion Engineering [EMAIL PROTECTED] (937) 865-6800 x54630
