Hey all.
I'm trying to get an xsl if not statement to work, if the value of DocLocation = NULL end table else begin a new row and display image.
Everything works fine without the if statement.
Can someone have a look and point out any errors.
thanks
Mark
<xsl:stylesheet xmlns:xsl=" language="VBScript">
<xsl:template match="/"><xsl:apply-templates select="*"/></xsl:template>
<xsl:template match="Event">
<TABLE width="100%">
<tr>
<td>
<TABLE bgcolor="silver" cellspacing="1px">
<tr>
<td width="157px" bgcolor="#F5F7FB"><b>Document Name</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Document Description</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Follow Up</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Outcome</b></td>
</tr>
<tr>
<td bgcolor="#F5F7FB"><xsl:value-of select="DocName"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="DocDesc"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="FollowUpDate"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="Outcome"/></td>
</tr>
<tr>
<td colspan="4" bgcolor="#F5F7FB"><b>Notes</b></td>
</tr>
<tr>
<td colspan="4" bgcolor="#F5F7FB"><xsl:value-of select="Notes"/></td>
</tr>
</TABLE>
</td>
</tr>
<xsl:if test!="DocLocation='NULL'">
<tr>
<td>
<img>
<xsl:attribute name="src">
<xsl:value-of select="DocLocation" />
</xsl:attribute>
</img>
</td>
</tr>
</xsl:if>
</TABLE>
</xsl:template>
</xsl:stylesheet>
I'm trying to get an xsl if not statement to work, if the value of DocLocation = NULL end table else begin a new row and display image.
Everything works fine without the if statement.
Can someone have a look and point out any errors.
thanks
Mark
<xsl:stylesheet xmlns:xsl=" language="VBScript">
<xsl:template match="/"><xsl:apply-templates select="*"/></xsl:template>
<xsl:template match="Event">
<TABLE width="100%">
<tr>
<td>
<TABLE bgcolor="silver" cellspacing="1px">
<tr>
<td width="157px" bgcolor="#F5F7FB"><b>Document Name</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Document Description</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Follow Up</b></td>
<td width="157px" bgcolor="#F5F7FB"><b>Outcome</b></td>
</tr>
<tr>
<td bgcolor="#F5F7FB"><xsl:value-of select="DocName"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="DocDesc"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="FollowUpDate"/></td>
<td bgcolor="#F5F7FB"><xsl:value-of select="Outcome"/></td>
</tr>
<tr>
<td colspan="4" bgcolor="#F5F7FB"><b>Notes</b></td>
</tr>
<tr>
<td colspan="4" bgcolor="#F5F7FB"><xsl:value-of select="Notes"/></td>
</tr>
</TABLE>
</td>
</tr>
<xsl:if test!="DocLocation='NULL'">
<tr>
<td>
<img>
<xsl:attribute name="src">
<xsl:value-of select="DocLocation" />
</xsl:attribute>
</img>
</td>
</tr>
</xsl:if>
</TABLE>
</xsl:template>
</xsl:stylesheet>