|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problem with <xsl:if>
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








