|
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] problem with <xsl:if>, Michael Kay | Thread | [xsl] Is this legal?, Patrick Moore |
| Re: [xsl] problem with <xsl:if>, Francis Norton | Date | Re: [xsl] copy-of question, RSuiter |
| Month |