<!-- StockQuotes.xsl: Format stock quotes using TitledBoxes --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:include href="TitledBox.xsl"/> <xsl:template name="StockQuotes"> <xsl:call-template name="TitledBox"> <xsl:with-param name="Title"> <!-- Static title of a bolded "Stock Quotes" --> <b>Stock Quotes</b> </xsl:with-param> <xsl:with-param name="Contents"> <!-- Table of stock quotes is the contents --> <table> <xsl:if test="not(page/STOCKS/ROW)"> <tr><td colspan="2">No stocks selected</td></tr> </xsl:if> <xsl:for-each select="page/STOCKS/ROW"> <tr> <td><xsl:value-of select="TICKER"/></td> <td align="right"><xsl:value-of select="PRICE"/></td> </tr> </xsl:for-each> </table> </xsl:with-param> </xsl:call-template> </xsl:template> </xsl:stylesheet> |