Subject: Re: [xsl] Assigning variable values From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Fri, 24 May 2002 22:11:29 +0200 |
Hi Joerg. You said that I couldn't change the value of an global scope variable. But I do this and it works perfectly. In fact many people say that it won´t work, but it remains as a mistery to me cause I made it work. Thanks for your attention! :o)
<root> </root>
<xsl:variable name="teste" select="'um'"/> <xsl:variable name="um" select="'um'"/> <xsl:variable name="dois" select="'dois'"/>
<xsl:template match="/"> <xsl:text>original: </xsl:text> <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:text>after "changing the value":</xsl:text> <xsl:value-of select="$teste"/> <xsl:apply-templates select="root"/> </xsl:template>
<xsl:template match="root"> <xsl:text>value still changed? :</xsl:text> <xsl:value-of select="$teste"/> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Assigning variable values, Georges Claessen | Thread | Re: [xsl] Assigning variable values, Georges Claessen |
[xsl] defaulting empty node to zero, Chuck Paussa | Date | Re: AW: [xsl] document, Mike Brown |
Month |