<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <head><title>Fruits</title></head>
  <body>
    <h2>Fruits</h2>
    <table border="1">
    <tr>
	<th align="left">ID</th>
        <th align="left">Name</th>
	<th align="left">Colors</th>
	<th align="left">Image</th>
	<th align="left">Calories</th>
    </tr>
    <xsl:for-each select="fruitlist/fruit">
    <tr>
      <td><xsl:value-of select="id"/></td>
      <td><xsl:value-of select="name"/></td>
	  <td><xsl:for-each select="color">
		  <xsl:value-of select="."/>
		  <xsl:if test="position()!=last()">,</xsl:if>
              </xsl:for-each>
	  </td>
	  <td><img>
	  <xsl:attribute name="src">images/<xsl:value-of select="image"/></xsl:attribute>
	  <xsl:attribute name="alt">Fruit Image</xsl:attribute>   
	  </img>
          </td>
	  <td><xsl:value-of select="calories"/></td>
    </tr>
    </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>