Example 17-19: Stylesheet to format the news portal page

<?xml version="1.0"?>
<!-- News.xsl: Format the news portal page -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html" indent="no"/>
  <xsl:include href="StockQuotes.xsl"/>
  <xsl:include href="LoginBox.xsl"/>
  <xsl:include href="NewsBoxes.xsl"/>
  <xsl:template match="/">
    <html>
      <head><link rel="stylesheet" type="text/css" href="Forum.css" /></head>
      <body class="page">
        <center>
        <table border="0" width="70%">
          <tr>
            <td valign="top" width="140">
              <xsl:call-template name="StockQuotes"/>
              <!-- Show LoginBox if the forumuser in page is blank -->
              <xsl:if test="/page/forumuser = ''">
                <br/>
                <xsl:call-template name="LoginBox"/>
              </xsl:if>
            </td>
            <td width="400">
                <xsl:call-template name="NewsBoxes"/>
            </td>
          </tr>
        </table>
        <!-- Show preferences link if forumuser in page is not blank -->
        <xsl:if test="/page/forumuser != ''">
          <font size="1">
            <a href="Prefs.xsql">
              <xsl:text>Preferences for </xsl:text>
              <xsl:value-of select="/page/forumuser"/>
            </a>
          </font>
        </xsl:if>
      </center>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>