Hiding table column using XSLT based on condition

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello
I was transforming XML in XSLT. Here is the scenario. I have a list of items and foreach item i may or maynot have discount details. I need to check if for any one of the item has discount > 0 than i need to display the table column. i.e. if discountamt>0
i need to display the column
Code Snippet<br/>
<xsl:template match="DiscountDetails <br/>
<xsl:for-each select="DiscountDetail <br/>
<xsl:if test="DiscountAmount > 0 <br/>
</xsl:if> <br/>
</xsl:for-each> <br/>
</xsl:template>

View the full article
 
Back
Top