Changeset 27097 for main/trunk


Ignore:
Timestamp:
2013-03-19T13:39:28+13:00 (11 years ago)
Author:
kjdon
Message:

indexOption doesn't have sub element option any more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/collConfigxml.pm

    r26466 r27097  
    8181# ("plugin", "option")
    8282my $currentIndex = 0;
    83 my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage|orthogonalBuildTypes)$/; # |indexOption
     83my $arrayexp = q/^(index|level|indexOption|indexSubcollection|indexLanguage|orthogonalBuildTypes)$/;
    8484my $arrayarrayexp = q/^(plugin|classifier)$/; #|buildOption)$/;
    8585my $hashexp = q/^(subcollection)$/; # add other element names that should be represented by hash expressions here
     
    196196    #}
    197197 
    198     #@ Handle index|level|indexSubcollection|indexLanguage #|indexOption
     198    #@ Handle index|level|indexOption|indexSubcollection|indexLanguage
    199199    elsif ($element =~ /$arrayexp/) {
    200200      my $key = $nameMap->{$element};   
     
    211211        $data->{$name} = $value;
    212212    }   
    213 
    214 
    215     #@ indexoptions: accentfold/casefold/stem; arrayexp
    216     # needs a separate section, since unlike other $arrayexp, indexOption has <option>s as child elements
    217     # but should be stored in-memory different from $generalOptions (<buildOptions> and <importOptions>)
    218     elsif ($element eq "indexOption") {
    219       $currentLevel = "indexOption";
    220       # find the gs2 mapping name
    221       my $key = $nameMap->{$currentLevel}; 
    222       if (!defined $data->{$key}) {
    223     $data->{$key} = [];
    224       }
    225     }
    226     elsif ($currentLevel eq "indexOption" and $element eq "option") {
    227       my $key = $nameMap->{$currentLevel}; 
    228       if (defined $name and $name =~ /\w/) {
    229       push (@{$data->{$key}},$name);
    230       }
    231     }
    232213
    233214    #@ plugout options
Note: See TracChangeset for help on using the changeset viewer.