Example 16-6: Stylesheet to format live stock quotes

<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <head>
    <style>
       BODY {font-family: Verdana}
       TH {background-color:#cccc99;color:#336699;font-weight:bold;}
      .r1 {background-color: #f7f7e7; color: black}
      .r0 {background-color: #f9f9f9; color: black}

    </style>
  </head>
  <body>
    <center>
      <h2>Yahoo! Quotes</h2>
      <xsl:value-of select="page/QuoteStream/@time"/>
      <hr/>
      <table>
        <tr>
          <th>Ticker</th>
          <th>Price</th>
        </tr>
        <xsl:for-each select="page/QuoteStream/Quote">
          <xsl:sort select="@Price" data-type="number" order="descending"/>
          <tr class="r{position() mod 2}">
            <td><xsl:value-of select="@Ticker"/></td>
            <td align="right"><xsl:value-of select="format-number(@Price,'0.00')"/></td>
          </tr>
        </xsl:for-each>
      </table>
    </center>
  </body>
</html>