Changeset 28708

Show
Ignore:
Timestamp:
28.11.2013 15:30:47 (6 years ago)
Author:
kjdon
Message:

check for xslt_mets and xslt_txt files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/METSPlugout.pm

    r28562 r28708  
    7171 
    7272    my $self = new BasePlugout($plugoutlist,$inputargs,$hashArgOptLists); 
     73 
     74    if(defined $self->{'xslt_txt'} &&  $self->{'xslt_txt'} ne "") 
     75    { 
     76    my $full_file_path = &util::locate_config_file($self->{'xslt_txt'}); 
     77    if (!defined $full_file_path) { 
     78        print STDERR "Can not find $self->{'xslt_txt'}, please make sure you have supplied the correct file path or put the file into collection or greenstone etc folder\n"; 
     79        die "\n"; 
     80    } 
     81    $self->{'xslt_txt'} = $full_file_path; 
     82    } 
     83    if(defined $self->{'xslt_mets'} &&  $self->{'xslt_mets'} ne "") 
     84    { 
     85    my $full_file_path = &util::locate_config_file($self->{'xslt_mets'}); 
     86    if (!defined $full_file_path) { 
     87        print STDERR "Can not find $self->{'xslt_mets'}, please make sure you have supplied the correct file path or put the file into collection or greenstone etc folder\n"; 
     88        die "\n"; 
     89    } 
     90    $self->{'xslt_mets'} = $full_file_path; 
     91    } 
     92 
    7393    return bless $self, $class; 
    7494}