<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
   <xsl:apply-templates />
</xsl:template>
<xsl:template match="booklist">
   <booklist>
   <table border="1" width="75%">
   <tr>
      <th>Book&apos;s Name</th>
      <th>Author(s)</th>
      <th>Price</th>
   </tr>
   <xsl:call-template name="book" />
   </table>
   </booklist>
</xsl:template>


<xsl:template name="book">
   <xsl:for-each select="/booklist/book">
   <tr>
      <td>
         <xsl:value-of select="booktitle" />
      </td>
      <td>
         <xsl:call-template name="DisplayAuthor" />
      </td>
      <td>
         $<xsl:value-of select="format-number(price,'#.00')" />
      </td>
   </tr>
   </xsl:for-each>
</xsl:template>

<xsl:template name="DisplayAuthor">
   <xsl:for-each select="author">
      <xsl:value-of select="first_name" />
      <![CDATA[ ]]>
      <xsl:if test="middle_init!=''">
         <xsl:value-of select="middle_init" />
         <![CDATA[ ]]>
      </xsl:if>
      <xsl:value-of select="last_name" />
      <br />
   </xsl:for-each>
</xsl:template>

</xsl:stylesheet>