admin/report-overview.xsl
branchreports
changeset 1939 ef24edf20619
parent 948 34e4ac52bc0a
--- a/admin/report-overview.xsl	Sat Dec 22 23:36:04 2018 +0100
+++ b/admin/report-overview.xsl	Sat Dec 22 23:40:19 2018 +0100
@@ -27,6 +27,26 @@
         <xsl:attribute name="class">header</xsl:attribute>
     </xsl:attribute-set>
     
+    <xsl:attribute-set name="xslt2">
+        <xsl:attribute name="title">Tests that can be run on an XSLT 2.0 processor, but not on an XSLT 1.0 processor</xsl:attribute>
+    </xsl:attribute-set>
+    
+    <xsl:attribute-set name="xslt3">
+        <xsl:attribute name="title">Tests that can be run on an XSLT 3.0 processor, but not on an XSLT 2.0 or lower processor</xsl:attribute>
+    </xsl:attribute-set>
+    
+    <xsl:attribute-set name="xsltany">
+        <xsl:attribute name="title">Tests that can be run on an any XSLT processor</xsl:attribute>
+    </xsl:attribute-set>
+    
+    <xsl:attribute-set name="total">
+        <xsl:attribute name="title">Total tests in this category</xsl:attribute>
+    </xsl:attribute-set>
+    
+    <xsl:attribute-set name="pass">
+        <xsl:attribute name="title">Tests passed by zero/one/more processors</xsl:attribute>
+    </xsl:attribute-set>
+    
     <xsl:attribute-set name="last-header-cell" use-attribute-sets="header-cell">
     </xsl:attribute-set>
     
