summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-12-27 02:59:06 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-12-27 02:59:06 -0800
commit2e51bdb4d41f88f67ac9ad58d0fcfc715c37c4e2 (patch)
treec4ac5e13028db12366c4b46935436e8a670425ef
parente56ff70e80e141b7e4602c6443f7249a35fff281 (diff)
downloadDotNetOpenAuth-2e51bdb4d41f88f67ac9ad58d0fcfc715c37c4e2.zip
DotNetOpenAuth-2e51bdb4d41f88f67ac9ad58d0fcfc715c37c4e2.tar.gz
DotNetOpenAuth-2e51bdb4d41f88f67ac9ad58d0fcfc715c37c4e2.tar.bz2
Whitespace change, in preparation for file repair.
-rw-r--r--tools/PartCover/xslt/Report By Assembly.xslt113
-rw-r--r--tools/PartCover/xslt/Report By Class.xslt118
2 files changed, 136 insertions, 95 deletions
diff --git a/tools/PartCover/xslt/Report By Assembly.xslt b/tools/PartCover/xslt/Report By Assembly.xslt
index 59c0c15..9309e4e 100644
--- a/tools/PartCover/xslt/Report By Assembly.xslt
+++ b/tools/PartCover/xslt/Report By Assembly.xslt
@@ -1,54 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt">
-<xsl:output method="html" indent="no"/>
+ <xsl:output method="html" indent="yes"/>
+ <xsl:template match="/">
-<xsl:template match="/">
+ <xsl:variable name="cov0style" select="'background:#E79090;text-align:right;'"/>
+ <xsl:variable name="cov20style" select="'background:#D79797;text-align:right;'"/>
+ <xsl:variable name="cov40style" select="'background:#D7A0A0;text-align:right;'"/>
+ <xsl:variable name="cov60style" select="'background:#C7A7A7;text-align:right;'"/>
+ <xsl:variable name="cov80style" select="'background:#C0B0B0;text-align:right;'"/>
+ <xsl:variable name="cov100style" select="'background:#D7D7D7;text-align:right;'"/>
- <xsl:variable name="cov0style" select="'background:#E79090;text-align:right;'"/>
- <xsl:variable name="cov20style" select="'background:#D79797;text-align:right;'"/>
- <xsl:variable name="cov40style" select="'background:#D7A0A0;text-align:right;'"/>
- <xsl:variable name="cov60style" select="'background:#C7A7A7;text-align:right;'"/>
- <xsl:variable name="cov80style" select="'background:#C0B0B0;text-align:right;'"/>
- <xsl:variable name="cov100style" select="'background:#D7D7D7;text-align:right;'"/>
-
- <table style="border-collapse: collapse;">
- <tr style="font-weight:bold; background:whitesmoke;"><td colspan="2">Coverage by assembly</td></tr>
-
- <xsl:variable name="unique-asms" select="/PartCoverReport[@version='4.0']/Type[not(@asmref=following::Type/@asmref)]"/>
- <xsl:for-each select="$unique-asms">
- <xsl:variable name="current-asm" select="./@asmref"/>
- <tr>
-
- <xsl:element name="td">
- <xsl:attribute name="style">background:ghostwhite; padding: 5px 30px 5px 5px;</xsl:attribute>
- <xsl:value-of select="//Assembly[@id=$current-asm]/@name"/>
- </xsl:element>
-
- <xsl:variable name="codeSize" select="sum(//Type[@asmref=$current-asm]/Method/pt/@len)+sum(//Type[@asmref=$current-asm]/Method[count(pt)=0]/@bodysize)"/>
- <xsl:variable name="coveredCodeSize" select="sum(//Type[@asmref=$current-asm]/Method/pt[@visit>0]/@len)"/>
-
- <xsl:element name="td">
- <xsl:if test="$codeSize=0">
- <xsl:attribute name="style"><xsl:value-of select="$cov0style"/></xsl:attribute>
- 0%
- </xsl:if>
-
- <xsl:if test="$codeSize &gt; 0">
- <xsl:variable name="coverage" select="round(100 * $coveredCodeSize div $codeSize)"/>
-
- <xsl:if test="$coverage &gt;= 0 and $coverage &lt; 20"><xsl:attribute name="style"><xsl:value-of select="$cov20style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 20 and $coverage &lt; 40"><xsl:attribute name="style"><xsl:value-of select="$cov40style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 40 and $coverage &lt; 60"><xsl:attribute name="style"><xsl:value-of select="$cov60style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 60 and $coverage &lt; 80"><xsl:attribute name="style"><xsl:value-of select="$cov80style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 80"><xsl:attribute name="style"><xsl:value-of select="$cov100style"/></xsl:attribute></xsl:if>
- <xsl:value-of select="$coverage"/>%
- </xsl:if>
-
- </xsl:element>
+ <table style="border-collapse: collapse;">
+ <tr style="font-weight:bold; background:whitesmoke;">
+ <td colspan="2">Coverage by assembly</td>
</tr>
- </xsl:for-each>
- </table>
-
-</xsl:template>
-</xsl:stylesheet>
+ <xsl:variable name="asms" select="/PartCoverReport/Assembly"/>
+ <xsl:for-each select="$asms">
+ <xsl:variable name="current-asm-node" select="."/>
+ <tr>
+
+ <xsl:element name="td">
+ <xsl:attribute name="style">background:ghostwhite; padding: 5px 30px 5px 5px;</xsl:attribute>
+ <xsl:value-of select="$current-asm-node/@name"/>
+ </xsl:element>
+
+ <xsl:variable name="codeSize" select="sum(/PartCoverReport/Type[@asmref=$current-asm-node/@id]/Method/pt/@len)+0"/>
+ <xsl:variable name="coveredCodeSize" select="sum(/PartCoverReport/Type[@asmref=$current-asm-node/@id]/Method/pt[@visit>0]/@len)+0"/>
+
+ <xsl:element name="td">
+ <xsl:if test="$codeSize=0">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov0style"/>
+ </xsl:attribute>
+ 0%
+ </xsl:if>
+ <xsl:if test="$codeSize &gt; 0">
+ <xsl:variable name="coverage" select="ceiling(100 * $coveredCodeSize div $codeSize)"/>
+ <xsl:if test="$coverage &gt;= 0 and $coverage &lt; 20">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov20style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 20 and $coverage &lt; 40">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov40style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 40 and $coverage &lt; 60">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov60style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 60 and $coverage &lt; 80">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov80style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 80">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov100style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="$coverage"/>%
+ </xsl:if>
+ </xsl:element>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:template> \ No newline at end of file
diff --git a/tools/PartCover/xslt/Report By Class.xslt b/tools/PartCover/xslt/Report By Class.xslt
index 526296c..3aa87ae 100644
--- a/tools/PartCover/xslt/Report By Class.xslt
+++ b/tools/PartCover/xslt/Report By Class.xslt
@@ -1,52 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt">
-<xsl:output method="html" indent="no"/>
-
-<xsl:template match="/">
-
- <xsl:variable name="cov0style" select="'background:#FF4040;text-align:right;'"/>
- <xsl:variable name="cov20style" select="'background:#F06060;text-align:right;'"/>
- <xsl:variable name="cov40style" select="'background:#E78080;text-align:right;'"/>
- <xsl:variable name="cov60style" select="'background:#E0A0A0;text-align:right;'"/>
- <xsl:variable name="cov80style" select="'background:#D7B0B0;text-align:right;'"/>
- <xsl:variable name="cov100style" select="'background:#E0E0E0;text-align:right;'"/>
-
- <table style="border-collapse: collapse;">
- <tr style="font-weight:bold; background:whitesmoke;"><td colspan="2">Coverage by class</td></tr>
-
- <xsl:for-each select="/PartCoverReport[@version='4.0']/Type">
- <tr>
-
- <xsl:element name="td">
- <xsl:attribute name="style">background:ghostwhite; padding: 5px 30px 5px 5px;</xsl:attribute>
- <xsl:value-of select="@name"/>
- </xsl:element>
-
- <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+sum(./Method[count(pt)=0]/@bodysize)"/>
- <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)"/>
-
- <xsl:element name="td">
- <xsl:if test="$codeSize=0">
- <xsl:attribute name="style"><xsl:value-of select="$cov0style"/></xsl:attribute>
- 0%
- </xsl:if>
-
- <xsl:if test="$codeSize &gt; 0">
- <xsl:variable name="coverage" select="round(100 * $coveredCodeSize div $codeSize)"/>
-
- <xsl:if test="$coverage &gt;= 0 and $coverage &lt; 20"><xsl:attribute name="style"><xsl:value-of select="$cov20style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 20 and $coverage &lt; 40"><xsl:attribute name="style"><xsl:value-of select="$cov40style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 40 and $coverage &lt; 60"><xsl:attribute name="style"><xsl:value-of select="$cov60style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 60 and $coverage &lt; 80"><xsl:attribute name="style"><xsl:value-of select="$cov80style"/></xsl:attribute></xsl:if>
- <xsl:if test="$coverage &gt;= 80"><xsl:attribute name="style"><xsl:value-of select="$cov100style"/></xsl:attribute></xsl:if>
- <xsl:value-of select="$coverage"/>%
- </xsl:if>
-
- </xsl:element>
+ <xsl:output method="html" indent="no"/>
+
+ <xsl:template match="/">
+
+ <xsl:variable name="cov0style" select="'background:#FF4040;text-align:right;'"/>
+ <xsl:variable name="cov20style" select="'background:#F06060;text-align:right;'"/>
+ <xsl:variable name="cov40style" select="'background:#E78080;text-align:right;'"/>
+ <xsl:variable name="cov60style" select="'background:#E0A0A0;text-align:right;'"/>
+ <xsl:variable name="cov80style" select="'background:#D7B0B0;text-align:right;'"/>
+ <xsl:variable name="cov100style" select="'background:#E0E0E0;text-align:right;'"/>
+
+ <table style="border-collapse: collapse;">
+ <tr style="font-weight:bold; background:whitesmoke;">
+ <td colspan="2">Coverage by class</td>
</tr>
- </xsl:for-each>
- </table>
-
-</xsl:template>
+
+ <xsl:for-each select="/PartCoverReport[@version='4.0']/Type">
+ <tr>
+
+ <xsl:element name="td">
+ <xsl:attribute name="style">background:ghostwhite; padding: 5px 30px 5px 5px;</xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </xsl:element>
+
+ <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+sum(./Method[count(pt)=0]/@bodysize)"/>
+ <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)"/>
+
+ <xsl:element name="td">
+ <xsl:if test="$codeSize=0">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov0style"/>
+ </xsl:attribute>
+ 0%
+ </xsl:if>
+
+ <xsl:if test="$codeSize &gt; 0">
+ <xsl:variable name="coverage" select="round(100 * $coveredCodeSize div $codeSize)"/>
+
+ <xsl:if test="$coverage &gt;= 0 and $coverage &lt; 20">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov20style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 20 and $coverage &lt; 40">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov40style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 40 and $coverage &lt; 60">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov60style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 60 and $coverage &lt; 80">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov80style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$coverage &gt;= 80">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$cov100style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="$coverage"/>%
+ </xsl:if>
+
+ </xsl:element>
+ </tr>
+ </xsl:for-each>
+ </table>
+
+ </xsl:template>
</xsl:stylesheet>