Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple xsl IF error

Status
Not open for further replies.

anyideas

Programmer
May 2, 2002
127
0
0
GB
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=&quot; language=&quot;VBScript&quot;>

<xsl:template match=&quot;/&quot;><xsl:apply-templates select=&quot;*&quot;/></xsl:template>

<xsl:template match=&quot;Event&quot;>
<TABLE width=&quot;100%&quot;>
<tr>
<td>
<TABLE bgcolor=&quot;silver&quot; cellspacing=&quot;1px&quot;>
<tr>
<td width=&quot;157px&quot; bgcolor=&quot;#F5F7FB&quot;><b>Document Name</b></td>
<td width=&quot;157px&quot; bgcolor=&quot;#F5F7FB&quot;><b>Document Description</b></td>
<td width=&quot;157px&quot; bgcolor=&quot;#F5F7FB&quot;><b>Follow Up</b></td>
<td width=&quot;157px&quot; bgcolor=&quot;#F5F7FB&quot;><b>Outcome</b></td>
</tr>
<tr>
<td bgcolor=&quot;#F5F7FB&quot;><xsl:value-of select=&quot;DocName&quot;/></td>
<td bgcolor=&quot;#F5F7FB&quot;><xsl:value-of select=&quot;DocDesc&quot;/></td>
<td bgcolor=&quot;#F5F7FB&quot;><xsl:value-of select=&quot;FollowUpDate&quot;/></td>
<td bgcolor=&quot;#F5F7FB&quot;><xsl:value-of select=&quot;Outcome&quot;/></td>
</tr>
<tr>
<td colspan=&quot;4&quot; bgcolor=&quot;#F5F7FB&quot;><b>Notes</b></td>
</tr>
<tr>
<td colspan=&quot;4&quot; bgcolor=&quot;#F5F7FB&quot;><xsl:value-of select=&quot;Notes&quot;/></td>
</tr>
</TABLE>
</td>
</tr>
<xsl:if test!=&quot;DocLocation='NULL'&quot;>
<tr>
<td>
<img>
<xsl:attribute name=&quot;src&quot;>
<xsl:value-of select=&quot;DocLocation&quot; />
</xsl:attribute>
</img>
</td>
</tr>
</xsl:if>
</TABLE>
</xsl:template>
</xsl:stylesheet>
 
try this
<xsl:if test!=&quot;DocLocation=NULL&quot;>
the null is without quotes
let me us know if it works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top