<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">
 
    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->
    <!--                                            -->
    <!-- Game of Life Viewer by Roger L. Costello   -->
    <!--                                            -->
    <!-- Many thanks to Tom Passin, Len Bullard,    -->
    <!-- Didier Martin, and Mike Champion for their -->
    <!-- outstanding insights and suggestions.      -->
    <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -->

    <xsl:output method="html"/>
   
    <xsl:template match="grid">
        <HTML>
            <BODY>
                <TABLE border="1">
                    <xsl:for-each select="row">
                        <TR>
                            <xsl:for-each select="column">
                                <xsl:choose>
                                    <xsl:when test="value=0">
                                        <TD><font color="white">0</font></TD>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <TD bgcolor="blue"><font color="blue">1</font></TD>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </xsl:for-each>
                        </TR>
                    </xsl:for-each>
                </TABLE>
            </BODY>
        </HTML>
    </xsl:template>

</xsl:stylesheet>