Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPRetrieve.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPRetrieve.java	(revision 3937)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPRetrieve.java	(revision 3938)
@@ -57,5 +57,5 @@
 
     /** configure this service */
-    public boolean configure(Element info)
+    public boolean configure(Element info, Element extra_info)
     {
 	// Do specific configuration
@@ -74,5 +74,5 @@
 
 	// Do generic configuration
-	return super.configure(info);
+	return super.configure(info, extra_info);
     }
 
Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java	(revision 3937)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java	(revision 3938)
@@ -85,10 +85,10 @@
     
     /** configure this service */
-    public boolean configure(Element info)
+    public boolean configure(Element info, Element extra_info)
     {
 	// Do generic configuration
-	if (super.configure(info) == false)
+	if (super.configure(info, extra_info) == false)
 	    return false;
-
+	
 	// Do specific configuration
 	System.out.println("Configuring GS2MGPPSearch...");
@@ -147,4 +147,11 @@
 	service_info_map_.put(ADVANCED_FIELD_QUERY_SERVICE, afq_service_full);
 
+
+	//set up format info - the info is the same as that for text query
+	Element format_info = (Element)format_info_map_.get(TEXT_QUERY_SERVICE);
+	if (format_info != null) {
+	    format_info_map_.put(FIELD_QUERY_SERVICE, format_info);
+	    format_info_map_.put(ADVANCED_FIELD_QUERY_SERVICE, format_info);
+	}
 	return true;
     }
Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java	(revision 3937)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java	(revision 3938)
@@ -59,5 +59,5 @@
 
     /** configure this service */
-    public boolean configure(Element info)
+    public boolean configure(Element info, Element extra_info)
     {
 	// Do specific configuration
@@ -76,5 +76,5 @@
 
 	// Do generic configuration
-	return super.configure(info);
+	return super.configure(info, extra_info);
     }
 
Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java	(revision 3937)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java	(revision 3938)
@@ -25,4 +25,5 @@
 
 // XML classes
+import org.w3c.dom.Document;
 import org.w3c.dom.Element; 
 import org.w3c.dom.NodeList;
@@ -70,5 +71,5 @@
 
     /** configure this service */
-    public boolean configure(Element info)
+    public boolean configure(Element info, Element extra_info)
     {
 	System.out.println("Configuring GS2Retrieve...");
@@ -113,4 +114,9 @@
         }
 	
+	// get the display and format elements from the coll config file for
+	// the classifiers
+	extractExtraClassifierInfo(info, extra_info);
+	config_info_ = info;
+	
         // short_service_info_ - the browse one
         Element cb_service = doc_.createElement(GSXML.SERVICE_ELEM);
@@ -137,5 +143,5 @@
 	
 	// the format info
-	Element cb_format_info = doc_.createElement(GSXML.STYLESHEET_ELEM);
+	Element cb_format_info = doc_.createElement(GSXML.FORMAT_ELEM);
 	boolean format_found = false;
 	// add in to the description a simplified list of classifiers
@@ -172,4 +178,55 @@
     }
     
