PDA

View Full Version : remove if value-of = 0 how?


sushestvo
09-01-2005, 08:36 PM
I have:
<xsl:for-each select="/DATA/REPORT/ITEM">
<td class="fakeGridHeader" align="center">
<b><xsl:value-of select="FirstName"/>*<xsl:value-of select="LastName"/></b></td>
</xsl:for-each>
Some of the FirstName or lastname could be 0 in XML. if so, how can i make it to choose only values that are not 0?

KC-Luck
09-02-2005, 03:37 PM
<xsl:if test="string-length(FirstName) > 0 and string(FirstName) != '0'">
<xsl:value-of select="FirstName"/>
</xsl:if>