|
Subject: Re: [xsl] Assigning variable values From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Fri, 24 May 2002 20:50:36 +0200 |
<xsl:variable name="teste" select="'um'"/> <xsl:variable name="um" select="'um'"/> <xsl:variable name="dois" select="'dois'"/>
<xsl:template match="/">
<xsl:variable name="teste">
<xsl:choose>
<xsl:when test="$teste='um'">
<xsl:value-of select="$dois"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$um"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$teste"/>
</xsl:template>Could somebody help me on this issue? I am having a
problem assingning values to a variable. Look the example:
-------------------------------------------- These ones were declared globally:
<xsl:variable name="teste" select="'um'"/> <xsl:variable name="um" select="'um'"/> <xsl:variable name="dois" select="'dois'"/> --------------------------------------------
-------------------------------------------- This code was declared inside a template:
<xsl:choose>
<xsl:when test="$teste = 'um'">
<xsl:variable name="teste"><xsl:value-of select="$dois"/></xsl:variable>
</xsl:when>
<xsl:otherwise> <xsl:variable name="teste" select="$um"/> </xsl:otherwise>
</xsl:choose>
<font face="arial" size="3"><xsl:value-of select="$teste"/></font> --------------------------------------------
This code only returns me the value 'um'. The when
clause is working, but the assigning of value to the $teste variable is
no working inside the choose clause.
Could somebody please help me? Thank you very much!
Georges Claessen Brazil
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Assigning variable values, Georges Claessen | Thread | Re: [xsl] Assigning variable values, Georges Claessen |
| Re: [xsl] Re: Newbie question--appl, David N Bertoni/Camb | Date | Re: [xsl] xslt generator, E L |
| Month |