home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 September / Chip_2004-09_cd1.bin / zkuste / system / download / secanal / MBSASetup-en.msi / Data.Cab / reportdetailsHF.xsl < prev    next >
Extensible Markup Language  |  2004-01-16  |  6KB  |  153 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="CheckID" select="'CheckIDHere'"></xsl:variable>
  5.  
  6.     <xsl:variable name="ScoreLookup">
  7.       <c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
  8.       <c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
  9.       <c score="2" url="Graphics/x_red.gif" alttext="Missing security update"/>
  10.       <c score="3" url="Graphics/x_gold.gif" alttext="Warning"/>
  11.       <c score="4" url="Graphics/astrx.gif" alttext="Note message"/>
  12.       <c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
  13.       <c score="6" url="Graphics/info.gif" alttext="Additional information"/>
  14.       <c score="7" url="Graphics/info.gif" alttext="Additional information"/>
  15.     </xsl:variable>
  16.     
  17.     <xsl:template match="Col">
  18.         <td valign="top" style="padding-right:5px;">
  19.             <xsl:choose>
  20.                 <xsl:when test="@URL and @URL != '' and @URL != ' '">
  21.                     <A target="_blank" href="{@URL}"><xsl:value-of select="."/></A>
  22.                 </xsl:when>
  23.                 <xsl:otherwise>
  24.                     <xsl:value-of select="."/>
  25.                 </xsl:otherwise>
  26.             </xsl:choose>
  27.  
  28.             <xsl:if test="@REQUIREDNAME">
  29.                 <br/><font size="-1">This update requires
  30.                 <xsl:value-of select="@REQUIREDNAME"/>
  31.                 to be installed first.</font>
  32.             </xsl:if>
  33.         </td>
  34.     </xsl:template>
  35.  
  36.     <xsl:template match="SecScan">
  37.         
  38.             <h1><xsl:value-of select="Check[@ID=$CheckID]/Advice"/></h1>
  39.             <h2>Result Details<br /><br /><xsl:value-of select="Check[@ID=$CheckID]/Detail/@text"/></h2>
  40.             <table id="TableID" width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 0px #000000; padding-left: 10px; padding-right: 10px;">
  41.             <tr><td>
  42.             <xsl:choose>
  43.                 <xsl:when test="Check[@ID=$CheckID]">
  44.                     <xsl:choose>
  45.                         <xsl:when test="Check[@ID=$CheckID]/Detail/Row[@Grade='2']">
  46.                         <span>Security updates confirmed as missing are marked with a red X</span><br />
  47.                         <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  48.                         <tr class="DetailHeader">
  49.                             <td style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  50.                             <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  51.                                 <td nowrap="nowrap">
  52.                                     <xsl:value-of select="."/> 
  53.                                 </td>
  54.                             </xsl:for-each>
  55.                         </tr>
  56.                         <xsl:for-each select="Check[@ID=$CheckID]/Detail/Row[@Grade='2']">
  57.                         <tr>
  58.                             <td valign="top" align="center">
  59.                                 <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=2]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=2]/@url}" />        
  60.                             </td>
  61.                             <xsl:apply-templates select="Col" />
  62.                         </tr>
  63.                         </xsl:for-each>
  64.                         </table>
  65.                         <br />
  66.                         </xsl:when>
  67.                     </xsl:choose>
  68.                     
  69.                     <xsl:choose>
  70.                         <xsl:when test="Check[@ID=$CheckID]/Detail/Row[@Grade='3']">
  71.                         <span>Security updates that are out of date are marked with a yellow X</span><br />
  72.                         <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  73.                         <tr class="DetailHeader">
  74.                             <td style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  75.                             <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  76.                                 <td nowrap="nowrap">
  77.                                     <xsl:value-of select="."/> 
  78.                                 </td>
  79.                             </xsl:for-each>
  80.                         </tr>
  81.                         <xsl:for-each select="Check[@ID=$CheckID]/Detail/Row[@Grade='3']">
  82.                         <tr>
  83.                             <td valign="top" align="center">
  84.                                 <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=3]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=3]/@url}" />        
  85.                             </td>
  86.                             <xsl:apply-templates select="Col" />
  87.                         </tr>
  88.                         </xsl:for-each>
  89.                         </table>
  90.                         <br />
  91.                         </xsl:when>
  92.                     </xsl:choose>
  93.                     
  94.                     <xsl:choose>
  95.                         <xsl:when test="Check[@ID=$CheckID]/Detail/Row[@Grade='4']">
  96.                         <span>Security updates that the tool cannot confirm as installed on the scanned computer are marked with a blue asterisk</span><br />
  97.                         <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  98.                         <tr class="DetailHeader">
  99.                             <td style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  100.                             <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  101.                                 <td nowrap="nowrap">
  102.                                     <xsl:value-of select="."/> 
  103.                                 </td>
  104.                             </xsl:for-each>
  105.                         </tr>
  106.                         <xsl:for-each select="Check[@ID=$CheckID]/Detail/Row[@Grade='4']">
  107.                         <tr>
  108.                             <td valign="top" align="center">
  109.                                 <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=4]/@url}" />        
  110.                             </td>
  111.                             <xsl:apply-templates select="Col" />                        
  112.                         </tr>
  113.                         </xsl:for-each>
  114.                         </table>
  115.                         <br />
  116.                         </xsl:when>
  117.                     </xsl:choose>
  118.  
  119.                     <xsl:choose>
  120.                         <xsl:when test="Check[@ID=$CheckID]/Detail/Row[@Grade='6']">
  121.                             <span>The following security updates are confirmed as missing but need to be installed on the administrative installation point by a system administrator. See KB 832665 for more information.
  122.                             </span><br />
  123.                             <table cellpadding="0" cellspacing="0" style="border: solid 1px #000000">
  124.                             <tr class="DetailHeader">
  125.                                 <td style="width:40" align="center" valign="middle"><nobr>  Score  </nobr></td>
  126.                                 <xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
  127.                                     <td nowrap="nowrap">
  128.                                         <xsl:value-of select="."/> 
  129.                                     </td>
  130.                                 </xsl:for-each>
  131.                             </tr>
  132.                             <xsl:for-each select="Check[@ID=$CheckID]/Detail/Row[@Grade='6']">
  133.                             <tr>
  134.                                 <td valign="top" align="center">
  135.                                     <IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=6]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=6]/@url}" />
  136.                                 </td>
  137.                                 <xsl:apply-templates select="Col" />                        
  138.                             </tr>
  139.                             </xsl:for-each>
  140.                             </table>
  141.                             <br />
  142.                         </xsl:when>
  143.                     </xsl:choose>
  144.                     
  145.             </xsl:when>
  146.             </xsl:choose>
  147.             </td></tr>
  148.             </table>
  149.     </xsl:template>
  150.  
  151.         
  152. </xsl:stylesheet>
  153.