Index: gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java	(revision 20439)
+++ gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java	(revision 20440)
@@ -214,14 +214,14 @@
         String command_element_name = command_element.getNodeName ();
         if(command_element_name.equals (StaticStrings.CLASSIFY_ELEMENT)) {
-            return classifyToString (command_element, show_extracted_namespace);
+            return classifyToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.FORMAT_ELEMENT)) {
-            return formatToString (command_element, show_extracted_namespace);
+            return formatToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.INDEXES_ELEMENT)) {
-            return indexesToString (command_element, show_extracted_namespace);
+            return indexesToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.INDEX_DEFAULT_ELEMENT)) {
-            return indexDefaultToString (command_element, show_extracted_namespace);
+            return indexDefaultToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.LANGUAGES_ELEMENT)) {
@@ -232,5 +232,5 @@
         }
         else if (command_element_name.equals (StaticStrings.LANGUAGE_METADATA_ELEMENT)) {
-            return languageMetadataToString (command_element, show_extracted_namespace);
+            return languageMetadataToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.INDEXOPTIONS_ELEMENT)) {
@@ -256,8 +256,8 @@
         }
         else if(command_element_name.equals (StaticStrings.PLUGIN_ELEMENT)) {
-            return pluginToString (command_element, show_extracted_namespace);
+            return pluginToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.SUBCOLLECTION_ELEMENT)) {
-            return subcollectionToString (command_element, show_extracted_namespace);
+            return subcollectionToString (command_element);
         }
         else if(command_element_name.equals (StaticStrings.SUBCOLLECTION_DEFAULT_INDEX_ELEMENT)) {
@@ -433,5 +433,5 @@
     /** ************************** Private Methods ***************************/
     
-    static private String classifyToString (Element command_element, boolean show_extracted_namespace) {
+    static private String classifyToString (Element command_element) {
         StringBuffer text = new StringBuffer (StaticStrings.CLASSIFY_STR);
         text.append (StaticStrings.TAB_CHARACTER);
@@ -446,8 +446,17 @@
 	      text.append (option_element.getAttribute (StaticStrings.NAME_ATTRIBUTE));
 	      String value_str = XMLTools.getValue (option_element);
-	      value_str = modifyMetadataArgumentValue(value_str);
+	
+	      //	      value_str = modifyMetadataArgumentValue(value_str);
 	      if (value_str.length () > 0) {
 		text.append (StaticStrings.SPACE_CHARACTER);
-		text.append(value_str);
+		if(value_str.indexOf (StaticStrings.SPACE_CHARACTER) != -1) {
+		    // enclose in quotes
+		    text.append(StaticStrings.SPEECH_CHARACTER);
+		    text.append(value_str);
+		    text.append(StaticStrings.SPEECH_CHARACTER);
+		} else {
+		    
+		    text.append(value_str);
+		}
 	      }
               
@@ -460,5 +469,5 @@
     }
     
-    static private String formatToString (Element command_element, boolean show_extracted_namespace) {
+    static private String formatToString (Element command_element) {
         StringBuffer text = new StringBuffer (StaticStrings.FORMAT_STR);
         text.append (StaticStrings.SPACE_CHARACTER);
@@ -472,10 +481,4 @@
             // Remember to encode format string to Greenstone specification
             value_str = Codec.transform (XMLTools.getValue (command_element), Codec.DOM_TO_GREENSTONE);
-            // Remove any references to a namespace for extracted metadata
-            if (!show_extracted_namespace) {
-                String match_string = "\\[" + MetadataSetManager.EXTRACTED_METADATA_NAMESPACE + "\\.";
-                value_str = value_str.replaceAll (match_string, "[");
-            }
-            
             text.append (StaticStrings.SPEECH_CHARACTER);
             text.append (value_str);
@@ -524,5 +527,5 @@
     }
     
-    static private String indexesToString (Element command_element, boolean show_extracted_namespace) {
+    static private String indexesToString (Element command_element) {
         boolean comment_only = false;
         StringBuffer text = new StringBuffer ("");
@@ -558,7 +561,4 @@
                 Element content_element = (Element) content_elements.item (k);
                 String name_str = content_element.getAttribute (StaticStrings.NAME_ATTRIBUTE);
-                if(!show_extracted_namespace && name_str.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
-                    name_str = name_str.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
-                }
                 text.append (name_str);
                 name_str = null;
@@ -578,5 +578,5 @@
     }
     
-    static private String indexDefaultToString (Element command_element, boolean show_extracted_namespace) {
+    static private String indexDefaultToString (Element command_element) {
         StringBuffer text = new StringBuffer ("");
         if(command_element.getAttribute (StaticStrings.ASSIGNED_ATTRIBUTE).equals (StaticStrings.FALSE_STR)) {
@@ -594,7 +594,4 @@
             Element content_element = (Element) content_elements.item (j);
             String name_str = content_element.getAttribute (StaticStrings.NAME_ATTRIBUTE);
-            if(!show_extracted_namespace && name_str.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
-                name_str = name_str.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
-            }
             text.append (name_str);
             name_str = null;
@@ -634,5 +631,5 @@
     }
     
-    static private String languageMetadataToString (Element command_element, boolean show_extracted_namespace) {
+    static private String languageMetadataToString (Element command_element) {
         if (!command_element.getAttribute (StaticStrings.ASSIGNED_ATTRIBUTE).equals (StaticStrings.TRUE_STR)) {
             return "";
@@ -641,7 +638,4 @@
         text.append (StaticStrings.TAB_CHARACTER);
         String name_str = command_element.getAttribute (StaticStrings.NAME_ATTRIBUTE);
-        if(!show_extracted_namespace && name_str.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
-            name_str = name_str.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
-        }
         text.append (name_str);
         return text.toString ();
@@ -925,5 +919,5 @@
                     String value = (String) arguments.get (name); // Can be null
                     // The metadata argument gets added as the content attribute
-                    if (name.equals (StaticStrings.METADATA_ARGUMENT) && value != null) {
+		    /*                   if (name.equals (StaticStrings.METADATA_ARGUMENT) && value != null) {
                         // Add the extracted namespace onto un-namespaced metadata names
                         StringTokenizer string_tokenizer = new StringTokenizer (value, ",");
@@ -947,5 +941,5 @@
                             value = value + token;
                         }
-                    }
+			}*/
                     // Everything else is an Option Element
                     Element option_element = document.createElement (StaticStrings.OPTION_ELEMENT);
@@ -1503,5 +1497,5 @@
     }
     
-    static private String pluginToString (Element command_element, boolean show_extracted_namespace) {
+    static private String pluginToString (Element command_element) {
         if(command_element.getAttribute (StaticStrings.SEPARATOR_ATTRIBUTE).equals (StaticStrings.TRUE_STR)) { 
 	  return "";
@@ -1521,10 +1515,17 @@
 	      text.append (option_element.getAttribute (StaticStrings.NAME_ATTRIBUTE));
 	      String value_str = XMLTools.getValue (option_element);
-	      
-	      value_str = modifyMetadataArgumentValue(value_str);
-	      // are there any valid cases of "" args??
+	      // turn display name into proper name
+	      //value_str = modifyMetadataArgumentValue(value_str);
 	      if (value_str.length () > 0) {
 		text.append (StaticStrings.SPACE_CHARACTER);
-		text.append(value_str);
+		if(value_str.indexOf (StaticStrings.SPACE_CHARACTER) != -1) {
+		    // enclose in quotes
+		    text.append(StaticStrings.SPEECH_CHARACTER);
+		    text.append(value_str);
+		    text.append(StaticStrings.SPEECH_CHARACTER);
+		} else {
+		    
+		    text.append(value_str);
+		}
 	      }
 	      
@@ -1540,5 +1541,5 @@
 
     // Convert metadata element names to internal names, and remove extracted metadata namespaces
-  static private String modifyMetadataArgumentValue(String value_str) {
+    /*  static private String modifyMetadataArgumentValue(String value_str) {
     if (value_str.length () == 0) {
       return value_str;
@@ -1554,14 +1555,14 @@
       // not a delimiter token
       if (!raw_token.equals(",") && !raw_token.equals(";")) {
-	MetadataElement metadata_element = MetadataTools.getMetadataElementWithDisplayName (token);
-	if (metadata_element != null) {
-	  token = metadata_element.getFullName ();
-	  modified_token = true;
-	}
+	  //MetadataElement metadata_element = MetadataTools.getMetadataElementWithDisplayName (token);
+	  //if (metadata_element != null) {
+	  //token = metadata_element.getFullName ();
+	  //modified_token = true;
+	  //}
 	
-	if (token.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
-	  token = token.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
-	  modified_token = true;
-	}
+	//	if (token.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
+	// token = token.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
+	// modified_token = true;
+	//}
       }
       if (modified_token) {
@@ -1586,5 +1587,5 @@
     return value_buffer.toString();
 
-  }
+    }*/
     
     static private String searchtypeToString (Element command_element) {
@@ -1606,5 +1607,5 @@
     }
     
-    static private String subcollectionToString (Element command_element, boolean show_extracted_namespace) {
+    static private String subcollectionToString (Element command_element) {
         StringBuffer text = new StringBuffer (StaticStrings.SUBCOLLECTION_STR);
         text.append (StaticStrings.SPACE_CHARACTER);
@@ -1616,10 +1617,5 @@
             text.append (StaticStrings.EXCLAMATION_CHARACTER);
         }
-        String content_str = command_element.getAttribute (StaticStrings.CONTENT_ATTRIBUTE);
-        if(!show_extracted_namespace && content_str.startsWith (StaticStrings.EXTRACTED_NAMESPACE)) {
-            content_str = content_str.substring (StaticStrings.EXTRACTED_NAMESPACE.length ());
-        }
-        text.append (content_str);
-        content_str = null;
+        text.append (command_element.getAttribute (StaticStrings.CONTENT_ATTRIBUTE));
         text.append (StaticStrings.SEPARATOR_CHARACTER);
         text.append (XMLTools.getValue (command_element));
