- Timestamp:
- 2013-03-19T13:39:28+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/collConfigxml.pm
r26466 r27097 81 81 # ("plugin", "option") 82 82 my $currentIndex = 0; 83 my $arrayexp = q/^(index|level|index Subcollection|indexLanguage|orthogonalBuildTypes)$/; # |indexOption83 my $arrayexp = q/^(index|level|indexOption|indexSubcollection|indexLanguage|orthogonalBuildTypes)$/; 84 84 my $arrayarrayexp = q/^(plugin|classifier)$/; #|buildOption)$/; 85 85 my $hashexp = q/^(subcollection)$/; # add other element names that should be represented by hash expressions here … … 196 196 #} 197 197 198 #@ Handle index|level|index Subcollection|indexLanguage #|indexOption198 #@ Handle index|level|indexOption|indexSubcollection|indexLanguage 199 199 elsif ($element =~ /$arrayexp/) { 200 200 my $key = $nameMap->{$element}; … … 211 211 $data->{$name} = $value; 212 212 } 213 214 215 #@ indexoptions: accentfold/casefold/stem; arrayexp216 # needs a separate section, since unlike other $arrayexp, indexOption has <option>s as child elements217 # 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 name221 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 }232 213 233 214 #@ plugout options
Note:
See TracChangeset
for help on using the changeset viewer.