home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 September / Chip_2004-09_cd1.bin / zkuste / system / download / secanal / MBSASetup-en.msi / Data.Cab / printreport.xsl < prev    next >
Extensible Markup Language  |  2004-01-16  |  19KB  |  512 lines

  1. <?xml version="1.0"?> 
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.     <xsl:variable name="ScoreLookup">
  5.       <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
  6.       <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
  7.       <c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
  8.       <c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
  9.       <c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
  10.       <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
  11.       <c score="6" url="Graphics/dash.gif" alttext="Check not performed"/>
  12.       <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
  13.     </xsl:variable>
  14.     
  15.     <xsl:variable name="Assessment">
  16.       <c score="1" text="Incomplete Scan" longtext="Could not complete one or more requested checks."/>
  17.       <c score="2" text="Severe Risk" longtext="One or more critical checks failed."/>
  18.       <c score="3" text="Potential Risk" longtext="One or more non-critical checks failed."/>
  19.       <c score="4" text="Security FYIs" longtext=""/>
  20.       <c score="5" text="Strong Security" longtext="All checks were passed."/>
  21.     </xsl:variable>
  22.  
  23.     <xsl:variable name="FileName"></xsl:variable>
  24.     
  25.         <xsl:template match="SecScan">
  26.             <xsl:param name="assess" select="@Grade"/>    
  27.             <table>
  28.             <tr>
  29.                 <td class="reportsubheader" width="140">Computer name:</td>
  30.                 <td>
  31.                     <xsl:choose>
  32.                         <xsl:when test="@DisplayName">
  33.                             <xsl:value-of select="@DisplayName"/>
  34.                         </xsl:when>
  35.                         <xsl:otherwise>
  36.                             <xsl:value-of select="@Domain"/>\<xsl:value-of select="@Machine"/>
  37.                         </xsl:otherwise>
  38.                     </xsl:choose>
  39.                 </td>
  40.             </tr>
  41.             <tr>
  42.                 <td class="reportsubheader" width="140">IP address:</td>
  43.                 <td><xsl:value-of select="@IP"/></td>
  44.             </tr>
  45.             <tr>
  46.                 <td class="reportsubheader" width="140">Security report name:</td>
  47.                 <td><xsl:value-of select="$FileName" /></td>
  48.             </tr>
  49.             <xsl:if test="@SUSServer and @SUSServer != ''">
  50.                 <tr>
  51.                     <td class="reportsubheader" width="140">SUS Server:</td>
  52.                     <td><xsl:value-of select="@SUSServer" /></td>
  53.                 </tr>
  54.             </xsl:if>
  55.             <tr>
  56.                 <td class="reportsubheader" width="140">Scan date:</td>
  57.                 <td><xsl:value-of select="@LDate"/></td>
  58.             </tr>
  59.             <xsl:choose>
  60.             <xsl:when test="@HotfixDataVersion">
  61.                   <tr>
  62.                     <td class="reportsubheader" width="140">Security update database version:</td>
  63.                     <td><xsl:value-of select="@HotfixDataVersion"/>
  64.                         <xsl:if test="NewerVersions/@XmlVer"><b>  ** New security updates are available; rescan to use security update database version <xsl:value-of select="NewerVersions/@XmlVer"/> **</b></xsl:if>
  65.                     </td>
  66.                 </tr>
  67.             </xsl:when>
  68.             </xsl:choose>    
  69.  
  70.             <xsl:for-each select="//Check[@DataVersionName and @DataVersion]">
  71.                   <tr>
  72.                     <td class="reportsubheader" width="140"><xsl:value-of select="@DataVersionName"/></td>
  73.                     <td><xsl:value-of select="@DataVersion"/></td>
  74.                 </tr>
  75.             </xsl:for-each>
  76.  
  77.             <tr>
  78.                 <td class="reportsubheader" width="140">Security assessment:</td>
  79.                 <td><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@text"/></td>
  80.             </tr>
  81.             </table>
  82.             
  83.             
  84.             <xsl:choose>
  85.             <xsl:when test="Check[@Type='5']">
  86.                 <br />
  87.                 <div class="reportheader">Security Updates</div>
  88.                 <xsl:choose>
  89.                 <xsl:when test="Check[@Type='5'][@Cat='1']">
  90.                     <br />
  91.                     <table width="100%" style="MARGIN-BOTTOM: 20px;" border="0" cellpadding="0" cellspacing="0">
  92.                         <tr class="ReportListHeader">
  93.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  94.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  95.                             <td><nobr>Result</nobr></td>
  96.                         </tr>
  97.                         <xsl:for-each select=".">
  98.                             <xsl:apply-templates select="Check[@Type='5'][@Cat='1']">
  99.                                 <xsl:sort order="sortorder" select="sortfield"/>
  100.                             </xsl:apply-templates>
  101.                         </xsl:for-each>
  102.                     </table>            
  103.                 </xsl:when>
  104.                 </xsl:choose>
  105.             </xsl:when>
  106.             </xsl:choose>
  107.             
  108.             
  109.             <xsl:choose>
  110.             <xsl:when test="Check[@Type='1']">
  111.                 <br />
  112.                 <div class="reportheader">Windows Scan Results</div>
  113.                 <xsl:choose>
  114.                 <xsl:when test="Check[@Type='1'][@Cat='1']">
  115.                     <br />
  116.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
  117.                     <br />
  118.                     <table width="100%" style="MARGIN-BOTTOM: 20px;" border="0" cellpadding="0" cellspacing="0">
  119.                         <tr class="ReportListHeader">
  120.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  121.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  122.                             <td><nobr>Result</nobr></td>
  123.                         </tr>
  124.                         <xsl:for-each select=".">
  125.                             <xsl:apply-templates select="Check[@Type='1'][@Cat='1']">
  126.                                 <xsl:sort order="sortorder" select="sortfield"/>
  127.                             </xsl:apply-templates>
  128.                         </xsl:for-each>
  129.                     </table>            
  130.                 </xsl:when>
  131.                 </xsl:choose>
  132.                 <xsl:choose>
  133.                 <xsl:when test="Check[@Type='1'][@Cat='2']">
  134.                     <br />
  135.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
  136.                     <br />
  137.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  138.                         <tr class="ReportListHeader">
  139.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  140.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  141.                             <td><nobr>Result</nobr></td>
  142.                         </tr>
  143.                         <xsl:for-each select=".">
  144.                             <xsl:apply-templates select="Check[@Type='1'][@Cat='2']">
  145.                                 <xsl:sort order="sortorder" select="sortfield"/>
  146.                             </xsl:apply-templates>
  147.                         </xsl:for-each>
  148.                     </table>
  149.                 </xsl:when>
  150.                 </xsl:choose>
  151.             </xsl:when>
  152.             </xsl:choose>
  153.  
  154.             <xsl:choose>
  155.             <xsl:when test="Check[@Type='3']">    
  156.                 <br />
  157.                 <div class="reportheader">Internet Information Services (IIS) Scan Results</div>
  158.                 <xsl:choose>
  159.                 <xsl:when test="Check[@Type='3'][@Cat='1']">
  160.                     <br />
  161.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
  162.                     <br />
  163.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  164.                         <tr class="ReportListHeader">
  165.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  166.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  167.                             <td><nobr>Result</nobr></td>
  168.                         </tr>
  169.                         <xsl:for-each select=".">
  170.                             <xsl:apply-templates select="Check[@Type='3'][@Cat='1']">
  171.                                 <xsl:sort order="sortorder" select="sortfield"/>
  172.                             </xsl:apply-templates>
  173.                         </xsl:for-each>
  174.                     </table>            
  175.                 </xsl:when>
  176.                 </xsl:choose>
  177.                 <xsl:choose>
  178.                 <xsl:when test="Check[@Type='3'][@Cat='2']">
  179.                     <br />
  180.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
  181.                     <br />
  182.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  183.                         <tr class="ReportListHeader">
  184.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  185.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  186.                             <td><nobr>Result</nobr></td>
  187.                         </tr>
  188.                         <xsl:for-each select=".">
  189.                             <xsl:apply-templates select="Check[@Type='3'][@Cat='2']">
  190.                                 <xsl:sort order="sortorder" select="sortfield"/>
  191.                             </xsl:apply-templates>
  192.                         </xsl:for-each>
  193.                     </table>
  194.                 </xsl:when>
  195.                 </xsl:choose>
  196.                 <xsl:choose>
  197.                 <xsl:when test="Check[@Type='3'][@Cat='4']">
  198.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  199.                         <tr class="ReportListHeader">
  200.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  201.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  202.                             <td><nobr>Result</nobr></td>
  203.                         </tr>
  204.                         <xsl:for-each select=".">
  205.                             <xsl:apply-templates select="Check[@Type='3'][@Cat='4']">
  206.                                 <xsl:sort order="sortorder" select="sortfield"/>
  207.                             </xsl:apply-templates>
  208.                         </xsl:for-each>
  209.                     </table>
  210.                 </xsl:when>
  211.                 </xsl:choose>
  212.             </xsl:when>
  213.             </xsl:choose>
  214.             
  215.  
  216.             <!-- One tag per SQL Instance, MBSA V1.1 and later -->
  217.             <xsl:choose>
  218.                 <xsl:when test="SQLInstance">
  219.                     <xsl:for-each select=".">
  220.                         <xsl:apply-templates select="SQLInstance"/>
  221.                     </xsl:for-each>
  222.                 </xsl:when>
  223.             </xsl:choose>
  224.  
  225.             <xsl:choose>
  226.             <xsl:when test="Check[@Type='2']">    
  227.                 <br />
  228.                 <div class="reportheader">SQL Server Scan Results</div>
  229.                 <xsl:choose>
  230.                 <xsl:when test="Check[@Type='2'][@Cat='1']">
  231.                     <br />
  232.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
  233.                     <br />
  234.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  235.                         <tr class="ReportListHeader">
  236.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  237.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  238.                             <td><nobr>Result</nobr></td>
  239.                         </tr>
  240.                         <xsl:for-each select=".">
  241.                             <xsl:apply-templates select="Check[@Type='2'][@Cat='1']">
  242.                                 <xsl:sort order="sortorder" select="sortfield"/>
  243.                             </xsl:apply-templates>
  244.                         </xsl:for-each>
  245.                     </table>            
  246.                 </xsl:when>
  247.                 </xsl:choose>
  248.                 <xsl:choose>
  249.                 <xsl:when test="Check[@Type='2'][@Cat='2']">
  250.                     <br />
  251.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
  252.                     <br />
  253.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  254.                         <tr class="ReportListHeader">
  255.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  256.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  257.                             <td><nobr>Result</nobr></td>
  258.                         </tr>
  259.                         <xsl:for-each select=".">
  260.                             <xsl:apply-templates select="Check[@Type='2'][@Cat='2']">
  261.                                 <xsl:sort order="sortorder" select="sortfield"/>
  262.                             </xsl:apply-templates>
  263.                         </xsl:for-each>
  264.                     </table>
  265.                 </xsl:when>
  266.                 </xsl:choose>
  267.                 <xsl:choose>
  268.                 <xsl:when test="Check[@Type='2'][@Cat='4']">
  269.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  270.                         <tr class="ReportListHeader">
  271.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  272.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  273.                             <td><nobr>Result</nobr></td>
  274.                         </tr>
  275.                         <xsl:for-each select=".">
  276.                             <xsl:apply-templates select="Check[@Type='2'][@Cat='4']">
  277.                                 <xsl:sort order="sortorder" select="sortfield"/>
  278.                             </xsl:apply-templates>
  279.                         </xsl:for-each>
  280.                     </table>
  281.                 </xsl:when>
  282.                 </xsl:choose>
  283.             </xsl:when>
  284.             </xsl:choose>
  285.             
  286.             <xsl:choose>
  287.             <xsl:when test="Check[@Type='4']">    
  288.                 <br />
  289.                 <div class="reportheader">Desktop Application Scan Results</div>
  290.                 <xsl:choose>
  291.                 <xsl:when test="Check[@Type='4'][@Cat='1']">
  292.                     <br />
  293.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
  294.                     <br />
  295.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  296.                         <tr class="ReportListHeader">
  297.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  298.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  299.                             <td><nobr>Result</nobr></td>
  300.                         </tr>
  301.                         <xsl:for-each select=".">
  302.                             <xsl:apply-templates select="Check[@Type='4'][@Cat='1']">
  303.                                 <xsl:sort order="sortorder" select="sortfield"/>
  304.                             </xsl:apply-templates>
  305.                         </xsl:for-each>
  306.                     </table>            
  307.                 </xsl:when>
  308.                 </xsl:choose>
  309.                 <xsl:choose>
  310.                 <xsl:when test="Check[@Type='4'][@Cat='2']">
  311.                     <br />
  312.                     <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
  313.                     <br />
  314.                     <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  315.                         <tr class="ReportListHeader">
  316.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  317.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  318.                             <td><nobr>Result</nobr></td>
  319.                         </tr>
  320.                         <xsl:for-each select=".">
  321.                             <xsl:apply-templates select="Check[@Type='4'][@Cat='2']">
  322.                                 <xsl:sort order="sortorder" select="sortfield"/>
  323.                             </xsl:apply-templates>
  324.                         </xsl:for-each>
  325.                     </table>
  326.                 </xsl:when>
  327.                 </xsl:choose>
  328.             </xsl:when>
  329.             </xsl:choose>
  330.             
  331.         </xsl:template>
  332.     
  333.     <xsl:template match="Check">
  334.         <xsl:param name="score" select="@Grade"/>
  335.         
  336.             <xsl:variable name="bgcolor">
  337.             <xsl:choose>
  338.                 <xsl:when test="(position() mod 2) = 1">#8caae6</xsl:when>
  339.                 <xsl:otherwise>#CECFF6</xsl:otherwise>
  340.             </xsl:choose>
  341.             </xsl:variable>
  342.             <tr bgcolor="{$bgcolor}">
  343.                 <td align="center" valign="middle" style="padding-bottom: 10px;">
  344.                     <xsl:choose>
  345.                       <xsl:when test="@Cat='2'">
  346.                         <xsl:choose>
  347.                           <xsl:when test="@ID='121'">
  348.                             <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  349.                            </xsl:when>
  350.                           <xsl:when test="@ID='10121'">
  351.                             <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  352.                            </xsl:when>
  353.                           <xsl:when test="@ID='101'">
  354.                             <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  355.                            </xsl:when>
  356.                           <xsl:when test="@ID='10101'">
  357.                             <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=7]/@url}" />
  358.                            </xsl:when>
  359.                           <xsl:otherwise>
  360.                             <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@url}" />
  361.                           </xsl:otherwise>
  362.                         </xsl:choose>
  363.                       </xsl:when>
  364.                       <xsl:otherwise>
  365.                         <img alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />    
  366.                       </xsl:otherwise>
  367.                     </xsl:choose>    
  368.                 </td>
  369.                 <td width="75" style="padding-bottom: 10px;"><xsl:value-of select="@Name"/></td>
  370.                 <td style="padding-bottom: 10px;"> 
  371.                     <TABLE width="100%">  
  372.                       <TR>
  373.                         <TD align="left" colspan="3"><xsl:value-of select="Advice"/></TD>
  374.                       </TR>
  375.                         <xsl:choose>
  376.                           <xsl:when test="Detail">
  377.                             <TR>
  378.                             <TD>
  379.                             <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;">
  380.                                 <tr class="ReportListHeader">
  381.                                     <xsl:for-each select="Detail/Head/Col">
  382.                                         <td Nowrap="true">
  383.                                         <xsl:value-of select="."/>  
  384.                                         </td>
  385.                                     </xsl:for-each>
  386.                                 </tr>
  387.                                 <xsl:for-each select="Detail">
  388.                                     <xsl:apply-templates select="Row">
  389.                                     </xsl:apply-templates>
  390.                                 </xsl:for-each>
  391.                             </table>
  392.                             </TD>
  393.                             </TR>
  394.                           </xsl:when>
  395.                         </xsl:choose>    
  396.                     </TABLE>
  397.                     <br/>
  398.                 </td>
  399.             </tr>
  400.     </xsl:template>
  401.     
  402.     <xsl:template match="Row">
  403.         <xsl:param name="score" select="@Grade"/>
  404.             <tr>
  405.                 <xsl:for-each select="Col">
  406.                 <td valign="top" style="padding-bottom: 5px;">
  407.                  <xsl:choose>
  408.                   <xsl:when test="@URL and @URL != '' and @URL != ' '">
  409.                     <A href="{@URL}"><xsl:value-of select="."/></A>
  410.                   </xsl:when>
  411.                   <xsl:otherwise>
  412.                     <xsl:value-of select="."/>
  413.                   </xsl:otherwise>
  414.                 </xsl:choose>    
  415.  
  416.                 <xsl:if test="@REQUIREDNAME">
  417.                     <br/><div class="halignlikea">This update requires
  418.                     <xsl:value-of select="@REQUIREDNAME"/>
  419.                     to be installed first.</div>
  420.                 </xsl:if>
  421.  
  422.                 </td>
  423.                 </xsl:for-each>
  424.             </tr>
  425.             <xsl:apply-templates select="SETTINGS">
  426.             </xsl:apply-templates>
  427.     </xsl:template>
  428.     
  429.     <xsl:template match="SETTINGS">
  430.         <xsl:param name="numCols" select="count(Head/Col)"/>
  431.             <tr>
  432.                 <td colspan="4">
  433.                     <table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;">
  434.                         <tr class="ReportListHeader">
  435.                             <xsl:for-each select="Head/Col">
  436.                                 <td Nowrap="true">
  437.                                     <B><xsl:value-of select="."/></B>
  438.                                 </td>
  439.                             </xsl:for-each>
  440.                         </tr>
  441.                         <xsl:apply-templates select="Row">
  442.                         </xsl:apply-templates>
  443.                     </table>
  444.                 </td>
  445.             </tr>
  446.     </xsl:template>
  447.  
  448.  
  449.     <!-- SQL Instance section -->
  450.     <xsl:template match="SQLInstance">
  451.         <br />
  452.         <div class="reportheader">SQL Server Scan Results: Instance <xsl:value-of select="@Name"/></div>
  453.         <xsl:choose>
  454.         <xsl:when test="Check[@Type='2'][@Cat='1']">
  455.             <br />
  456.             <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Vulnerabilities</div>
  457.             <br />
  458.             <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  459.                 <tr class="ReportListHeader">
  460.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  461.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  462.                             <td><nobr>Result</nobr></td>
  463.                 </tr>
  464.                 <xsl:for-each select=".">
  465.                     <xsl:apply-templates select="Check[@Type='2'][@Cat='1']">
  466.                         <xsl:sort order="sortorder" select="sortfield"/>
  467.                     </xsl:apply-templates>
  468.                 </xsl:for-each>
  469.             </table>            
  470.         </xsl:when>
  471.         </xsl:choose>
  472.         <xsl:choose>
  473.         <xsl:when test="Check[@Type='2'][@Cat='2']">
  474.             <br />
  475.             <div class="reportsubheader" style="MARGIN-LEFT: 5px;">Additional System Information</div>
  476.             <br />
  477.             <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  478.                 <tr class="ReportListHeader">
  479.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  480.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  481.                             <td><nobr>Result</nobr></td>
  482.                 </tr>
  483.                 <xsl:for-each select=".">
  484.                     <xsl:apply-templates select="Check[@Type='2'][@Cat='2']">
  485.                         <xsl:sort order="sortorder" select="sortfield"/>
  486.                     </xsl:apply-templates>
  487.                 </xsl:for-each>
  488.             </table>
  489.         </xsl:when>
  490.         </xsl:choose>
  491.         <xsl:choose>
  492.         <xsl:when test="Check[@Type='2'][@Cat='4']">
  493.             <table width="100%" style="MARGIN-BOTTOM: 20px" border="0" cellpadding="0" cellspacing="0">
  494.                 <tr class="ReportListHeader">
  495.                             <td style="width:40" align="center"><nobr>  Score  </nobr></td>
  496.                             <td style="width:80" align="left"><nobr>Issue</nobr></td>
  497.                             <td><nobr>Result</nobr></td>
  498.                 </tr>
  499.                 <xsl:for-each select=".">
  500.                     <xsl:apply-templates select="Check[@Type='2'][@Cat='4']">
  501.                         <xsl:sort order="sortorder" select="sortfield"/>
  502.                     </xsl:apply-templates>
  503.                 </xsl:for-each>
  504.             </table>
  505.         </xsl:when>
  506.         </xsl:choose>
  507.     </xsl:template>
  508.             
  509.  
  510.     
  511. </xsl:stylesheet>
  512.