<xsl:variable name="test" select="'ohhi'"/><xsl:variable name="sections" select="/QUERY_MODULE/CRITERIA/SECTIONS"/> <xsl:variable name="sections3"> <xsl:choose> <xsl:when test="$test='ohhi'"><xsl:value-of select="$sections"/></xsl:when> <xsl:otherwise><xsl:value-of select="$sections"/></xsl:otherwise> </xsl:choose></xsl:variable> sections3 and sections should have the same results but they do not. obviously this is pointless code. the original code was not working, so i reduced it to isolate the problem. any help is appreciated