blob: 8f92b59a4e21a8530c89c3b09fab4d63ab8c9984 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<script language="javascript">
function sort(col)
{
var table = document.getElementById("data");
for (var i = 2; i &lt; table.rows.length; i++)
{
for (var j = i - 1; j &gt; 0; j--)
{
var x = parseInt(table.rows[i].cells[col].childNodes[0].data);
var y = parseInt(table.rows[j].cells[col].childNodes[0].data);
if (x &lt; y)
{
move(table, i, j + 1);
break;
}
if (j == 1)
{
move(table, i, 1);
break;
}
}
}
}
function move(table, src, target)
{
var td_name = document.createElement("td");
var td_ref = document.createElement("td");
td_name.appendChild(document.createTextNode(table.rows[src].cells[0].childNodes[0].data));
td_ref.appendChild(document.createTextNode(table.rows[src].cells[1].childNodes[0].data));
table.deleteRow(src);
var tr = table.insertRow(target);
tr.appendChild(td_name);
tr.appendChild(td_ref);
}
</script>
<body>
<table border="0" cellpadding="2" cellspacing="5" width="100%">
<tr>
<td align="left" width="60%">
<font style="font-size: x-large;; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold">
API Usage Report
</font>
</td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="5" width="100%">
<tr>
<td ALIGN="LEFT" VALIGN="TOP" COLSPAN="2" BGCOLOR="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">
API usage summary
</font></b></td>
</tr>
</table>
<!--
<br/>
<p>
Sort by:
<select name="sortby" onchange="javascript:sort(this.selectedIndex)">
<option value="0">Plug-in</option>
<option value="1">Reference count</option>
</select>
</p>
-->
<xsl:for-each select="root/team">
<xsl:sort select="@lead"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="team">
<h2><xsl:value-of select="@lead"/></h2>
<table id="data" border="1" width="80%">
<tr>
<th width="95%">Plug-in</th>
<th>Reference count</th>
</tr>
<xsl:for-each select="plugin">
<xsl:sort select="@id"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="plugin">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@ref"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>