Index: /main/trunk/greenstone2/perllib/collConfigxml.pm
===================================================================
--- /main/trunk/greenstone2/perllib/collConfigxml.pm	(revision 22455)
+++ /main/trunk/greenstone2/perllib/collConfigxml.pm	(revision 22456)
@@ -86,10 +86,11 @@
 	       "searchType" => "searchtype",
 	       "languageMetadata" => "languagemetadata",
-	       "buildType" => "buildtype"
+	       "buildType" => "buildtype",
+           "buildOption" => "buildOption"
 	       };
 # A hash structure which is returned by sub read_cfg_file.
 my $data = {};
 
-my $repeatedBlock = q/^(browse|pluginList)$/;
+my $repeatedBlock = q/^(browse|pluginList)$/; #|buildOptionList)$/;
 
 # use those unique attribute values to locate the text within the elements
@@ -109,5 +110,5 @@
 my $currentIndex = 0;
 my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage)$/;
-my $arrayarrayexp= q/^(plugin|classifier)$/;
+my $arrayarrayexp= q/^(plugin|classifier)$/; #|buildOption)$/;
 my $hashexp = q/^(subcollection)$/; # add other element names that should be represented by hash expressions here
 my $hashhashexp = q/^(displayItem)$/; # add other (collectionmeta) element names that should be represented by hashes of hashes here.
@@ -151,5 +152,5 @@
     }
 
-    #&Display; 
+    &Display; 
     return $data;
 }
@@ -228,4 +229,11 @@
     }
 
+    #*****************************************
+    elsif ($element eq "buildOption") {
+        print STDERR "**** BUILD OPTION PAIR $name $value\n";
+        $data->{$name} = $value;
+    }    
+
+
     #@ indexoptions: accentfold/casefold/stem; arrayexp
     elsif ($element eq "indexOption") {
@@ -288,4 +296,8 @@
 	# Push classifier/plugin name (e.g. AZList) into $data as the first string
  	push (@{$data->{$key}->[$currentIndex]},$name);
+    if (defined $value and $value =~ /\w/) {
+        push (@{$data->{$key}->[$currentIndex]}, $value);
+        print "$value\n";
+    }
 	#print $currentIndex."indexup\n";
       }
@@ -309,5 +321,5 @@
 sub EndTag {
     my ($expat, $element) = @_;
-    my $endTags = q/^(browse|pluginList|displayItemList)$/;   
+    my $endTags = q/^(browse|pluginList|displayItemList)$/; #|buildOptionList)$/;   
     if ($element =~ /$endTags/) {
 		$currentIndex = 0;
@@ -379,18 +391,26 @@
     }
   
-    print $data->{'creator'}."\n" if (defined $data->{'creator'});
-    print $data->{"maintainer"}."\n" if (defined $data->{"maintainer"});
-    print $data->{"public"}."\n" if (defined $data->{"public"});
-    print $data->{"defaultindex"}."\n" if (defined $data->{"defaultindex"});
-    print $data->{"defaultlevel"}."\n" if (defined $data->{"defaultlevel"});
-    print $data->{"buildtype"}."\n" if (defined $data->{"buildtype"});
-    print  join(",",@{$data->{"searchtype"}})."\n" if (defined $data->{"searchtype"});
-    print  join(",",@{$data->{'levels'}})."\n" if (defined $data->{'levels'});
-    print  join(",",@{$data->{'indexsubcollections'}})."\n" if (defined $data->{'indexsubcollections'});
-    print  join(",",@{$data->{'indexes'}})."\n" if (defined $data->{'indexes'});
-    print  join(",",@{$data->{'indexoptions'}})."\n" if (defined $data->{'indexoptions'});
-    print  join(",",@{$data->{'languages'}})."\n" if (defined $data->{'languages'});
-    print  join(",",@{$data->{'languagemetadata'}})."\n" if (defined $data->{'languagemetadata'});
+    print STDERR "*** creator: ".$data->{'creator'}."\n" if (defined $data->{'creator'});
+    print STDERR "*** maintainer: ".$data->{"maintainer"}."\n" if (defined $data->{"maintainer"});
+    print STDERR "*** public: ".$data->{"public"}."\n" if (defined $data->{"public"});
+    print STDERR "*** default index: ".$data->{"defaultindex"}."\n" if (defined $data->{"defaultindex"});
+    print STDERR "*** default level: ".$data->{"defaultlevel"}."\n" if (defined $data->{"defaultlevel"});
+    print STDERR "*** build type: ".$data->{"buildtype"}."\n" if (defined $data->{"buildtype"});
+    print STDERR "*** search types: \n";
+    print STDERR join(",",@{$data->{"searchtype"}})."\n" if (defined $data->{"searchtype"});
+    print STDERR "*** levels: \n";
+    print STDERR join(",",@{$data->{'levels'}})."\n" if (defined $data->{'levels'});
+    print STDERR "*** index subcollections: \n";
+    print STDERR join(",",@{$data->{'indexsubcollections'}})."\n" if (defined $data->{'indexsubcollections'});
+    print STDERR "*** indexes: \n";
+    print STDERR join(",",@{$data->{'indexes'}})."\n" if (defined $data->{'indexes'});
+    print STDERR "*** index options: \n";
+    print STDERR join(",",@{$data->{'indexoptions'}})."\n" if (defined $data->{'indexoptions'});
+    print STDERR "*** languages: \n";
+    print STDERR join(",",@{$data->{'languages'}})."\n" if (defined $data->{'languages'});
+    print STDERR "*** language metadata: \n";
+    print STDERR join(",",@{$data->{'languagemetadata'}})."\n" if (defined $data->{'languagemetadata'});
  
+    print STDERR "*** Plugins: \n";
     if (defined $data->{'plugin'}) {
 	foreach $a (@{$data->{'plugin'}}) {
@@ -399,6 +419,15 @@
 	}
     }
+
+    #print STDERR "*** Build options: \n";
+    #if (defined $data->{'store_metadata_coverage'}) {
+    #foreach $a (@{$data->{'store_metadata_coverage'}}) {
+    #    print join(",",@$a,@$_);
+    #    print "\n";
+    #}
+    #}
+
     if (defined $data->{'classify'}) {
-	print "Classifiers: \n";
+	print STDERR "*** Classifiers: \n";
 	map { print join(",",@$_)."\n"; } @{$data->{'classify'}};
     }
