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