+    /** this looks for any classifier specific display or format info from extra_info and adds it in to the correct place in info */
+    protected boolean extractExtraClassifierInfo(Element info, Element extra_info) {
+	
+	if (extra_info == null) {
+	    return false;
+	}
+	
+	Document owner = info.getOwnerDocument();
+	// so far we have display and format elements that we need for classifiers
+	NodeList classifiers = info.getElementsByTagName(GSXML.CLASSIFIER_ELEM);
+	Element config_browse = (Element)GSXML.getChildByTagName(extra_info, GSXML.BROWSE_ELEM);
+
+	for (int i=0; i<classifiers.getLength();i++) {
+	    Element cl = (Element)classifiers.item(i);
+	    String name = cl.getAttribute(GSXML.NAME_ATT);
+	    Element node_extra = GSXML.getNamedElement(config_browse,
+						       GSXML.CLASSIFIER_ELEM,
+						       GSXML.NAME_ATT,
+						       name);
+	    if (node_extra == null) {
+		System.out.println("haven't found extra info for classifier named "+name);
+		continue;
+	    }
+	    
+	    // get the display elements if any - displayName
+	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAYNAME_ELEM);
+	    if (display_names !=null) {
+		Element display = owner.createElement(GSXML.DISPLAY_ELEM);
+		for (int j=0; j<display_names.getLength(); j++) {
+		    Element e = (Element)display_names.item(j);
+		    
+		    Element display_name = GSXML.createTextElement(owner, GSXML.DISPLAY_NAME_ELEM, GSXML.getNodeText(e));
+		    display_name.setAttribute(GSXML.LANG_ATT, e.getAttribute(GSXML.LANG_ATT));
+		    display.appendChild(display_name);
+		}
+		cl.appendChild(display);
+	    }
+	    
+	    // get the format element if any 
+	    Element format = (Element)GSXML.getChildByTagName(node_extra, GSXML.FORMAT_ELEM);
+	    if (format==null) { // try a generic one that applies to all classifiers
+		format = (Element)GSXML.getChildByTagName(extra_info,
+							  GSXML.FORMAT_ELEM);
+	    }
+	    if (format!=null) { // append to index info
+		cl.appendChild(owner.importNode(format, true));
+	    }
+	} // for each classifier
+	return true;
+    }
+	    
 
     /** creates a display element containing all the text strings needed to display the service page, in the language specified 
Index: trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java
===================================================================
--- trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java	(revision 3937)
+++ trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java	(revision 3938)
@@ -26,4 +26,5 @@
 // XML classes
 import org.w3c.dom.Element; 
+import org.w3c.dom.Document;
 import org.w3c.dom.NodeList; 
 
@@ -82,7 +83,8 @@
 
     /** configure this service */
-    public boolean configure(Element info)
+    public boolean configure(Element info, Element extra_info)
     {
 	System.out.println("Configuring GS2Search...");
+	addExtraQueryInfo(info, extra_info);
 	config_info_ = info;
 
@@ -119,9 +121,63 @@
 	}
 
+	// add some format info to service map if there is any
+	Element format = (Element) GSXML.getChildByTagName(info, GSXML.FORMAT_ELEM);
+	if (format != null) {
+	    format_info_map_.put(TEXT_QUERY_SERVICE, doc_.importNode(format, true));
+	}
+	 	
 	return true;
     }
 
 
-    /** creates a new param element and adds it to the param list */
+    protected boolean addExtraQueryInfo(Element info, Element extra_info){
+
+	if (extra_info == null) {
+	    return false;
+	}
+	
+	Document owner = info.getOwnerDocument();
+	// so far we have index specific display elements, and global format elements 
+	NodeList indexes = info.getElementsByTagName(GSXML.INDEX_ELEM);
+	Element config_search = (Element)GSXML.getChildByTagName(extra_info, GSXML.SEARCH_ELEM);
+	
+	for (int i=0; i<indexes.getLength();i++) {
+	    Element ind = (Element)indexes.item(i);
+	    String name = ind.getAttribute(GSXML.NAME_ATT);
+	    Element node_extra = GSXML.getNamedElement(config_search,
+						       GSXML.INDEX_ELEM,
+						       GSXML.NAME_ATT,
+						       name);
+	    if (node_extra == null) {
+		System.out.println("haven't found extra info for index named "+name);
+		continue;
+	    }
+	    
+	    // get the display elements if any - displayName
+	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAYNAME_ELEM);
+	    if (display_names !=null) {
+		Element display = owner.createElement(GSXML.DISPLAY_ELEM);
+		for (int j=0; j<display_names.getLength(); j++) {
+		    Element e = (Element)display_names.item(j);
+		    
+		    Element display_name = GSXML.createTextElement(owner, GSXML.DISPLAY_NAME_ELEM, GSXML.getNodeText(e));
+		    display_name.setAttribute(GSXML.LANG_ATT, e.getAttribute(GSXML.LANG_ATT));
+		    display.appendChild(display_name);
+		}
+		ind.appendChild(display);
+	    }
+	} // for each index
+	
+	// get the format element if any 
+	Element format = (Element)GSXML.getChildByTagName(extra_info,
+							  GSXML.FORMAT_ELEM);
+	if (format!=null) { // append to  info
+	    info.appendChild(owner.importNode(format, true));
+	}
+	return true;
+
+
+    }
+/** creates a new param element and adds it to the param list */
     protected void createParameter(String name, Element param_list, 
 				   boolean display, String lang)
