Example 17-6: Calling reusable formatting with named templates

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <!-- Include the stylesheet containing the "displayProducts" template -->
  <xsl:include href="DisplayProduct.xsl"/>
  <!-- Set the output to not indent so no extra whitespace is introduced -->
  <xsl:output method="html" indent="no"/>
  <xsl:template match="/">
    <html>
    <body>
      <center>
        <h2>Welcome! These Items are featured today...</h2>
        <table border="0">
          <xsl:for-each select="ROWSET/ROW">
          <tr>
            <td valign="top">
              <xsl:call-template name="displayProduct"/>
            </td>
          </tr>
          </xsl:for-each>
        </table>
      </center>
    </body>
    </html>
  </xsl:template>
</xsl:stylesheet>