<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dw="uri:drivewindow-2">
    <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.01//EN" encoding="ISO-8859-1" indent="yes"/>
    <xsl:template match="dw:ParameterDifferences">
        <html lang="en" xlmns="http://www.w3.org/TR/html4/strict.dtd">
            <head>
                <title>Parameter Differences</title>
                <style>
                    @media all
                    {   h1  {   font-family: arial, sans-serif, tahoma;
                                font-size: 16pt;
                            }
                        body
                            {   font-family: sans-serif, tahoma, arial;
                                font-size: 9pt;
                            }
                        th  {   text-align: left;
                                background-color: gray;
                                padding-right: 4em;
                                padding-left: 1em;
                            }
                        td  {   vertical-align: top;
                                padding-left: 1em;
                            }
                        th.value
                            {   padding-right: 1em;
                            }
                    }
                </style>
                <xsl:if test="@css">
                    <link rel="stylesheet" type="text/css" href="{@css}" />
                </xsl:if>
            </head>
            <body>
                <h1>Parameter Differences</h1>
                <xsl:apply-templates select="comment" />
                <table>
                    <thead>
                        <tr>
                            <th class="name">Name</th>
                            <xsl:apply-templates select="drive" />
                            <th class="note">Note</th>
                        </tr>
                    </thead>
                    <tbody>
                        <xsl:apply-templates select="differences" />
                    </tbody>
                </table>
            </body>
        </html>
    </xsl:template>
    <xsl:template match="comment">
        <div>
            <p class="comment"><xsl:value-of select="." /></p>
        </div>
    </xsl:template>
    <xsl:template match="drive">
        <th class="value">
            <xsl:choose>
                <xsl:when test="@type = 'file'">
                    <xsl:text>File: </xsl:text><xsl:value-of select="." />
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="." />
                </xsl:otherwise>
            </xsl:choose>
        </th>
    </xsl:template>
    <xsl:template match="differs">
        <tr>
            <xsl:apply-templates />
        </tr>
    </xsl:template>
    <xsl:template match="differs/*">
        <td><xsl:attribute name="class"><xsl:value-of select="name()" /></xsl:attribute><xsl:value-of select="." /></td>
    </xsl:template>
</xsl:stylesheet>