#!/usr/bin/perl

use XML::DT ;

my $filename = shift;

%xml=( 'song'     => sub{"<hr>\n$c"},
       'words'    => sub{"<pre>$c</pre>"},
       'sound'    => sub{"<a href=$v{file}>Sound file</a><br>"},
       'title'    => sub{
          if ($v{cords} eq "yes") {"<h2>$c</h2> (cords available)<p>";}
          else                    {"<h2>$c</h2>"}},

       '-default' => sub{"<b>$q</b>-$c<br>"},
       '-outputenc' => 'ISO-8859-1'
     );

print dt($filename,%xml);

