<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!--
 XSL para XML criado pelo Azureus
 Output: HTML & CSS (azureus.css)
 pxp0p0rn.net - v1.0 - 19/Nov/2005
-->

 <xsl:template match="STATS">
  <html>
   <head>
    <title>Azureus (<xsl:value-of select="AZUREUS_VERSION" />)</title>
    <!-- CSS -->
    <link rel="stylesheet" type="text/css" href="azureus.css" />
   </head>
   <body>
    <font face="Verdana" size="2">
     <xsl:apply-templates />
    </font>
   </body>
  </html>
 </xsl:template>

 <xsl:template match="AZUREUS_VERSION" />

 <xsl:template match="GLOBAL">
  <p>
   Global Download Speed: <b><xsl:value-of select="DOWNLOAD_SPEED/TEXT" /></b><br />
   Global Upload Speed: <b><xsl:value-of select="UPLOAD_SPEED/TEXT" /></b>
  </p>
 </xsl:template>

 <xsl:template match="DOWNLOAD">
  <table>
   <!-- #1 linha --><tr><td class="id">Name</td><td><xsl:value-of select="TORRENT/NAME" /></td></tr>
   <!-- #2 linha --><tr><td class="id">Size</td><td><xsl:value-of select="TORRENT/SIZE/TEXT" /></td></tr>
   <!-- #3 linha --><tr><td class="id">Status</td><td><xsl:value-of select="DOWNLOAD_STATUS" /></td></tr>
   <!-- #4 linha --><tr><td class="id">Tracker</td><td><xsl:value-of select="TRACKER_STATUS" /></td></tr>

   <!-- #5 Linha: Downloaded & Elpsed -->
   <tr>
    <td class="id">Downloaded</td><td><xsl:value-of select="DOWNLOADED/TEXT" /></td>
    <xsl:choose>
     <xsl:when test="DOWNLOAD_STATUS='Queued'">
      <td class="id2">Elpsed</td><th>--</th>
     </xsl:when>
     <xsl:otherwise>
      <td class="id2">Elpsed</td><th><xsl:value-of select="ELAPSED" /></th>
     </xsl:otherwise>
    </xsl:choose>
   </tr>

   <!-- #6 Linha: Uploaded & ETA -->
   <tr>
    <td class="id">Uploaded</td><td><xsl:value-of select="UPLOADED/TEXT" /></td>
    <xsl:choose>
     <xsl:when test="DOWNLOAD_STATUS='Queued'">
      <td class="id2">ETA</td><th>--</th>
     </xsl:when>
     <xsl:otherwise>
      <td class="id2">ETA</td><th><xsl:value-of select="ETA" /></th>
     </xsl:otherwise>
    </xsl:choose>
   </tr>

   <!-- #7 Linha: DL Speed & Seeds -->
   <tr>
    <td class="id">Download Speed</td><td><xsl:value-of select="DOWNLOAD_SPEED/TEXT" /></td>
    <!-- SEEDS -->
    <xsl:choose>
     <xsl:when test="TOTAL_SEEDS=0">
      <td class="id2">Seeds</td><th class="peers-red"><xsl:value-of select="TOTAL_SEEDS" /></th>
     </xsl:when>
     <xsl:when test="TOTAL_SEEDS &lt; 10">
      <td class="id2">Seeds</td><th class="peers-yel"><xsl:value-of select="TOTAL_SEEDS" /></th>
     </xsl:when>
     <xsl:otherwise>
      <td class="id2">Seeds</td><th class="peers-gre"><xsl:value-of select="TOTAL_SEEDS" /></th>
     </xsl:otherwise>
    </xsl:choose>
   </tr>
   
   <!-- #8 Linha: ULSpeed & Leechers -->
   <tr>
    <td class="id">Upload Speed</td><td><xsl:value-of select="UPLOAD_SPEED/TEXT" /></td>
    <!-- LEECHERS -->
    <xsl:choose>
     <xsl:when test="TOTAL_LEECHERS=0">
      <td class="id2">Leechers</td><th class="peers-red"><xsl:value-of select="TOTAL_LEECHERS" /></th>
     </xsl:when>
     <xsl:when test="TOTAL_LEECHERS &lt; 25">
      <td class="id2">Leechers</td><th class="peers-yel"><xsl:value-of select="TOTAL_LEECHERS" /></th>
     </xsl:when>
     <xsl:otherwise>
      <td class="id2">Leechers</td><th class="peers-gre"><xsl:value-of select="TOTAL_LEECHERS" /></th>
     </xsl:otherwise>
    </xsl:choose>
   </tr>

  </table>
  <p><br /><br /></p>
 </xsl:template>
 
</xsl:stylesheet>
