Changeset 17066 for gsdl/trunk/perllib/plugins/OAIPlugin.pm
- Timestamp:
- 2008-08-28T17:20:44+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/OAIPlugin.pm
r17026 r17066 34 34 35 35 use ReadXMLFile; 36 use ReadTextFile; # needed for subroutine textcat_get_language_encoding 36 37 37 38 sub BEGIN { 38 @OAIPlugin::ISA = ('ReadXMLFile' );39 @OAIPlugin::ISA = ('ReadXMLFile', 'ReadTextFile'); 39 40 } 40 41 … … 46 47 'reqd' => "no", 47 48 'deft' => &get_default_process_exp() }, 49 { 'name' => "input_encoding", # needed by subroutine textcat_get_language_encoding 50 'desc' => "{ReadTextFile.input_encoding}", 51 'type' => "enum", 52 'list' => $ReadTextFile::encoding_plus_auto_list, 53 'reqd' => "no" , 54 'deft' => "auto" } 48 55 ]; 49 56 … … 410 417 my($namespace,$top_level_prefix) = ($wrapper_metadata_xml =~ m/^(.*?):(.*?)$/); 411 418 412 if ($top_level_prefix !~ /dc$/) { 419 # sometimes, the dc namespace is not specified as the prefix in each element (like <dc:title>) 420 # but is rather defined in the wrapper element containing the various dc meta elements, 421 # like <dc><title></title><creator></creator></dc>. 422 # In such a case, we use this wrapper element as the top_level_prefix 423 if(!defined $top_level_prefix && defined $wrapper_metadata_xml && $wrapper_metadata_xml =~ m/dc$/) { 424 $top_level_prefix = $wrapper_metadata_xml; 425 } 426 427 if ($top_level_prefix !~ m/dc$/) { 413 428 print $outhandle "Warning: OAIPlugin currently only designed for Dublin Core (or variant) metadata\n"; 414 429 print $outhandle " This recorded metadata section '$top_level_prefix' does not appear to match.\n"; … … 434 449 { 435 450 $metaname = "$top_level_prefix.$metaname"; 451 # print STDERR "*** metaname = $metaname\tmetavalue = $metavalue\n"; 436 452 } 437 453 $metaname =~ s/\.(.)/\.\u$1/;
Note:
See TracChangeset
for help on using the changeset viewer.