--- trunk/all2xml.pl 2005/02/27 23:07:35 678 +++ trunk/all2xml.pl 2005/02/28 10:01:34 679 @@ -64,7 +64,6 @@ 'excel' => 'column', 'marc' => 'marc', 'feed' => 'feed', - 'dbf' => 'isis', # special case, re-use isis import_xml ); my $cache; # for cacheing @@ -226,7 +225,7 @@ my ($swish,$display); - my $tag = $type2tag{$type} || die "can't find which tag to use for type $type"; + my $tag = $cfg->val($database, 'import_xml_tag') || $type2tag{$type} || die "can't find which tag to use for type $type"; # is this field page-by-page? my $iterate_by_page = $config->{indexer}->{$field}->{iterate_by_page}; @@ -668,7 +667,8 @@ print STDERR "opening lookup file '$lookup_file'\n"; } - my $import_xml_file = "./import_xml/$type.xml"; + my $import_xml_type = $cfg->val($database, 'import_xml_file') || $type; + my $import_xml_file = "./import_xml/$import_xml_type.xml"; if (! -r $import_xml_file) { print STDERR "ERROR: file $import_xml_file not readable skipping!\n"; @@ -681,7 +681,8 @@ my $type_base = $type; $type_base =~ s/_.+$//g; - $config=XMLin($import_xml_file, ForceArray => [ $type2tag{$type_base}, 'config', 'format' ], ForceContent => 1 ); + my $tag = $cfg->val($database, 'import_xml_tag') || $type2tag{$type_base} || die "can't find which tag to use for type $type"; + $config=XMLin($import_xml_file, ForceArray => [ $tag, 'config', 'format' ], ForceContent => 1 ); # helper for progress bar sub fmt_time { @@ -743,7 +744,6 @@ } # now read database -print STDERR "using: $type...\n"; # erase cache for tags by order in this database delete $cache->{tags_by_order};