@@ -41,7 +61,7 @@
                     
                     table {
                         border: 1pt gray solid;
-                        width: 600px;
+                        width: 900px;
                     }
                     
                     table * {
@@ -50,12 +70,19 @@
                     
                     th {
                         border: 0pt gray solid;
+                        border-left: 1pt gray dotted;
                         padding: 3pt .8em 2pt .8em;
                         text-align: left;
                     }
                     
                     table th.header {
                         font-size: 12pt;
+                        text-align: right;
+                        cursor: help;
+                        text-decoration: underline;
+                        text-decoration-style: dotted;
+                        text-decoration-color: gray;
+                        white-space: nowrap;
                     }
                     
                     tr > th:first-child {
@@ -64,6 +91,7 @@
                     
                     td {
                         border: 0pt gray solid;
+                        border-left: 1pt gray dotted;
                         padding: 2pt .8em 2pt .8em;
                         text-align: right;
                     }
@@ -91,22 +119,25 @@
     <xsl:template match="report/overview">
         <tr>
             <th xsl:use-attribute-sets="header-cell">&#xA;</th>
-            <th xsl:use-attribute-sets="header-cell">XSLT 2.0</th>
-            <th xsl:use-attribute-sets="header-cell">XSLT 3.0</th>
-            <th xsl:use-attribute-sets="header-cell">Unclassified / other</th>
-            <th xsl:use-attribute-sets="last-header-cell">Total</th>
+            <th xsl:use-attribute-sets="header-cell xslt2">XSLT 2.0</th>
+            <th xsl:use-attribute-sets="header-cell xslt3">XSLT 3.0</th>
+            <th xsl:use-attribute-sets="header-cell xsltany">Other</th>
+            <th xsl:use-attribute-sets="header-cell total">Total</th>
+            <th xsl:use-attribute-sets="header-cell pass">Pass rate</th>
         </tr>
         <tr>
-            <th xsl:use-attribute-sets="first-cell">All categories</th>
+            <th xsl:use-attribute-sets="first-cell">All categories<br />&#xA0;</th>
             <td xsl:use-attribute-sets="cell">{xslt2-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt3-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt-other/@count}</td>
-            <td xsl:use-attribute-sets="last-cell">{@total-tests-in-xt3}</td>
+            <td xsl:use-attribute-sets="cell">{@total-tests-in-xt3}</td>
+            <td xsl:use-attribute-sets="last-cell"><span style="color:red">{@total-tests-in-xt3 - pass1/@count - pass2/@count}</span>/{pass1/@count}/{pass2/@count}</td>
         </tr>
         <xsl:apply-templates select="../category/overview" />
     </xsl:template>
     
     <xsl:template match="category/overview">
+        <!-- totals in the very first "overview by category" -->
         <tr>
             <th xsl:use-attribute-sets="first-cell">
                 <a href="#{encode-for-uri(parent::category/@name)}-xt3">{parent::category/@name}</a>
@@ -114,25 +145,42 @@
             <td xsl:use-attribute-sets="cell">{xslt2-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt3-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt-other/@count}</td>
-            <td xsl:use-attribute-sets="last-cell">{@total-tests-in-category}</td>
+            <td xsl:use-attribute-sets="cell">{@total-tests-in-category}</td>
+            <td xsl:use-attribute-sets="last-cell"><span style="color:red">{@total-tests-in-category - pass1/@count - pass2/@count}</span>/{pass1/@count}/{pass2/@count}</td>
         </tr>
     </xsl:template>
     
     <xsl:template match="report/category">
+        <!-- caption-then-report per category, as clicked-through from the opening table -->
         <table>
             <caption><a id="{encode-for-uri(@name)}-xt3" />{@name} (XT3)</caption>
+            
+            <tr>
+              <th xsl:use-attribute-sets="header-cell">&#xA0;</th>
+              <th xsl:use-attribute-sets="header-cell xslt2">XSLT 2.0</th>
+              <th xsl:use-attribute-sets="header-cell xslt3">XSLT 3.0</th>
+              <th xsl:use-attribute-sets="header-cell xsltany">Other</th>
+              <th xsl:use-attribute-sets="header-cell total">Total</th>
+              <th xsl:use-attribute-sets="last-header-cell pass">Pass rate</th>
+            </tr>
+            
+            <!-- first row per category -->
             <xsl:apply-templates select="overview" mode="cat-overview" />
+            
+            <!-- other rows, to be clicked-through further down -->
             <xsl:apply-templates select="test-set" />
         </table>
     </xsl:template>
 
     <xsl:template match="category/overview" mode="cat-overview">
+        <!-- totals per category, as clicked-through from the opening table, this is the first row -->
         <tr>
             <th xsl:use-attribute-sets="first-cell">{parent::category/@name} (all)</th>
             <td xsl:use-attribute-sets="cell">{xslt2-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt3-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt-other/@count}</td>
-            <td xsl:use-attribute-sets="last-cell">{@total-tests-in-category}</td>
+            <td xsl:use-attribute-sets="cell">{@total-tests-in-category}</td>
+            <td xsl:use-attribute-sets="last-cell"><span style="color:red">{@total-tests-in-category - pass1/@count - pass2/@count}</span>/{pass1/@count}/{pass2/@count}</td>
         </tr>
     </xsl:template>
 
@@ -144,7 +192,8 @@
             <td xsl:use-attribute-sets="cell">{xslt2-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt3-specific/@count}</td>
             <td xsl:use-attribute-sets="cell">{xslt-other/@count}</td>
-            <td xsl:use-attribute-sets="last-cell">{@total-tests}</td>
+            <td xsl:use-attribute-sets="cell">{@total-tests}</td>
+            <td xsl:use-attribute-sets="last-cell"><span style="color:red">{@total-tests - pass1/@count - pass2/@count}</span>/{pass1/@count}/{pass2/@count}</td>
         </tr>
     </xsl:template>
     
@@ -156,10 +205,12 @@
             <tr>
                 <th xsl:use-attribute-sets="header-cell">&#xA;</th>
                 <th xsl:use-attribute-sets="header-cell">Total</th>
+                <th xsl:use-attribute-sets="header-cell pass">Pass rate</th>
             </tr>
             <tr>
                 <th xsl:use-attribute-sets="first-cell">All features</th>
                 <td xsl:use-attribute-sets="cell">{sum(feature/@count[not(contains(., 'unknown'))])}</td>
+                <td xsl:use-attribute-sets="cell">{sum(feature[@count != 'unknown']/@pass1)}/{sum(feature[@count != 'unknown']/@pass2)}</td>
             </tr>
             <xsl:for-each-group select="feature" group-adjacent="@group">
                 <tr>