<?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:variable name="project" select="//buildproject/text()"/>
<xsl:variable name="label" select="//buildlabel/text()" />
	
	<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">Types Metrics</div>
		<xsl:apply-templates select="TypesMetrics" />
		<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="TypesMetrics">
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#RFT"    target="_blank"><div class="subtitleref">RFT: Response For Type</div></A>
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#LCOM"   target="_blank"><div class="subtitleref">LCOM: Lack of Cohesion Of Methods of a class</div></A>  
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#CC"     target="_blank"><div class="subtitleref">CC: Cyclomatic Complexity</div></A>
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#TypeCa" target="_blank"><div class="subtitleref">Ca: Afferent Coupling</div></A>         
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#TypeCe" target="_blank"><div class="subtitleref">Ce: Efferent Coupling</div></A>   
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#ABC"    target="_blank"><div class="subtitleref">ABC: Association Between Classes</div></A>      
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#NOC"    target="_blank"><div class="subtitleref">NOC: Number Of Children</div></A>    
        <A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#DIT"    target="_blank"><div class="subtitleref">DIT: Depth in Inheritence Tree</div></A>       
        <table border="1" cellpadding="3" cellspacing="0" bordercolor="white">
            <tr>
                <td class="hdrcell_left">Type</td>
                <td class="hdrcell_rightb"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#RFT"    target="_blank">RFT Method</A></td>
                <td class="hdrcell_rightb"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#RFT"   target="_blank">RFT ILInst</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#LCOM"      target="_blank">LCOM</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#LCOM"  target="_blank">LCOM(HS)</A></td>
                <td class="hdrcell_rightb"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#CC" target="_blank">CC</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#TypeCa"     target="_blank">Ca</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#TypeCe"     target="_blank">Ce</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#ABC"     target="_blank">ABC</A></td>
                <td class="hdrcell_rightb"># Instance Methods</td>
                <td class="hdrcell_rightb"># Static Methods</td>
                <td class="hdrcell_rightb"># Prop</td>
                <td class="hdrcell_rightb"># Fld</td>
                <td class="hdrcell_rightb"># ILInst</td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#NOC" target="_blank">NOC</A></td>
                <td class="hdrcell_right"><A HREF="http://smacchia.chez.tiscali.fr/NDepend.html#DIT" target="_blank">DIT</A></td>

                <td class="hdrcell_leftb">Namespace</td>
                
            </tr>
			<xsl:apply-templates select="TypeMetric" />
        </table>
        <p></p>
    </xsl:template>

    
    <xsl:template match="TypeMetric">
        <tr>
            <td class="datacell_left{position() mod 2}"><xsl:value-of select="@TypeName"/></td>

         <xsl:choose>
				<xsl:when test="@IsBadResponseForAType_Method='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@ResponseForAType_Method"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@ResponseForAType_Method"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadResponseForAType_ILInst='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@ResponseForAType_PercentageApp"/>% (<xsl:value-of select="@ResponseForAType_ILInst"/>)</td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@ResponseForAType_PercentageApp"/>% (<xsl:value-of select="@ResponseForAType_ILInst"/>)</td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadLackOfCohesionOfMethods='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@LackOfCohesionOfMethods"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@LackOfCohesionOfMethods"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadLackOfCohesionOfMethods_HS='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@LackOfCohesionOfMethods_HS"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@LackOfCohesionOfMethods_HS"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadCyclomaticComplexity='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@CyclomaticComplexity"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@CyclomaticComplexity"/></td>
				</xsl:otherwise>
           </xsl:choose>

           <xsl:choose>
				<xsl:when test="@IsBadAfferentCoupling='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@AfferentCoupling"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@AfferentCoupling"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadEfferentCoupling='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@EfferentCoupling"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@EfferentCoupling"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadAssociationBetweenClasses='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@AssociationBetweenClasses"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@AssociationBetweenClasses"/></td>
				</xsl:otherwise>
           </xsl:choose>

            <xsl:choose>
				<xsl:when test="@IsBadNInstanceMethods='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NInstanceMethods"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@NInstanceMethods"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadNStaticMethods='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NStaticMethods"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@NStaticMethods"/></td>
				</xsl:otherwise>
           </xsl:choose>
            
           <xsl:choose>
				<xsl:when test="@IsBadNProperties='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NProperties"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@NProperties"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadNFields='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NFields"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@NFields"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadNILInstructionOnType='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NILInstructionOnType"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_rightb{position() mod 2}"><xsl:value-of select="@NILInstructionOnType"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadNChildren='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@NChildren"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@NChildren"/></td>
				</xsl:otherwise>
           </xsl:choose>
           
           <xsl:choose>
				<xsl:when test="@IsBadDepthOfInheritanceTree='True'">
					<td class="datacell_red{position() mod 2}"><xsl:value-of select="@DepthOfInheritanceTree"/></td>
				</xsl:when>
				<xsl:otherwise>
				    <td class="datacell_right{position() mod 2}"><xsl:value-of select="@DepthOfInheritanceTree"/></td>
				</xsl:otherwise>
           </xsl:choose>
           

       
            <td class="datacell_leftb{position() mod 2}"><xsl:value-of select="@TypeNamespace"/></td>
        </tr>
    </xsl:template>


</xsl:stylesheet>
