<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
	
	<xsl:output method="html" />
	
	<xsl:template match="/">
		<style type="text/css">
		<![CDATA[
	  #NDepend-report { font-family: Trebuchet MS; font-size: 10pt; }
      #NDepend-report TD { font-family: Trebuchet MS; font-size: 10pt; }
      #NDepend-report .title { font-size: 25pt; font-weight: bold; }
      #NDepend-report .subtitle { color: #883333; font-size: 20pt; font-weight: bold; background-color: #CCCCCC }
      #NDepend-report .subtitleref { color: blue; font-size: 10pt }
      #NDepend-report .info {color: black; font-size: 10pt}
      #NDepend-report .biginfo {color: black; font-size: 12pt ; font-weight: bold}
      #NDepend-report .infobold {color: black; font-size: 10pt ; font-weight: bold}
      #NDepend-report .hdrcell_left  { color: #FFFFFF ; font-weight: bold; background-color: #B3B3B3; text-align: left;}
      #NDepend-report .hdrcell_leftb  { color: #FFFFFF ; font-weight: bold; background-color: #939393; text-align: left;}
      #NDepend-report .hdrcell_right { color: #FFFFFF ; font-weight: bold; background-color: #B3B3B3; text-align: right;}
      #NDepend-report .hdrcell_rightb { color: #FFFFFF ; font-weight: bold; background-color: #939393; text-align: right;}
      #NDepend-report .datacell_left0 { color: #000055; background-color: #DBDBDB; text-align: left; }
      #NDepend-report .datacell_leftb0{ color: #000055; background-color: #BBBBBB; text-align: left; }
      #NDepend-report .datacell_right0{ color: #000055; background-color: #DBDBDB; text-align: right; }
      #NDepend-report .datacell_rightb0{ color: #000055; background-color: #BBBBBB; text-align: right; }
      #NDepend-report .datacell_red0 { color: #000055; background-color: #FFBBBB; text-align: right; }
      #NDepend-report .datacell_left1 { color: #000055; background-color: #EAEAEA; text-align: left; }
      #NDepend-report .datacell_leftb1 { color: #000055; background-color: #CACACA; text-align: left; }
      #NDepend-report .datacell_right1{ color: #000055; background-color: #EAEAEA; text-align: right; }
      #NDepend-report .datacell_rightb1{ color: #000055; background-color: #CACACA; text-align: right; }
      #NDepend-report .datacell_red1 { color: #000055; background-color: #FFCCCC; text-align: right; }
		]]>
		</style>
		
		<div id="NDepend-report">
			<xsl:apply-templates select="//NDepend" />
		</div>
		
	</xsl:template>

	<xsl:template match="NDepend">
		<div class="title">NDepend Report</div>
		<p></p>
		<xsl:apply-templates select="ReportInfo" />
		<div class="biginfo">To get explanations concerning these metrics, go to the <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html" target="_blank">NDepend home page.</A></div>
		<p></p>
		<div class="subtitle">Application Metrics</div>
		<p></p>
		<xsl:apply-templates select="ApplicationMetrics" />
		<p></p>
	</xsl:template>


	<xsl:template match="ReportInfo">
		<div class="biginfo">Application name: <font color="#FF0000"><xsl:value-of select="@AppName"/></font> </div>
		<div class="biginfo">This report has been built on: <font color="#FF0000"><xsl:value-of select="@NDependDate"/></font> </div>		
    </xsl:template>
    
    <xsl:template match="ApplicationMetrics">
		<div class="info">Number of assemblies: <font color="#FF0000"><xsl:value-of select="@NAsm"/></font></div>
		<div class="info">Number of types: <font color="#FF0000"><xsl:value-of select="@NType"/></font></div>
		<div class="info">Number of classes: <font color="#FF0000"><xsl:value-of select="@NClass"/></font></div>
		<div class="info">Number of abstract classes: <font color="#FF0000"><xsl:value-of select="@NAbstractClass"/></font></div>
		<div class="info">Number of interfaces: <font color="#FF0000"><xsl:value-of select="@NInterface"/></font></div>
		<div class="info">Number of value types: <font color="#FF0000"><xsl:value-of select="@NValueType"/></font></div>
		<div class="info">Number of exception classes: <font color="#FF0000"><xsl:value-of select="@NExceptionType"/></font></div>
		<div class="info">Number of attribute classes: <font color="#FF0000"><xsl:value-of select="@NAttributeType"/></font></div>
		<div class="info">Number of delegate classes: <font color="#FF0000"><xsl:value-of select="@NDelegateType"/></font></div>
		<div class="info">Number of enumerations: <font color="#FF0000"><xsl:value-of select="@NEnumType"/></font></div>
		<div class="info">Number of IL instructions: <font color="#FF0000"><xsl:value-of select="@NILInstruction"/></font></div>
		<div class="info">Percentage of public types: <font color="#FF0000"><xsl:value-of select="@PercentPublicType"/></font>%</div>
		<div class="info">Percentage of public methods: <font color="#FF0000"><xsl:value-of select="@PercentPublicMethod"/></font>%</div>
		<div class="info">Percentage of classes with at least one public field: <font color="#FF0000"><xsl:value-of select="@PercentClassWithAtLeastOnePublicField"/></font>%</div>
		<p></p>
		<table border="1" cellpadding="3" cellspacing="0" bordercolor="white">
            <tr>
                <td class="hdrcell_left">Stat</td>
                <td class="hdrcell_left"># Occurrences</td>
                <td class="hdrcell_left">Avg</td>
                <td class="hdrcell_left">StdDev</td>
                <td class="hdrcell_left">Max</td>
            </tr>
			<tr><xsl:apply-templates select="PropertyOnInterface" /></tr>
			<tr><xsl:apply-templates select="MethodOnInterface" /></tr>
			<tr><xsl:apply-templates select="ArgOnMethodOnInterface" /></tr>
			<tr><xsl:apply-templates select="PublicPropertyOnClass" /></tr>
			<tr><xsl:apply-templates select="PublicMethodOnClass" /></tr>
			<tr><xsl:apply-templates select="ArgOnPublicMethodOnClass" /></tr>
			<tr><xsl:apply-templates select="ILInstructionInNonAbstractMethods" /></tr>
			<tr><xsl:apply-templates select="ILInstructionInType" /></tr>
			<tr><xsl:apply-templates select="ResponseForType" /></tr>
			<tr><xsl:apply-templates select="MethodCC" /></tr>
        </table>
        <p></p> <p></p>
    </xsl:template>

    
    <xsl:template match="PropertyOnInterface">
		<td class="datacell_left1">
			Properties on Interfaces
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Occ"/> Interfaces
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right1">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> properties on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="MethodOnInterface">
		<td class="datacell_left0">
			Methods on Interfaces
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Occ"/> Interfaces
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right0">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> methods on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="ArgOnMethodOnInterface">
		<td class="datacell_left1">
			Arguments on Methods on Interfaces
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Occ"/> Methods
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right1">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> arguments on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
        <xsl:template match="PublicPropertyOnClass">
		<td class="datacell_left0">
			Public Properties on Classes
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Occ"/> Classes
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right0">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> public properties on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="PublicMethodOnClass">
		<td class="datacell_left1">
			Public Methods on Classes
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Occ"/> Classes
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right1">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> public methods on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="ArgOnPublicMethodOnClass">
		<td class="datacell_left0">
			Arguments on Public Methods on Classes
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Occ"/> Methods
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right0">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> arguments on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    
   <xsl:template match="ILInstructionInNonAbstractMethods">
		<td class="datacell_left1">
			IL Instructions in non-abstract Methods
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Occ"/> Methods
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right1">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> IL instructions in <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="ILInstructionInType">
		<td class="datacell_left0">
			Number of IL Instructions par non-abstract Types
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Occ"/> Types
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right0">
			<font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> IL instructions in <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    
    <xsl:template match="MethodCC">
		<td class="datacell_left1">
			Cyclomatic complexity on non abstract Methods
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Occ"/> Methods
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right1">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right1">
			CC = <font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> for <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>
    
    <xsl:template match="ResponseForType">
		<td class="datacell_left0">
			Response for Types (IL instructions)
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Occ"/> Types
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@Avg"/>
		</td>
		<td class="datacell_right0">
			<xsl:value-of select="@StdDev"/>
		</td>
		<td class="datacell_right0">
			RFT = <font color="#FF0000"><xsl:value-of select="@MaxVal"/></font> IL instructions on <font color="#FF0000"><xsl:value-of select="@MaxName"/></font>
		</td>
    </xsl:template>

</xsl:stylesheet>