while (<XML>) {
if (/__print_map\((.*)\)/) {
my $map = $1;
+ my $maptitle = $1;
+ $maptitle =~ s/^(.)/\U$1\E/;
unless ($MAP{$map}) {
warn "map $map undefined";
next;
}
+ my $title = $map;
+ $title =~ s/(.)(.+)/\U$1\E$2/;
print <<EOT;
-<sect2 id="${map}_map">
-<title>$map menu</title>
+<sect2 id="${map}-map">
+<title>$maptitle Menu</title>
$DOC{$map}
-<table id="${map}_table">
-<title>Default $map function bindings</title>
+<table id="tab-${map}-bindings">
+<title>Default $title Menu Bindings</title>
<tgroup cols="3">
<thead>
<row><entry>Function</entry><entry>Default key</entry><entry>Description</entry></row>
</sect2>
EOT
- delete $MAP{$1};
+ delete $MAP{$map};
} else {
print;
}