--- trunk/all2xml.pl 2003/03/15 21:48:48 42 +++ trunk/all2xml.pl 2003/03/22 22:43:05 43 @@ -32,7 +32,7 @@ getopts('d:m:qs', \%opts); -my $db_dir; +my $path; # this is name of database Text::Iconv->raise_error(1); # Conversion errors raise exceptions @@ -124,7 +124,6 @@ if ($filter) { no strict 'refs'; $swish_data .= join(" ",&$filter($swish)); -print STDERR "#### $swish_data\n"; } else { $swish_data .= $swish; } @@ -154,10 +153,10 @@ if ($filter) { no strict 'refs'; foreach my $d (&$filter($index_data)) { - $index->insert($field, $d, $db_dir); + $index->insert($field, $d, $path); } } else { - $index->insert($field, $index_data, $db_dir); + $index->insert($field, $index_data, $path); } } } @@ -253,9 +252,11 @@ $last_p = $p; } - if (my $xml = $cp2utf->convert(isis2xml($row,$add_xml))) { + my $swishpath = $path."#".int($row->{mfn}); + + if (my $xml = $cp2utf->convert(isis2xml($row,$add_xml."$swishpath"))) { use bytes; # as opposed to chars - print "Path-Name: $path#".int($row->{mfn})."\n"; + print "Path-Name: $swishpath\n"; print "Content-Length: ".(length($xml)+1)."\n"; print "Document-Type: XML\n\n$xml\n"; }