Changeset 20320

Show
Ignore:
Timestamp:
18.08.2009 16:42:28 (11 years ago)
Author:
kjdon
Message:

some changes to get MARCXML exporting working on windows

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugouts/BasePlugout.pm

    r19829 r20320  
    5858    'type' => "string", 
    5959    'reqd' => "no", 
     60     'deft' => "", 
    6061    'hiddengli' => "no"}, 
    6162       { 'name' => "output_handle",  
     
    9697    push(@$plugoutlist, $class); 
    9798 
    98     my $strPlugoutName = (defined $plugoutlist->[0]) ? $plugoutlist->[0] : $class; 
     99    my $plugout_name = (defined $plugoutlist->[0]) ? $plugoutlist->[0] : $class; 
    99100 
    100101    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 
     
    122123    { 
    123124    my $classTempClass = bless $self, $class; 
    124     print STDERR "<BadPlugout d=$self->{'plugout_name'}>\n"; 
    125     &gsprintf(STDERR, "\n{BasPlugout.bad_general_option}\n", $self->{'plugout_name'}); 
     125    print STDERR "<BadPlugout d=$plugout_name>\n"; 
     126    &gsprintf(STDERR, "\n{BasPlugout.bad_general_option}\n", $plugout_name); 
    126127    $classTempClass->print_txt_usage("");  # Use default resource bundle 
    127128    die "\n"; 
     
    131132    if(defined $self->{'xslt_file'} &&  $self->{'xslt_file'} ne "") 
    132133    { 
    133       ##$self->{'xslt_file'} =~ s/\"//g;##working on Windows??? 
    134     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'}); 
     134    my $full_file_path = &util::locate_config_file($self->{'xslt_file'}); 
     135    if (!defined $full_file_path) { 
     136        print STDERR "Can not find $self->{'xslt_file'}, please make sure you have supplied the correct file path\n"; 
     137        die "\n"; 
     138    } 
     139    $self->{'xslt_file'} = $full_file_path; 
    135140    } 
    136141 
     
    828833    my ($output_file_name, $xslt_file)=@_; 
    829834 
    830    return unless defined $xslt_file and $xslt_file ne "" and -e $xslt_file; 
    831  
     835    return unless defined $xslt_file and $xslt_file ne "" and -e $xslt_file; 
     836     
    832837    my $java_class_path =  &util::filename_cat ($ENV{'GSDLHOME'},"bin","java"); 
    833838 
     
    836841    if ($ENV{'GSDLOS'} eq "windows"){ 
    837842    $java_class_path .=";".&util::filename_cat ($ENV{'GSDLHOME'},"bin","java","xalan.jar"); 
    838     $xslt_file = "\"file:///".$xslt_file."\""; 
    839     $mapping_file_path = "\"file:///"; 
     843    # this file:/// bit didn't work for me on windows XP 
     844    #$xslt_file = "\"file:///".$xslt_file."\""; 
     845    #$mapping_file_path = "\"file:///"; 
    840846    } 
    841847    else{ 
     
    852858    $cmd .= "-m $mapping_file_path"; 
    853859    } 
    854  
     860     
    855861    open(*XMLWRITER, $cmd) 
    856862    or die "can't open pipe to xslt: $!";