<?xml version="1.0"?>
<!-- saved from url=(0016)http://localhost -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="ISO-8859-1"/>
  <xsl:template match="/">
    <html>
      <head>
        <title>
          <xsl:value-of select="//Product/@Name"/>
          <xsl:text> </xsl:text>
          <xsl:value-of select="//Product/@Version"/>
          <xsl:text> Log File - </xsl:text>
          <xsl:value-of select="//Product/@Date"/>
        </title>
      </head>
      <body>
        <center>
          <h1>
            <xsl:text>Composer Log File</xsl:text>
          </h1>
          <xsl:text>Generated on </xsl:text>
          <xsl:value-of select="//TimeStamp/@Day"/>
          <xsl:text>/</xsl:text>
          <xsl:value-of select="//TimeStamp/@Month"/>
          <xsl:text>/</xsl:text>
          <xsl:value-of select="//TimeStamp/@Year"/>
          <xsl:text> - </xsl:text>
          <xsl:value-of select="//TimeStamp/@Hour"/>
          <xsl:text>:</xsl:text>
          <xsl:value-of select="//TimeStamp/@Minutes"/>
          <xsl:text>:</xsl:text>
          <xsl:value-of select="//TimeStamp/@Seconds"/>
        </center>
        
        <strong>Summary</strong>
        <blockquote>
          <a href="#ProductInformation">Product Information</a><br/>
          <a href="#Diagnostics">Diagnostics</a><br/>
          <a href="#Log">Log</a><br/>
        </blockquote>
        <br/><br/>

        <!-- <ul> -->
          <!-- <li> --><a name="ProductInformation"/><strong>Product information</strong><br/><br/>
          <blockquote>
              <xsl:value-of select="//Product/@Name"/>
              <xsl:text> </xsl:text>
              <xsl:value-of select="//Product/@Version"/>
              <br/>
              <xsl:value-of select="//Product/@Date"/>
            <br/><br/><br/>
          </blockquote>
          <!-- </li>  -->
          <!-- <li> --><a name="Diagnostics"/><strong>Diagnostics</strong><br/><br/>

            <ul>
              <li>Software</li><br/><br/>
                <xsl:text>OS : </xsl:text><xsl:value-of select="//OS/Message"/>
                <br/>
                <xsl:text>Path : </xsl:text><xsl:value-of select="//Path/Message"/>
                <br/><br/>
              <li>Hardware<br/><br/>
                <ul>
                  <li>Memory<br/><br/>
                    <xsl:for-each select="//Memory/Message">
                      <xsl:value-of select="."/><br/>
                    </xsl:for-each>
                  </li>
                  <br/>

                  <li>Graphics<br/><br/>
                    <ul>
                      <li>SetupPixelFormat calls<br/><br/>
                        <ul>
                          <xsl:for-each select="//Graphics/SetupPixelFormats/SetupPixelFormat">
                            <li>SetupPixelFormat<br/>
                              <xsl:for-each select="*">
                                <xsl:value-of select="."/><br/>
                              </xsl:for-each>
                            </li>
                            <br/>
                          </xsl:for-each>
                        </ul>
                      </li>
                      
                      <li>Driver<br/><br/>
                        <ul>
                          <xsl:for-each select="//Graphics/Driver/Message">
                              <xsl:value-of select="."/><br/>
                          </xsl:for-each>
                        </ul>
                      </li>
                    </ul>
                  </li>
                </ul>
              </li>
            </ul>
            <br/>
          <!-- </li> -->
          <!-- <li> --><a name="Log"/><strong>Log</strong><br/><br/>
            <xsl:apply-templates select="//Body"/>
          <!-- </li> -->
        <!-- </ul> -->
        
        <!--
        <blockquote>
          <xsl:apply-templates select="//personne">
            <xsl:sort select="nom"/>
          </xsl:apply-templates>
        </blockquote>
         -->
      </body>
    </html>
  </xsl:template>
  
  <xsl:template match="Body">
    <ul>
      <xsl:if test="count(//Warning)>0">
        <font color="red">
          <xsl:text>WARNING : Time wasted during file resolutions or checkings :</xsl:text>
          <xsl:value-of select="sum(//Warning/@timeResolution)"/>
          <xsl:text> seconds. These files probably do not exist (see below red alerts)</xsl:text>
        </font>

      </xsl:if>
      <xsl:apply-templates/>
    </ul>
  </xsl:template>
  
  <xsl:template match="Graphics">
  <!-- Do nothing -->
  </xsl:template>

  <xsl:template match="Message">
    <li>
      <xsl:choose>
        <xsl:when test="name(following-sibling::*[1])='Warning'">
          <font color="orange">
            <xsl:value-of select="node()"/>
          </font>
          <xsl:text> [SLOW:time=</xsl:text>
            <xsl:value-of select="following-sibling::*[1]/@timeResolution"/>
          <xsl:text> second(s)]</xsl:text>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="node()"/>
        </xsl:otherwise>
      </xsl:choose>
    </li>
    <br/>
  </xsl:template>

  <xsl:template match="Error">
    <li>
          <font color="red">
            <xsl:value-of select="node()"/>
          </font>
    </li>
    <br/>
  </xsl:template>
  
  <xsl:template match="End">
    <li>
      <xsl:value-of select="node()"/>
    </li>
    <br/>
  </xsl:template>
  <xsl:template match="Block">
    <li>
      <xsl:value-of select="node()"/>
      <ul>
        <xsl:apply-templates select="*"/>
      </ul>
    </li>
  </xsl:template>

</xsl:stylesheet>
