To make it work try 
<xsl:if test="@id[.=$var0]">

----- Original Message ----- 
From: "Wieser Daniel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 3:48 PM
Subject: xsl:if test="attribute=variable" does not work


> Hi all,
> 
> I'm having a problem with the xsl:if element as it is used 
> in the following xsl snippet. I don't have any idea why it
> doesn't work and would appreciate any helpful comments.
> 
> 
> <xsl:template match="gutschrift"> 
>   <xsl:variable name="var0" select="'VT'"/>
>   <xsl:variable name="var1" select="VT"/>
>   
>   <xsl:if test="@id=$var0">
>     test 1
>   </xsl:if>
>   <xsl:if test="@id=$var1">
>     test 2
>   </xsl:if>
>    
>   <xsl:value-of select="@id=$var0"/>  ** prints out 'false' **
>   <xsl:value-of select="@id=$var1"/>  ** prints out 'false' ** 
>   <xsl:value-of select="@id"/>   ** prints out 'VT' **
> 
> </xsl:template>
> 
> Regards 
> 
> Daniel

Reply via email to