Re: [xsl] problem with <xsl:if>

Subject: Re: [xsl] problem with <xsl:if>
From: mjyoungblut@xxxxxxx
Date: Wed, 18 Apr 2001 15:29:02 -0500
Jay,
You are further down the tree when you try to access the 'edit' attribute
when you are doing your test.
Try this:

<xsl:template match="addresslist">
     <xsl:variable name="EDIT" select="@edit"/>
     <b><xsl:value-of select="@name"/></b><br/>
     <xsl:for-each select="address">
          <xsl:value-of select="name"/>
          <xsl:if test="{$EDIT}='yes'">
               ...add something...
          </xsl:if><br/>
     </xsl:for-each><p/>
</xsl:template>


><xsl:template match="addresslist">
>    <b><xsl:value-of select="@name"/></b><br/>
>    <xsl:for-each select="address">
>         <xsl:value-of select="name"/>
>         <xsl:if test="addresslist[@edit='yes']/address">
>              ...add something...
>         </xsl:if><br/>
>    </xsl:for-each><p/>
></xsl:template>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread