home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 September / Chip_2004-09_cd1.bin / zkuste / system / download / secanal / MBSASetup-en.msi / Data.Cab / reports.xsl < prev    next >
Extensible Markup Language  |  2004-01-16  |  3KB  |  67 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="Assessment">
  5.       <c score="1" text="Incomplete Scan"/>
  6.       <c score="2" text="Severe Risk"/>
  7.       <c score="3" text="Potential Risk"/>
  8.       <c score="4" text="Security FYIs"/>
  9.       <c score="5" text="Strong Security"/>
  10.     </xsl:variable>
  11.     <xsl:template match="/">
  12.         <html>
  13.         <head>
  14.             <link REL="stylesheet" type="text/css" href="css/scanner.css" />
  15.         </head>
  16.         <body style="BORDER-RIGHT: 0px; MARGIN: 0px; OVERFLOW: auto">
  17.         <xsl:choose>
  18.             <xsl:when test="count(Reports/Report) = 0">
  19.             There are no reports available.
  20.             </xsl:when>
  21.             <xsl:otherwise>
  22.             <!--StartFragment -->
  23.             <table border="0" cellpadding="0" cellspacing="0" width="100%">
  24.                 <tr class="ReportListHeader">
  25.                     <td Style="PADDING-LEFT: 10px;"><B>Computer Name</B></td>
  26.                     <td width="5"><IMG SRC="Graphics/pixel.gif" WIDTH="5" HEIGHT="1" style="visibility:hidden"/></td>
  27.                     <td><B>IP Address</B></td>
  28.                     <td width="5"><IMG SRC="Graphics/pixel.gif" WIDTH="5" HEIGHT="1" style="visibility:hidden"/></td>
  29.                     <td><B>Assessment</B></td>
  30.                     <td width="5"><IMG SRC="Graphics/pixel.gif" WIDTH="5" HEIGHT="1" style="visibility:hidden"/></td>
  31.                     <td><B>Scan Date</B></td>
  32.                 </tr>
  33.                 <xsl:for-each select="Reports">
  34.                     <xsl:apply-templates>
  35.                         <xsl:sort order="sortorder" select="sortfield"/>
  36.                     </xsl:apply-templates>
  37.                 </xsl:for-each>
  38.             </table>
  39.             <!--EndFragment -->
  40.             </xsl:otherwise>
  41.         </xsl:choose>
  42.         </body>
  43.         </html>
  44.     </xsl:template>
  45.     
  46.     <xsl:template match="Report">
  47.         <xsl:param name="score" select="@grade"/>
  48.         <xsl:variable name="classname">
  49.             <xsl:choose>
  50.                 <xsl:when test="(position() mod 2) = 1">ReportsRowOverEven</xsl:when>
  51.                 <xsl:otherwise>ReportsRowOverOdd</xsl:otherwise>
  52.             </xsl:choose>
  53.         </xsl:variable>
  54.         
  55.         <tr    class="{$classname}" onmouseover="this.className='ReportsRowOverSelected';" onmouseout="this.className='{$classname}';">
  56.             <td Style="PADDING-LEFT: 10px;"><A Style="WIDTH:100%;PADDING-LEFT: 1px;" href="javascript:void(0)" onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');" class="sys-link-normal"><xsl:value-of select="@computer"/></A></td>
  57.             <td></td>
  58.             <td Style="PADDING-TOP: 0.35em;" onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="@ip"/></td>
  59.             <td></td>
  60.             <td Style="PADDING-TOP: 0.35em;" onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/></td>
  61.             <td></td>
  62.             <td Style="PADDING-RIGHT: 10px; PADDING-TOP: 0.35em;" onclick="javascript:parent.parent.OpenReport('{@file}','{position() -1}');"><xsl:value-of select="@ldate"/></td>
  63.         </tr>
  64.         
  65.     </xsl:template>
  66.     
  67. </xsl:stylesheet>