📄 problemsymbolreporthtml.xsl
字号:
// that when two or more rows are tied, the rank is shown on the first of
// those rows only.
var rowEl, cellEl;
var lastRank = 0;
// Go through the rows from top to bottom.
for (i = 0; i < tblEl.rows.length; i++)
{
rowEl = tblEl.rows[i];
cellEl = rowEl.cells[0];
}
}
</script>
<!-- The real stuff starts here -->
<table width="100%" border="0"><tbody>
<tr>
<td class="tableheadingbgcolour"
style="BORDER-TOP: blue thin ridge; BACKGROUND: lightblue; BORDER-BOTTOM: blue thin ridge"
colSpan="2">
<br/>
<span class="titlebartext"><h1 align="center">Problem Symbol Report</h1></span>
</td>
</tr>
<tr>
<br/><br/>
<table border="0" width="100%" cellpadding="5" cellspacing="5">
<thead>
<tr>
<br/><br/>
<h3 align="left">Symbol Files</h3>
</tr>
<tr>
<th align="left"><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 0, false);">PathName</a></th>
<th><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 1, false);">Symbols</a></th>
<th align="center" width="80"><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 2, false);">Resources /<br/>Controls</a></th>
<th align="center" width="80"><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 3, false);">Commands</a></th>
<th><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 4, false);">Internal<br/>Conflicts</a></th>
<th><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 5, false);">External<br/>Conflicts</a></th>
<th><a href="" onclick="this.blur(); return sortTable('FilesTableBody', 6, false);">Out of Range</a></th>
</tr>
</thead>
<tbody id="FilesTableBody">
<xsl:for-each select="File">
<tr>
<td><xsl:value-of select="PathName" /><br/>(Resource File: <xsl:value-of select="ResourceFile" />)</td>
<td align="center"><xsl:value-of select="count(Symbols/Symbol)"/></td>
<td align="center">
<xsl:choose>
<xsl:when test="Metrics/Resources/MaxValue=0">None</xsl:when>
<xsl:otherwise><xsl:value-of select="Metrics/Resources/MinValue" />-<xsl:value-of select="Metrics/Resources/MaxValue" /></xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
<xsl:when test="Metrics/Commands/MaxValue=0">None</xsl:when>
<xsl:otherwise><xsl:value-of select="Metrics/Commands/MinValue" />-<xsl:value-of select="Metrics/Commands/MaxValue" /></xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
<xsl:when test="Metrics/Conflicts/Internal>0"><font color="red"><b><xsl:value-of select="Metrics/Conflicts/Internal" /></b></font></xsl:when>
<xsl:otherwise><xsl:value-of select="Metrics/Conflicts/Internal" /></xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
<xsl:when test="Metrics/Conflicts/External>0"><font color="red"><b><xsl:value-of select="Metrics/Conflicts/External" /></b></font></xsl:when>
<xsl:otherwise><xsl:value-of select="Metrics/Conflicts/External" /></xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
<xsl:when test="Options/CheckForOutOfRangeSymbols>0">
<xsl:choose>
<xsl:when test="Metrics/OutOfRangeSymbols>0"><font color="red"><b><xsl:value-of select="Metrics/OutOfRangeSymbols" /></b></font></xsl:when>
<xsl:otherwise><xsl:value-of select="Metrics/OutOfRangeSymbols" /></xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>n/a</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
<br/>
<br/>
<!-- The properties for each file follow -->
<xsl:for-each select="File">
<xsl:if test="Metrics/Conflicts>0 or Metrics/OutOfRangeSymbols>0">
<tr>
<xsl:variable name="fileproperties" select="concat('FileProperties_', @uid)" />
<xsl:variable name="fileproperties_id" select="concat($fileproperties, '_h1')" />
<font class="table_caption">
<!-- <a id="DynMessLink" name="FileProperties" href="FileProperties_h1">File Properties</a> -->
<a>
<xsl:attribute name="id">DynMessLink</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="$fileproperties" /></xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="$fileproperties_id" /></xsl:attribute>
<xsl:value-of select="PathName" />
</a>
</font>
<br />
<br />
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<!-- <tr id="FileProperties_h1" align="left"> -->
<tr>
<xsl:attribute name="id"><xsl:value-of select="$fileproperties_id" /></xsl:attribute>
<xsl:attribute name="align">left</xsl:attribute>
<th>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" width="10px" cellpadding="0" cellspacing="0"></table>
</td>
<td>
<xsl:call-template name="symbols_template" />
<br/>
</td>
</tr>
</table>
</th>
</tr>
</table>
</tr>
</xsl:if>
</xsl:for-each>
</tr>
</tbody></table>
<hr width="100%" />
<small><i>Report produced by <xsl:value-of select="/ResOrgExportFile/Application/@name" />
version <xsl:value-of select="/ResOrgExportFile/Application/Version" /> at <xsl:value-of select="/ResOrgExportFile/Timestamp" /><br/>
<br/>
<a>
<xsl:attribute name="href"><xsl:value-of select="/ResOrgExportFile/Application/WebUrl" /></xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="/ResOrgExportFile/Application/WebUrl" />
</a>
</i></small>
</html>
</xsl:template>
<!-- Template to produce the "Symbols" table -->
<xsl:template name="symbols_template" match="*">
<br />
<table border="0" cellpadding="4" cellspacing="0">
<xsl:variable name="symbolstablebody" select="concat('SymbolsTableBody_', @uid)" />
<thead>
<tr>
<th align="left"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 0, false);</xsl:attribute>
Name
</a></th>
<th align="left"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 1, false);</xsl:attribute>
Type
</a></th>
<th align="left"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 2, false);</xsl:attribute>
Value
</a></th>
<xsl:choose>
<xsl:when test="Options/CheckForOutOfRangeSymbols>0">
<th align="center"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 3, false);</xsl:attribute>
Out of Range?
</a></th>
<th align="center"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 4, false);</xsl:attribute>
Read Only?
</a></th>
<th align="left"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 5, false);</xsl:attribute>
Conflicts
</a></th>
</xsl:when>
<xsl:otherwise>
<th align="center"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 3, false);</xsl:attribute>
Read Only?
</a></th>
<th align="left"><a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">this.blur(); return sortTable('<xsl:value-of select="$symbolstablebody" />', 4, false);</xsl:attribute>
Conflicts
</a></th>
</xsl:otherwise>
</xsl:choose>
</tr>
</thead>
<tbody>
<xsl:attribute name="id"><xsl:value-of select="$symbolstablebody" /></xsl:attribute>
<xsl:for-each select="Symbols/Symbol">
<xsl:if test="count(Conflicts/Symbol)>0 or OutOfRange>0">
<xsl:call-template name="symbol_properties_template">
<xsl:with-param name="symbol" select="*"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</tbody>
</table>
<br />
<br />
</xsl:template>
<!-- Template to spit out a single row of symbol properties -->
<xsl:template name="symbol_properties_template" match="*">
<tr>
<!-- <xsl:if test="Conflicts/@total > 0"><xsl:element name="b"/></xsl:if> -->
<td align="left">
<!-- Add an anchor for the symbol (using it's name) so conflicts can reference it -->
<xsl:variable name="symbolanchor" select="concat(@name, '_', @uid)" />
<a>
<xsl:attribute name="name">
<xsl:value-of select="$symbolanchor" />
</xsl:attribute>
</a>
<xsl:value-of select="@name" />
</td>
<td align="left"><xsl:value-of select="Type" /></td>
<td align="left"><xsl:value-of select="Value" /></td>
<xsl:if test="OutOfRange!='n/a'">
<td align="center">
<xsl:choose>
<xsl:when test="OutOfRange>0"><font color="red"><b>Yes</b></font></xsl:when>
<xsl:otherwise>No</xsl:otherwise>
</xsl:choose>
</td>
</xsl:if>
<td align="center">
<xsl:choose>
<xsl:when test="ReadOnly=1"><b>Yes</b></xsl:when>
<xsl:when test="ReadOnly=0">No</xsl:when>
<xsl:otherwise>???</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:for-each select="Conflicts/Symbol">
<xsl:variable name="conflictingsymbolanchor" select="concat('#', @name, '_', @uid)" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$conflictingsymbolanchor" /></xsl:attribute>
<xsl:value-of select="@name" />
</a>
<br />
</xsl:for-each>
</td>
<!-- <xsl:if test="Conflicts/@total > 0"><xsl:element name="/b"/></xsl:if> -->
</tr>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -