home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 September
/
Chip_2004-09_cd1.bin
/
zkuste
/
system
/
download
/
secanal
/
MBSASetup-en.msi
/
Data.Cab
/
reportdetailsIEZones.xsl
< prev
next >
Wrap
Extensible Markup Language
|
2004-01-16
|
3KB
|
78 lines
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="CheckID" select="'CheckIDHere'"></xsl:variable>
<xsl:variable name="ScoreLookup">
<c score="0" url="Graphics/dash.gif" alttext="Check Not Performed"/>
<c score="1" url="Graphics/excl_red.gif" alttext="Unable to scan"/>
<c score="2" url="Graphics/x_red.gif" alttext="Check failed (critical)"/>
<c score="3" url="Graphics/x_gold.gif" alttext="Check failed (non-critical)"/>
<c score="4" url="Graphics/astrx.gif" alttext="Best practice"/>
<c score="5" url="Graphics/chek_grn.gif" alttext="Check passed"/>
<c score="7" url="Graphics/info.gif" alttext="Additional information"/>
</xsl:variable>
<xsl:template match="SecScan">
<h1><xsl:value-of select="Check[@ID=$CheckID]/Advice"/></h1>
<h2>Result Details
<br /><br /><xsl:value-of select="Check[@ID=$CheckID]/Detail/@text"/></h2>
<table id="TableID" width="100%" border="0" cellpadding="0" cellspacing="0" style="border: solid 1px #000000; padding-left: 10px; padding-right: 10px;">
<tr class="DetailHeader">
<td class="ReportListHeader" style="width:40" align="center" valign="middle"><nobr> Score </nobr></td>
<xsl:for-each select="Check[@ID=$CheckID]/Detail/Head/Col">
<td nowrap="nowrap">
<xsl:value-of select="."/>
</td>
</xsl:for-each>
</tr>
<xsl:for-each select="Check[@ID=$CheckID]/Detail">
<xsl:apply-templates select="Row">
</xsl:apply-templates>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="Row">
<xsl:param name="score" select="@Grade"/>
<tr>
<td valign="top" align="center">
<IMG alt="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@alttext}" src="{document('')/*/xsl:variable[@name='ScoreLookup']/c[@score=$score]/@url}" />
</td>
<xsl:for-each select="Col">
<td valign="top">
<xsl:variable name="SubID" select="../SETTINGS/@ID"></xsl:variable>
<xsl:variable name="ZoneName" select="../Col[@HasZoneName='true']"></xsl:variable>
<xsl:choose>
<xsl:when test="@custom='true'">
<xsl:choose>
<xsl:when test="../SETTINGS">
<a href="javascript:OpenIEZonesSubDetails('{$ZoneName}', '{$SubID}');"><xsl:value-of select="."/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@custom='false'">
<xsl:value-of select="."/>
<xsl:choose>
<xsl:when test="../SETTINGS">
(<a href="javascript:OpenIEZonesSubDetails('{$ZoneName}', '{$SubID}');">Custom</a>)
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:for-each>
</tr>
</xsl:template>
</xsl:stylesheet>