<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
<xsl:output method="xml" encoding="iso-8859-1" omit-xml-declaration="yes" indent="yes"/> 
<xsl:template match="/">
<style type="text/css">  
  .datacategory {background-color:#FFFFFF; font-family: arial; z-index: 1; border: 1px solid #C53737; visibility: visible; padding: 1px; color:#000000; text-transform: capitalize; font-weight: bold; font-size: 11px;}
  .categorytitle {background-color:#C53737; font-family: arial; font-weight: bold; color: #FFFFFF; padding: 1px;}
  .left-column {float: left; color: #555555;}
</style>		


<!-- Outputs the User Profile Box -->
        <xsl:variable name="imgavatar" select="plusService/userOptions/avatar"/> 
        <xsl:variable name="totalMiles" select="format-number(plusService/userTotals/totalDistance * 0.621371192, '#.00')"/> 
        <xsl:variable name="totalHrs" select="format-number(plusService/userTotals/totalDuration * 0.000000277777778, '#.00')"/>
        <xsl:variable name="totalPace" select="60 div ($totalMiles div $totalHrs)" />
	<div class="datacategory">
          <div class="categorytitle">Nike+ User Profile</div>
          <div>
          <div class="left-column"> 
            <img src="{$imgavatar}" alt="avatar" border="0"/> 
          </div>
          <div>
	    <xsl:value-of select="plusService/userOptions/screenName"/> <br/>
	    <xsl:value-of select="substring(plusService/user/city,1,8)"/>, <xsl:value-of select="plusService/user/state"/>, <xsl:value-of select="plusService/user/country"/> 
          </div></div>
          
          <br/>

          <!-- User Totals section -->
          <div>
          <div class="left-column">TOTALS:</div>
          <div> 
	   <xsl:value-of select="plusService/userTotals/totalRuns"/> runs = <xsl:copy-of select="$totalMiles"/> mi 
           <br/> <xsl:copy-of select="$totalHrs"/> hrs &#64; <xsl:value-of select="floor($totalPace)" />&#39; <xsl:value-of select="format-number(($totalPace mod floor($totalPace)) * 60, '##')" />&#34;&#47;mi
          </div> 
          </div>

          <div>
	  <div class="left-column">POWERSONG: </div>
          <div> 
             <xsl:value-of select="substring(plusService/userOptions/powerSong/title,1,20)"/> 
          </div>
          </div>

	</div>  <!-- End of the User Profile Box -->


<!-- Outputs the Last Run section 
	<div class="datacategory">
          <div class="categorytitle">Nike+ Last Run</div>
	  Date: <xsl:value-of select="substring(plusService/mostRecentRun/startTime,1,10)"/><br/>
	  Time: <xsl:value-of select="substring(plusService/mostRecentRun/startTime,12,5)"/><br/>
	  Distance: <xsl:value-of select="format-number(plusService/mostRecentRun/distance * 0.621371192, '#.00')"/> miles<br/>
          Duration: <xsl:value-of select="format-number(plusService/mostRecentRun/duration * 0.0000166666667, '#.00')"/> minutes<br/>
	</div>
-->

        </xsl:template> 
</xsl:stylesheet>