--- trunk2/all2all.pl 2004/06/16 14:31:33 358 +++ trunk2/all2all.pl 2004/06/17 17:25:12 370 @@ -16,11 +16,11 @@ my $webpac = new WebPAC( code_page => 'ISO-8859-2', limit_mfn => 500, + debug => 1, ) || die; $|=1; -print "reading database\n"; my $maxmfn = $webpac->open_isis( filename => shift @ARGV || '/data/hidra/THS/THS', lookup => [ @@ -34,28 +34,17 @@ print "rows: $maxmfn\n\n"; -my $rec = $webpac->{'data'}->{1}; +$webpac->open_import_xml(type => 'isis_hidra_ths'); -print $webpac->parse($rec,'pero v250^a - v999 bla'),"\n"; +while (my $rec = $webpac->fetch_rec) { -__END__ + my @ds = $webpac->data_structure($rec); -for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) { - my $rec = $webpac->{'data'}->{$mfn} || die "no record with mfn $mfn"; + print $webpac->output( + template => 'text.tt', + data => \@ds, + ) if (@ds); - print "-- ",$webpac->fill_in($rec,'v250^a (v901^a)'),"\n"; - - my @t = $webpac->fill_in($rec,'v553^1;;v553^a'); - print " Uži pojam: ",join("\t\n",@t),"\n" if (@t); - - @t = $webpac->fill_in($rec,'[a:v251::];;[d:[a:v251::]]'); - print " Područje: ",join("\t\n",@t),"\n" if (@t); - - @t = $webpac->fill_in($rec,'[a:v561^4:v251:];;[d:[a:v561^4:v251:]]'); - print " Mikrotezaurus: ",join("\t\n",@t),"\n" if (@t); - - @t = $webpac->fill_in($rec,'[a:v561^4:v562^4:v900];;[d:[a:v561^4:v562^4:v900]]'); - print " Deskriptor: ",join("\t\n",@t),"\n" if (@t); } print "## lookup ",Dumper($webpac->{'lookup'});