Changeset 20321
- Timestamp:
- 2009-08-18T16:50:01+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugouts/MARCXMLPlugout.pm
r17203 r20321 49 49 'desc' => "{MARCXMLPlugout.mapping_file}", 50 50 'type' => "string", 51 'deft' => " $ENV{'GSDLHOME'}/etc/dc2marc-mapping.xml",51 'deft' => "dc2marc-mapping.xml", 52 52 'reqd' => "yes", 53 'hiddengli' => "no"}, 54 { 'name' => "xslt_file", 55 'desc' => "{BasPlugout.xslt_file}", 56 'type' => "string", 57 'reqd' => "no", 58 'deft' => "dc2marc.xsl", 53 59 'hiddengli' => "no"} 60 54 61 ]; 55 62 … … 72 79 73 80 $self->{'buffered_output'} =""; 74 75 if (!defined $self->{'mapping_file'} || (defined $self->{'mapping_file'} && $self->{'mapping_file'} eq "")){ 76 $self->{'mapping_file'} = "$ENV{'GSDLHOME'}/etc/dc2marc-mapping.xml"; 77 } 78 79 if (!defined $self->{'xslt_file'} || (defined $self->{'xslt_file'} && $self->{'xslt_file'} eq "")){ 80 $self->{'xslt_file'} = "$ENV{'GSDLHOME'}/etc/dc2marc.xsl"; 81 82 my $full_path_to_mapping_file = &util::locate_config_file($self->{'mapping_file'}); 83 if (! defined $full_path_to_mapping_file) { 84 print STDERR "Can not find $self->{'mapping_file'}, please make sure you have supplied the correct file path\n"; 85 die "\n"; 81 86 } 82 83 if(defined $self->{'mapping_file'} && $self->{'mapping_file'} ne "") 84 { 85 print STDERR "Can not find $self->{'mapping_file'}, please make sure you have supplied the correct file path\n" and die "\n" unless (-e $self->{'mapping_file'}); 86 } 87 88 if(defined $self->{'xslt_file'} && $self->{'xslt_file'} ne "") 89 { 90 print STDERR "Can not find $self->{'xslt_file'}, please make sure you have supplied the correct file path\n" and die "\n" unless (-e $self->{'xslt_file'}); 91 } 87 $self->{'mapping_file'} = $full_path_to_mapping_file; 92 88 93 89 return bless $self, $class; … … 112 108 113 109 my $output_file = util::filename_cat ($working_dir, "marc.xml"); 114 110 115 111 $self->open_xslt_pipe($output_file,$self->{'xslt_file'}); 116 112 … … 157 153 158 154 my $output_file = util::filename_cat($output_dir, "marc.xml"); 159 155 160 156 $self->open_xslt_pipe($output_file,$self->{'xslt_file'}); 161 157
Note:
See TracChangeset
for help on using the changeset viewer.