Example 17-10: Named template for a titled box with rounded corners

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template name="TitledBox">
    <xsl:param name="Title"/>
    <xsl:param name="Contents"/>
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
      <tr>
        <td width="1%" valign="top" align="left" bgcolor="#CCCC99">
          <img src="images/TL.gif" width="5" height="5" />
        </td>
        <th nowrap="" width="98%" align="left" valign="center" bgcolor="#CCCC99">
          <!-- &#160; is numerical character entity for Non-Breaking Space -->
          <xsl:text>&#160;&#160;</xsl:text>

          <!-- Put whatever is passed as the Title parameter here -->
          <xsl:copy-of select="$Title"/>

        </th>
        <td width="1%" align="right" valign="TOP" bgcolor="#CCCC99">
          <xsl:text>&#160;&#160;&#160;</xsl:text>
        </td>
        <td width="1%" valign="top" align="right" bgcolor="#CCCC99">
          <img src="images/TR.gif" width="5" height="5" />
        </td>
      </tr>
      <tr>
        <td width="1%" align="right" valign="TOP" bgcolor="#F7F7E7">
          <xsl:text>&#160;&#160;&#160;</xsl:text>
        </td>
        <td nowrap="" bgcolor="#F7F7E7" colspan="3">

          <!-- Put whatever is passed as the Contents parameter here -->
          <xsl:copy-of select="$Contents"/>

        </td>
      </tr>
      <tr>
        <td bgcolor="#F7F7E7" width="1%" align="LEFT" valign="BOTTOM">
          <img src="images/BL.gif" width="5" height="5" border="0" />
        </td>
        <td colspan="2" bgcolor="#F7F7E7" height="1" width="98%">
          <img src="images/blank.gif" border="0" height="1" width="1" />
        </td>
        <td bgcolor="#F7F7E7" width="1%" align="right" valign="BOTTOM">
          <img src="images/BR.gif" width="5" height="5" border="0" />
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>