You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Kapa, Madhavi" <ma...@marconimed.com> on 2000/10/26 20:14:40 UTC

Reusing XSL variables


Hi,

  I am trying to reuse XSL variables in the example as shown

	      <xsl:choose>
	        <xsl:when test="$unSavedWL = 'true'">
	          <xsl:variable name="worklistName">ABC</xsl:variable>
	        </xsl:when>
	        <xsl:otherwise>
	          <xsl:variable name="worklistName">DEF</xsl:variable>
	        </xsl:otherwise>
	      </xsl:choose>
              worklistLevel.addItem("<xsl:value-of
select="$worklistName"/>");

I get the error - Variable worklistName used out of context. 

Is there any way that I can access the variable worklistName outside the
xsl:choose block.

THanks,
Madhavi