[XML-SIG] Swap images for text elements using xsl?

Lance_Hill/OLS.OLS@olsinc.net Lance_Hill/OLS.OLS@olsinc.net
Tue, 27 Mar 2001 13:00:59 -0500


Hi all,

I have a page generated from a database which I would like to use to show
status information. Currenly, I am using a table to display the text
wrapped in each tag (generally a Y or N), but I would prefer to use an
image selectred depending on the text element in each tag. I had thought
that using a choose/which would work well, but I cannot figure out where to
put it in the included code. Also, can I just subsitute a "<IMG SRC
="Picture.gif/>" for the "Y" or "N", leaving it as text aand letting the
browser handle the HTML? I can't seem to get it to even allow me to switch
the text which is displaying. Any assistance would be greatly appreciated.


<xsl:template match="/">
<HTML>
<BODY>
<table border="1">
<tr>
  <th>New Client Status</th>
...etc.
</tr>


 <xsl:for-each select="status_report/agency">
  <tr>
  <td>
  <xsl:value-of select="new_client_status" />
  </td>
...etc.

  </tr>
  </xsl:for-each>
  </table>
  </BODY>
  </HTML>
  </xsl:template>
  </xsl:stylesheet>


Thanks,
Lance M. Hill