#!/usr/bin/perl
use XML::DT ;
my $filename = shift;

%p_proc=(
     '-default'    => sub{ "$c"},
     'proceedings' => sub{ "Proceedings $c". mkKeyInd() },
     'abstract'    => sub{ ""},
     'article'     => sub{ dt($v{file}, %p_art) },
     'chair'       => sub{ "chair: $c"},
);

%p_art=(
     '-default'    => sub{ ""},
     'title'       => sub{ $tit= $c; "  $c"},
     'author'      => sub{ "     <i>$c</i>"},
     'article'     => sub{ "$c"},
     'keyword'     => sub{ $ind{$c} .= "\n      $tit"; "";}
);

print dt($filename,%p_proc); 

sub mkKeyInd { my $r="Index by keywords\n";
  for $term (sort keys %ind){ $r .= "\n   $term $ind{$term}";}
  $r
}
