--- branches/hidra/all2xml.pl 2005/02/04 15:00:24 658 +++ branches/hidra/all2xml.pl 2005/02/17 18:18:49 674 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Biblio::Isis 0.12; +use Biblio::Isis; use Getopt::Std; use Data::Dumper; use XML::Simple; @@ -633,6 +633,10 @@ foreach my $database ($cfg->Sections) { + # save database name in global variable path for later + # (need for index filter creation) + $path = $database; + my $type = lc($cfg -> val($database, 'type')) || die "$database doesn't have 'type' defined"; my $add_xml = $cfg -> val($database, 'xml'); # optional @@ -743,12 +747,10 @@ next; } - my $max_rowid = $db->count; + my $max_rowid = $db->count if ($db); print STDERR "Reading database: $isis_db [$max_rowid rows]\n"; - $path = $database; - for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) { my $row = $db->to_hash( $row_id ); if ($row) { @@ -830,6 +832,9 @@ print "Document-Type: XML\n\n$xml\n"; } } + + print STDERR "\n"; + } elsif ($type_base eq "marc") { require MARC::File::USMARC;