Ignore:
Timestamp:
2011-08-12T19:35:50+12:00 (13 years ago)
Author:
ak19
Message:

Changes to perl code to do with removing the ex. prefix: ex. is only removed if it is the sole prefix (i.e. ex.dc.* prefixes are not removed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm

    r24403 r24404  
    9090    return bless $self, $class;
    9191    }
    92     # trim ex. from document field (if there)
    93     $self->{'document_field'} =~ s/^ex\.//;
     92    # trim any ex. from document field iff it's the only metadata namespace prefix   
     93    $self->{'document_field'} =~ s/^ex\.([^.]+)$/$1/;
    9494    return bless $self, $class;
    9595}
     
    531531
    532532        # so that GLI can see this metadata, store here as ex.dc.Title etc
    533         my $ex_metaname = "ex.$metaname";
     533        my $ex_metaname = $metaname;
     534        $ex_metaname =~ s/^ex\.//; # remove any pre-existing ex. prefix
     535        $ex_metaname = "ex.$ex_metaname"; # at last can prefix ex.
    534536
    535537        if (defined $metadata->{$ex_metaname})
Note: See TracChangeset for help on using the changeset viewer.