xslt keep multiple variables in scope depending on a single test
问题 I have many variables and only two cases. My original approach goes out of scope : <xsl:choose> <xsl:when test='$something = 6'> <xsl:variable name="foo">x</xsl:variable> <!-- 50 other variables --> </xsl:when> <xsl:when test='$something = 7'> <xsl:variable name="foo">y</xsl:variable> <!-- 50 other variables --> </xsl:when> </xsl:choose> ie. later, with saxon, XPST0008: Variable x has not been declared (or its declaration is not in scope) I think it would work if I would choose inside an xsl