-%# $Id: stats.mc,v 1.6 2007-01-24 09:28:02 mike Exp $
+%# $Id: stats.mc,v 1.9 2007-11-02 12:49:28 mike Exp $
<%doc>
Here are the headings in the Z-Spy version:
The ten most commonly supported Bib-1 Use attributes
<& table, stats => $stats, data => "domains",
title => "Top Domains",
headings => [ "Top Domain"] &>
+<& table, stats => $stats, data => "implementation",
+ title => "Implementation",
+ headings => [ "Name" ], maxrows => 20 &>
%#
%#
<%def table>
$stats
$data
$title
+$maxrows => 10
@headings
$col3 => undef
</%args>
my $hr;
$hr = $stats->{$data};
my @sorted = sort { $hr->{$b} <=> $hr->{$a} || $a <=> $b } keys %$hr;
-my $n = @sorted; $n = 10 if @sorted > 10;
+my $n = @sorted; $n = $maxrows if @sorted > 10;
foreach my $i (1..$n) {
my $key = $sorted[$i-1];
</%perl>
<tr>
<td><% $i %></td>
- <td><% xml_encode($key, "HUH?") %></td>
+ <td><% xml_encode(substr($key, 0, 54), "HUH?") %></td>
% if (defined $col3) {
<td><% xml_encode(&$col3($key), "HUH2?") %></td>
% }