Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GATEServices.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GATEServices.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GATEServices.java	(revision 4903)
@@ -84,22 +84,9 @@
 
 	// set up short_service_info_ - for now just has name and type
-	Element tq_service = doc_.createElement(GSXML.SERVICE_ELEM);
-	tq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_ENRICH);
-	tq_service.setAttribute(GSXML.NAME_ATT, GATE_POS_TAG_SERVICE);
-	short_service_info_.appendChild(tq_service);
-
-	// set up service_info_map_ - for now, just has the same elements as above
-	// should have full details about each service incl params lists etc.
-	Element tq_service_full = (Element) tq_service.cloneNode(true);
-	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	createParameter(ANNOTATION_TYPE_PARAM, param_list, false, null);
-	tq_service_full.appendChild(param_list);
-	service_info_map_.put(GATE_POS_TAG_SERVICE, tq_service_full);
-
-	// 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(GATE_POS_TAG_SERVICE, doc_.importNode(format, true));
-	// }
+	Element tag_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	tag_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_ENRICH);
+	tag_service.setAttribute(GSXML.NAME_ATT, GATE_POS_TAG_SERVICE);
+	short_service_info_.appendChild(tag_service);
+
 
 	// Configure GATE for use
@@ -141,20 +128,19 @@
     }
 
-
-    /** creates a display element containing all the text strings needed to display
-	the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang)
-    {
-	// Create a service display for the basic text query service
-	Element display = doc_.createElement(GSXML.DISPLAY_ELEM);
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM, getTextString(service+".name", lang)));
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang)));
-
-	// now need to add in the params
-	if (service.equals(GATE_POS_TAG_SERVICE)) {
-	    createParameter(ANNOTATION_TYPE_PARAM, display, true, lang);
-	}
-
-	return display;
+    protected Element getServiceDescription(String service, String lang) {
+
+	if (!service.equals(GATE_POS_TAG_SERVICE)) {
+	    return null;
+	}
+	Element tag_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	tag_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_ENRICH);
+	tag_service.setAttribute(GSXML.NAME_ATT, GATE_POS_TAG_SERVICE);
+	tag_service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME, getTextString(service+".name", lang)));
+	tag_service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_SUBMIT, getTextString(service+".submit", lang)));
+	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
+	createParameter(ANNOTATION_TYPE_PARAM, param_list, lang);
+	tag_service.appendChild(param_list);
+
+	return tag_service;
     }
 
@@ -162,30 +148,22 @@
     /** creates a new param element and adds it to the param list */
     protected void createParameter(String name, Element param_list, 
-				   boolean display, String lang)
+				   String lang)
     {
 	Element param = null;
 
 	if (name.equals(ANNOTATION_TYPE_PARAM)) {
-	    if (display) {
-		int len = annotation_types_.length;
-		String[] annotation_type_names = new String[len];
-		for (int i = 0; i < len; i++) {
-		    annotation_type_names[i] = getTextString("param." + name + "." + annotation_types_[i], lang);
-		}
-		
-		param = GSXML.createParameterDisplay(doc_, name, getTextString("param." + name, lang), annotation_types_, annotation_type_names);
+	    int len = annotation_types_.length;
+	    String[] annotation_type_names = new String[len];
+	    for (int i = 0; i < len; i++) {
+		annotation_type_names[i] = getTextString("param." + name + "." + annotation_types_[i], lang);
 	    }
-	    else {
-		param = GSXML.createParameterDescription(doc_, name, GSXML.PARAM_TYPE_ENUM_MULTI, annotation_types_[0], annotation_types_);
-	    }
+	    
+	    param = GSXML.createParameterDescription(doc_, name, getTextString("param." + name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, annotation_types_[0], annotation_types_, annotation_type_names);
+	    param_list.appendChild(param);
 	}
 	
-	// Add the parameter to the list
-	if (param != null) {
-	    param_list.appendChild(param);
-	}	
-    }
-
-
+    }
+    
+    
     protected Element processGatePOSTag(Element request)
     {
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Construct.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Construct.java	(revision 4903)
@@ -77,62 +77,43 @@
     }
 
-    /** returns the service list for the subclass */
-    protected Element getServiceList(String lang) {
-	// for now, it is static and there is no lang stuff
-	return short_service_info_;
-    }
-
     /** returns a specific service description */
     protected Element getServiceDescription(String service, String lang) {
-	Element descript = (Element)((Element)service_info_map_.get(service)).cloneNode(true);
-	// need to add in collection param list
-	if (!service.equals(NEW_SERVICE)) {//new doesn't need a collection list
-	    Element param_list = (Element) GSXML.getChildByTagName(descript, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	    Element old_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, COL_PARAM);
-	    collection_list_ = getCollectionList();
-	    Element param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, null, collection_list_);
-	    // put at front of the list
-	    param_list.replaceChild(param, old_param);
-	}
-	// for now, create it on the fly - look at caching it later
-	Element display = createServiceDisplay(service, lang);
-	addServiceDisplay(descript, display);
-	return descript;
-	
-    }
-
-    /** creates a display element containing all the text strings needed to display the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang) {
-	Element display = doc_.createElement(GSXML.DISPLAY_ELEM);
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM,  getTextString(service+".name", lang)));
-	display.appendChild(GSXML.createTextElement(doc_,  GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang)));
-
-	Element param;
+
+	Element description = doc_.createElement(GSXML.SERVICE_ELEM);
+	description.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
+	description.setAttribute(GSXML.NAME_ATT, service);
+	description.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME,  getTextString(service+".name", lang)));
+	description.appendChild(GSXML.createDisplayTextElement(doc_,  GSXML.DISPLAY_TEXT_SUBMIT, getTextString(service+".submit", lang)));
+
+	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
+	description.appendChild(param_list);
+	
 	if (service.equals(NEW_SERVICE)) {
-	    // have the coll title, about, buildtype  and creator params
-	    param = GSXML.createParameterDisplay(doc_, NEW_COL_TITLE_PARAM, getTextString("param."+NEW_COL_TITLE_PARAM, lang), null, null);
-	    display.appendChild(param);
-	    param = GSXML.createParameterDisplay(doc_, CREATOR_PARAM, getTextString("param."+CREATOR_PARAM, lang), null, null);
-	    display.appendChild(param);
-	    param = GSXML.createParameterDisplay(doc_, NEW_COL_ABOUT_PARAM, getTextString("param."+NEW_COL_ABOUT_PARAM, lang), null, null);
-	    display.appendChild(param);
-
+	    
+	    Element param = GSXML.createParameterDescription(doc_, NEW_COL_TITLE_PARAM, getTextString("param."+NEW_COL_TITLE_PARAM, lang), GSXML.PARAM_TYPE_STRING, null, null, null);
+	    param_list.appendChild(param);
+	    param = GSXML.createParameterDescription(doc_, CREATOR_PARAM, getTextString("param."+CREATOR_PARAM, lang), GSXML.PARAM_TYPE_STRING, null, null, null);
+	    param_list.appendChild(param);
+	    param = GSXML.createParameterDescription(doc_, NEW_COL_ABOUT_PARAM, getTextString("param."+NEW_COL_ABOUT_PARAM, lang), GSXML.PARAM_TYPE_TEXT, null, null, null);
+	    param_list.appendChild(param);
 	    String[] types = {BUILDTYPE_MGPP, BUILDTYPE_MG};
 	    String[] type_texts = {getTextString("param."+BUILDTYPE_PARAM+"."+BUILDTYPE_MGPP, lang), getTextString("param."+BUILDTYPE_PARAM+"."+BUILDTYPE_MG, lang)};
-	    param = GSXML.createParameterDisplay(doc_, BUILDTYPE_PARAM, getTextString("param."+BUILDTYPE_PARAM, lang), types, type_texts);
-	    display.appendChild(param);
-	} else {
-	    // have just the coll param
-	    //use the collection list already created - this method is only called directly after getServiceDescription()
-	    param = GSXML.createParameterDisplay(doc_, COL_PARAM, getTextString("param."+COL_PARAM, lang), collection_list_, collection_list_);
-	    display.appendChild(param);
-	    if (service.equals(ADD_DOC_SERVICE)) {
-		// also have the file param
-		param = GSXML.createParameterDisplay(doc_, NEW_FILE_PARAM, getTextString("param."+NEW_FILE_PARAM, lang), null, null);
-		display.appendChild(param);
-	    }	    
-	}
-
-	return display;
+	    
+	    param = GSXML.createParameterDescription(doc_, BUILDTYPE_PARAM, getTextString("param."+BUILDTYPE_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, BUILDTYPE_MGPP, types, type_texts);
+	    param_list.appendChild(param);
+	    return description;
+	}
+	
+	
+	if (service.equals(ACTIVATE_SERVICE) || service.equals(IMPORT_SERVICE) || service.equals(BUILD_SERVICE) || service.equals(RELOAD_SERVICE) || service.equals(DELETE_SERVICE)) {
+	    
+	    collection_list_ = getCollectionList();
+	    Element param = GSXML.createParameterDescription(doc_, COL_PARAM, getTextString("param."+COL_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, null, collection_list_, collection_list_);	
+	    param_list.appendChild(param);
+	    
+	    return description;
+	}
+	// invalid service name
+	return null;
 	
     }
@@ -382,76 +363,8 @@
 	short_service_info_.appendChild(e);
 
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, ADD_DOC_SERVICE);
-	short_service_info_.appendChild(e);
-
-	// set up service_info_map_ 
-	// should have full details about each service incl params lists etc.
-
-	Element param_list; 
-	Element param;
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, NEW_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, NEW_COL_TITLE_PARAM, GSXML.PARAM_TYPE_STRING, "", null);
-	param_list.appendChild(param);
-	param = GSXML.createParameterDescription(doc_, CREATOR_PARAM, GSXML.PARAM_TYPE_STRING, "", null);
-	param_list.appendChild(param);
-	param = GSXML.createParameterDescription(doc_, NEW_COL_ABOUT_PARAM, GSXML.PARAM_TYPE_TEXT, "", null);
-	param_list.appendChild(param);
-	String[] types = {BUILDTYPE_MGPP, BUILDTYPE_MG};
-	param = GSXML.createParameterDescription(doc_, BUILDTYPE_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, BUILDTYPE_MGPP, types);
-	param_list.appendChild(param);
-
-	e.appendChild(param_list);
-	service_info_map_.put(NEW_SERVICE, e);
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, IMPORT_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", null);
-	param_list.appendChild(param);
-	e.appendChild(param_list);
-	service_info_map_.put(IMPORT_SERVICE, e);
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, BUILD_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", null);
-	param_list.appendChild(param);
-	e.appendChild(param_list);
-	service_info_map_.put(BUILD_SERVICE, e);
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, ACTIVATE_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", null);
-	param_list.appendChild(param);
-	e.appendChild(param_list);
-	service_info_map_.put(ACTIVATE_SERVICE, e);
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, DELETE_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", null);
-	param_list.appendChild(param);
-	e.appendChild(param_list);
-	service_info_map_.put(DELETE_SERVICE, e);
-
-	e = doc_.createElement(GSXML.SERVICE_ELEM);
-	e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
-	e.setAttribute(GSXML.NAME_ATT, RELOAD_SERVICE);
-	param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	param = GSXML.createParameterDescription(doc_, COL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", null);
-	param_list.appendChild(param);
-	e.appendChild(param_list);
-	service_info_map_.put(RELOAD_SERVICE, e);
+	//e = doc_.createElement(GSXML.SERVICE_ELEM);
+	//e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS);
+	//e.setAttribute(GSXML.NAME_ATT, ADD_DOC_SERVICE);
+	//short_service_info_.appendChild(e);
 
 
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java	(revision 4903)
@@ -54,4 +54,5 @@
 
     // extra parameters used
+    private static final String INDEX_FIELD_PARAM = "index";
     private static final String LEVEL_PARAM = "level";
     private static final String RANK_PARAM = "sortBy";
@@ -77,4 +78,5 @@
     private MGPPWrapper mgpp_src_=null;
 
+    // the default level for retrieval - and we'll use it for searching too
     private String default_level_=null;
     
@@ -124,29 +126,15 @@
 	// else set up the fielded query services
 	
-	// set up short_service_info_ - for now just has name and type
+	// set up short_service_info_ - for now just has id and type - name will be added in on teh fly
 	Element fq_service = doc_.createElement(GSXML.SERVICE_ELEM);
 	fq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY);
 	fq_service.setAttribute(GSXML.NAME_ATT, FIELD_QUERY_SERVICE);
 	short_service_info_.appendChild(fq_service);
-
+	
 	Element afq_service = doc_.createElement(GSXML.SERVICE_ELEM);
 	afq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY);
 	afq_service.setAttribute(GSXML.NAME_ATT, ADVANCED_FIELD_QUERY_SERVICE);
 	short_service_info_.appendChild(afq_service);
-
-	// set up service_info_map_ has full details about each service 
-	// incl params lists etc.
-	Element fq_service_full = (Element) fq_service.cloneNode(true);
-	Element fq_param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	createFieldQueryParamList(fq_param_list, false, null);
-	fq_service_full.appendChild(fq_param_list);
-	service_info_map_.put(FIELD_QUERY_SERVICE, fq_service_full);
-
-	Element afq_service_full = (Element) afq_service.cloneNode(true);
-	Element afq_param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	createAdvancedFieldQueryParamList(afq_param_list, false, null);
-	afq_service_full.appendChild(afq_param_list);
-	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
@@ -159,10 +147,32 @@
     }
 
-  
-    /** creates a new param element and adds it to the param list */
-    protected void createParameter(String name, Element param_list, boolean display, String lang) {
+    protected Element getServiceDescription(String service_id, String lang) {
+	
+	if (!service_id.equals(FIELD_QUERY_SERVICE) && !service_id.equals(ADVANCED_FIELD_QUERY_SERVICE)) {
+	    return super.getServiceDescription(service_id, lang);
+	}
+	
+	Element service = doc_.createElement(GSXML.SERVICE_ELEM);
+	service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY);
+	service.setAttribute(GSXML.NAME_ATT, service_id);
+	service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME, getTextString(service_id+".name", lang)));
+	service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_SUBMIT, getTextString(service_id+".submit", lang)));
+	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);	
+	service.appendChild(param_list);
+	if (service_id.equals(FIELD_QUERY_SERVICE)) {
+	    
+	    createFieldQueryParamList(param_list, lang);
+	} else { 
+	    createAdvancedFieldQueryParamList(param_list, lang);
+	} 
+	return service;
+	
+    }
+
+     /** creates a new param element and adds it to the param list */
+    protected void createParameter(String id, Element param_list, String lang) {
 	Element param=null;
 	
-	if (name.equals(LEVEL_PARAM)) {
+	if (id.equals(LEVEL_PARAM)) {
 	    // the level info - read from config file
 	    Element level_list = (Element)GSXML.getChildByTagName(config_info_, LEVEL_ELEM+GSXML.LIST_MODIFIER);
@@ -174,51 +184,27 @@
 		for (int i=0; i<len; i++) {
 		    levs[i] = ((Element)levels.item(i)).getAttribute(GSXML.NAME_ATT);
-		    if (display) {
-			lev_names[i] = getTextString("level."+levs[i], lang);
-		    }
+		    lev_names[i] = getTextString("level."+levs[i], lang);
+		    
 		}
-		if (display) {
-		    param =  GSXML.createParameterDisplay(doc_, LEVEL_PARAM, getTextString("param."+LEVEL_PARAM, lang), levs, lev_names);
-		} else {
-		    param = GSXML.createParameterDescription(doc_, LEVEL_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, default_level_, levs);
-		}
-	    }
-	} else if (name.equals(RANK_PARAM)) {
+		// the first one is the default
+		    param = GSXML.createParameterDescription(doc_, LEVEL_PARAM, getTextString("param."+LEVEL_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, levs[0], levs, lev_names);
+		    
+	    }
+	} else if (id.equals(RANK_PARAM)) {
 	    String [] vals1 = {RANK_PARAM_RANK, RANK_PARAM_NONE };
-	    if (display) {
-		String [] vals1_texts = { getTextString("param."+RANK_PARAM+"."+RANK_PARAM_RANK, lang), getTextString("param."+RANK_PARAM+"."+RANK_PARAM_NONE, lang)};
+	    String [] vals1_texts = { getTextString("param."+RANK_PARAM+"."+RANK_PARAM_RANK, lang), getTextString("param."+RANK_PARAM+"."+RANK_PARAM_NONE, lang)};
 		
-		param = GSXML.createParameterDisplay(doc_, RANK_PARAM, getTextString("param."+RANK_PARAM, lang), vals1, vals1_texts);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, RANK_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, RANK_PARAM_RANK, vals1 );
-	    }
-	} else if (name.equals(FIELD_QUERY_PARAM)) {
-	    if (display) {
-		param = GSXML.createParameterDisplay(doc_, FIELD_QUERY_PARAM, getTextString("param."+FIELD_QUERY_PARAM, lang), null, null);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, FIELD_QUERY_PARAM, GSXML.PARAM_TYPE_STRING, null, null);
-	    }
-	    
-	} else if (name.equals(FIELD_CASE_PARAM)) {
-	    if (display) {
-		String[] bool_ops = {"0", "1"};
-		String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
-		param = GSXML.createParameterDisplay(doc_, FIELD_CASE_PARAM, getTextString("param."+FIELD_CASE_PARAM, lang),  bool_ops, bool_texts);
-		
-	    } else {
-		param = GSXML.createParameterDescription(doc_, FIELD_CASE_PARAM, GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, null);
-		
-	    }
-	} else if (name.equals(FIELD_STEM_PARAM)) {
-	    if (display) {
-		String[] bool_ops = {"0", "1"};
-		String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
-		param = GSXML.createParameterDisplay(doc_, FIELD_STEM_PARAM, getTextString("param."+FIELD_STEM_PARAM, lang),  bool_ops, bool_texts);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, FIELD_STEM_PARAM, GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, null);
-		
-	    }
-
-	} else if (name.equals(FIELD_FIELD_PARAM)) {
+	    param = GSXML.createParameterDescription(doc_, RANK_PARAM, getTextString("param."+RANK_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, RANK_PARAM_RANK, vals1, vals1_texts );
+	    
+	} else if (id.equals(FIELD_QUERY_PARAM)) {
+	    param = GSXML.createParameterDescription(doc_, FIELD_QUERY_PARAM, getTextString("param."+FIELD_QUERY_PARAM, lang), GSXML.PARAM_TYPE_STRING, null, null, null);
+	    
+	    
+	} else if (id.equals(FIELD_CASE_PARAM) || id.equals(FIELD_STEM_PARAM)) {
+	    String[] bool_ops = {"0", "1"};
+	    String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
+	    param = GSXML.createParameterDescription(doc_, id, getTextString("param."+id, lang), GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, bool_ops, bool_texts);
+	    
+	} else if (id.equals(FIELD_FIELD_PARAM) || id.equals(INDEX_FIELD_PARAM)) {
 	    
 	    // the field list -  read from config file
@@ -226,42 +212,28 @@
 	    NodeList fields = field_list.getElementsByTagName(GSXML.FIELD_ELEM);
 	    int len = fields.getLength();
-	    String [] f_names = new String [len+1];
-	    String [] f_texts = new String [len+1];
-
-	    f_names[0] = "ZZ";
-	    if (display) {
-		f_texts[0] = getTextString("param.fqf.all", lang);
-	    }
+	    String [] f_names = new String [len];
+	    String [] f_texts = new String [len];
 	    for (int i=0; i< len;i++) {
-		f_names[i+1] = ((Element)fields.item(i)).getAttribute(GSXML.SHORTNAME_ATT);
-		if (display) {
-		    // should these be changed to a text element based on lang?
-		    // or is the name of a metadata element eg dc:Title its 
-		    // name in all langs
-		    f_texts[i+1] = ((Element)fields.item(i)).getAttribute(GSXML.NAME_ATT);
-		}
-	    }
-	    if (display) {
-		param = GSXML.createParameterDisplay(doc_, FIELD_FIELD_PARAM, getTextString("param."+FIELD_FIELD_PARAM, lang), f_names, f_texts);
+		f_names[i] = ((Element)fields.item(i)).getAttribute(GSXML.SHORTNAME_ATT);
+		// should these be changed to a text element based on lang?
+		// or is the name of a metadata element eg dc:Title its 
+		// name in all langs
+		f_texts[i] = ((Element)fields.item(i)).getAttribute(GSXML.NAME_ATT);
 		
-	    } else {
-		param = GSXML.createParameterDescription(doc_, FIELD_FIELD_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, "", f_names );
+	    }
+	    param = GSXML.createParameterDescription(doc_, id, getTextString("param."+id, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, f_names[0], f_names, f_texts );
+	    
+	} else if (id.equals(FIELD_COMBINE_PARAM)) {
+	    
+	    String []vals = {FIELD_COMBINE_PARAM_AND, FIELD_COMBINE_PARAM_OR, FIELD_COMBINE_PARAM_NOT};
+	    String []val_texts = {getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_AND, lang), getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_OR, lang), getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_NOT, lang)}; 
 		
-	    }
-	} else if (name.equals(FIELD_COMBINE_PARAM)) {
-	    
-	    String []vals = {FIELD_COMBINE_PARAM_AND, FIELD_COMBINE_PARAM_OR, FIELD_COMBINE_PARAM_NOT};
-	    if (display) {
-		String []val_texts = {getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_AND, lang), getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_OR, lang), getTextString("param."+FIELD_COMBINE_PARAM+"."+FIELD_COMBINE_PARAM_NOT, lang)}; 
+	    
+	    param = GSXML.createParameterDescription(doc_, FIELD_COMBINE_PARAM, "", GSXML.PARAM_TYPE_ENUM_SINGLE, FIELD_COMBINE_PARAM_AND, vals, val_texts);
+	    param.setAttribute(GSXML.PARAM_IGNORE_POS_ATT, "0");
 		
-		param = GSXML.createParameterDisplay(doc_, FIELD_COMBINE_PARAM, "", vals, val_texts);
-		
-	    } else {
-		param = GSXML.createParameterDescription(doc_, FIELD_COMBINE_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, FIELD_COMBINE_PARAM_AND, vals);
-		param.setAttribute(GSXML.PARAM_IGNORE_POS_ATT, "0");
-		
-	    }	
-	}
-
+	    
+	}
+	
 	// add the param to the list
 	if (param !=null) {
@@ -269,8 +241,8 @@
 	}
 	else {
-	    super.createParameter(name, param_list, display, lang);
-	}
-    }
-    
+	    super.createParameter(id, param_list, lang);
+	}
+    }
+   
 
     /** this creates all teh params and appends them to param_list.
@@ -279,28 +251,22 @@
      */
     protected boolean createTextQueryParamList(Element param_list, 
-					       boolean display,
+					       
 					       String lang)
     {
 	// the order they are specified here is the order they appear on 
 	// the query form
-	createParameter(INDEX_PARAM, param_list, display, lang);
-	createParameter(LEVEL_PARAM, param_list, display, lang);
-	createParameter(CASE_PARAM, param_list, display, lang);
-	createParameter(STEM_PARAM, param_list, display, lang);
-	createParameter(MATCH_PARAM, param_list, display, lang);
-	createParameter(RANK_PARAM, param_list, display, lang);
-	createParameter(MAXDOCS_PARAM, param_list, display, lang);
-	createParameter(QUERY_PARAM, param_list, display, lang);
+	//createParameter(INDEX_PARAM, param_list, display, lang); - there is only ever one index now
+	createParameter(INDEX_FIELD_PARAM, param_list,  lang);
+	createParameter(LEVEL_PARAM, param_list, lang);
+	createParameter(CASE_PARAM, param_list, lang);
+	createParameter(STEM_PARAM, param_list,  lang);
+	createParameter(MATCH_PARAM, param_list, lang);
+	createParameter(RANK_PARAM, param_list,  lang);
+	createParameter(MAXDOCS_PARAM, param_list,  lang);
+	createParameter(QUERY_PARAM, param_list,  lang);
 
 	return true;
     }
 
-
-    // for now, the field queries just use the default index.
-    // however, it is entirely possible to create two indexes with different 
-    // metadata. then you run into problems with displaying the form - you 
-    // need to use javascript to change teh field and maybe level lists 
-    // depending on which index is selected, or have the index preselected 
-    // before going to the query form
 
 
@@ -309,15 +275,15 @@
      * otherwise it creates the description version
      */
-    protected boolean createFieldQueryParamList(Element param_list, boolean display,
+    protected boolean createFieldQueryParamList(Element param_list, 
 						String lang)
     {
 	// add in the index param
-	createParameter(INDEX_PARAM, param_list, display, lang);
-	createParameter(LEVEL_PARAM, param_list, display, lang);
-	createParameter(MATCH_PARAM, param_list, display, lang);
-	createParameter(CASE_PARAM, param_list, display, lang);
-	createParameter(STEM_PARAM, param_list, display, lang);
-	createParameter(RANK_PARAM, param_list, display, lang);
-	createParameter(MAXDOCS_PARAM, param_list, display, lang);
+	//createParameter(INDEX_PARAM, param_list, display, lang);
+	createParameter(LEVEL_PARAM, param_list, lang);
+	createParameter(MATCH_PARAM, param_list,  lang);
+	createParameter(CASE_PARAM, param_list,  lang);
+	createParameter(STEM_PARAM, param_list,  lang);
+	createParameter(RANK_PARAM, param_list,  lang);
+	createParameter(MAXDOCS_PARAM, param_list,  lang);
 
 	// create a multi param for the fields etc
@@ -325,31 +291,23 @@
 	Element multiparam = null;
 	Element param=null;
-	if (display) {
-	    param = GSXML.createParameterDisplay(doc_, SIMPLE_FIELD_PARAM, "",  null, null);
-	    param_list.appendChild(param);
-	} else {
-	    multiparam = GSXML.createParameterDescription(doc_, SIMPLE_FIELD_PARAM, GSXML.PARAM_TYPE_MULTI, null, null);
-	    multiparam.setAttribute("occurs", "4");
-	    param_list.appendChild(multiparam);
-	}
+	multiparam = GSXML.createParameterDescription(doc_, SIMPLE_FIELD_PARAM, "", GSXML.PARAM_TYPE_MULTI, null, null, null);
+	multiparam.setAttribute("occurs", "4");
+	param_list.appendChild(multiparam);
+	
 	// the components
-	if (display) {
-	    createParameter(FIELD_QUERY_PARAM, param_list, display, lang);
-	    createParameter(FIELD_FIELD_PARAM, param_list, display, lang);
-	} else {
-	    createParameter(FIELD_QUERY_PARAM, multiparam, display, lang);
-	    createParameter(FIELD_FIELD_PARAM, multiparam, display, lang);
-	}
+	createParameter(FIELD_QUERY_PARAM, multiparam,  lang);
+	createParameter(FIELD_FIELD_PARAM, multiparam,  lang);
+	
 	return true;
     }
 
-    protected boolean createAdvancedFieldQueryParamList(Element param_list, boolean display,
+    protected boolean createAdvancedFieldQueryParamList(Element param_list, 
 							String lang) {
 
 	// first do index and level params
-	createParameter(INDEX_PARAM, param_list, display, lang);
-	createParameter(LEVEL_PARAM, param_list, display, lang);
-	createParameter(RANK_PARAM, param_list, display, lang);
-	createParameter(MAXDOCS_PARAM, param_list, display, lang);
+	//createParameter(INDEX_PARAM, param_list, display, lang);
+	createParameter(LEVEL_PARAM, param_list,  lang);
+	createParameter(RANK_PARAM, param_list, lang);
+	createParameter(MAXDOCS_PARAM, param_list,  lang);
 
 
@@ -360,49 +318,18 @@
 	Element param=null;
 
-	if (display) {
-	    param = GSXML.createParameterDisplay(doc_, ADVANCED_FIELD_PARAM, "",  null, null);
-	    param_list.appendChild(param);
-	} else {
-	    multiparam = GSXML.createParameterDescription(doc_, ADVANCED_FIELD_PARAM, GSXML.PARAM_TYPE_MULTI, null, null);
-	    multiparam.setAttribute("occurs", "4");
-	    param_list.appendChild(multiparam);
-	}
-	
-	if (display) {
-	    createParameter(FIELD_COMBINE_PARAM, param_list, display, lang);
-	    createParameter(FIELD_QUERY_PARAM, param_list, display, lang);
-	    createParameter(FIELD_CASE_PARAM, param_list, display, lang);
-	    createParameter(FIELD_STEM_PARAM, param_list, display, lang);
-	    createParameter(FIELD_FIELD_PARAM, param_list, display, lang);
-	} else {
-	    createParameter(FIELD_COMBINE_PARAM, multiparam, display, lang);
-	    createParameter(FIELD_QUERY_PARAM, multiparam, display, lang);
-	    createParameter(FIELD_CASE_PARAM, multiparam, display, lang);
-	    createParameter(FIELD_STEM_PARAM, multiparam, display, lang);
-	    createParameter(FIELD_FIELD_PARAM, multiparam, display, lang);    
-	}
+	multiparam = GSXML.createParameterDescription(doc_, ADVANCED_FIELD_PARAM, "", GSXML.PARAM_TYPE_MULTI, null, null, null);
+	multiparam.setAttribute("occurs", "4");
+	param_list.appendChild(multiparam);
+	
+	createParameter(FIELD_COMBINE_PARAM, multiparam,  lang);
+	createParameter(FIELD_QUERY_PARAM, multiparam,  lang);
+	createParameter(FIELD_CASE_PARAM, multiparam,  lang);
+	createParameter(FIELD_STEM_PARAM, multiparam,  lang);
+	createParameter(FIELD_FIELD_PARAM, multiparam,  lang);    
+	
 
 	return true;
     }
 
-
-    /** creates a display element containing all the text strings needed to display
-	the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang)
-    {
-	// Create a service display for the basic text query service
-	Element display = super.createServiceDisplay(service, lang);
-
-	// Now add MGPP's special services
-	if (service.equals(FIELD_QUERY_SERVICE)) {
-       	    createFieldQueryParamList(display, true, lang);
-	}
-	if (service.equals(ADVANCED_FIELD_QUERY_SERVICE)) {
-	    createAdvancedFieldQueryParamList(display, true, lang);
-	}
-
-	return display;
-    }
-    
     // the following three functions are needed so the base class can 
     // call the process+SERVICE_NAME methods
@@ -469,13 +396,13 @@
 	}
 
-	// If an index hasn't been specified, use the default
-	String index = (String) params.get(INDEX_PARAM); 
-	if (index == null) {
-	    index = default_index_;
-	}
-
+	// If an field hasn't been specified, use all fields
+	String field = (String) params.get(INDEX_FIELD_PARAM); 
+	if (field == null) {
+	    field = "ZZ";
+	}
+	
 	// set up mgpp_src
 	String indexdir = GSFile.collectionBaseDir(site_home_, cluster_name_) +
-	    File.separatorChar + GSFile.collectionIndexPath(cluster_name_, index);
+	    File.separatorChar + GSFile.collectionIndexPath(cluster_name_, default_index_);
 	mgpp_src_.loadIndexData(indexdir);
 	setStandardQueryParams(params);
@@ -483,4 +410,7 @@
 	// if field search, create the query string
 	switch (query_type) {
+	case TEXT_QUERY:
+	    query = addFieldInfo(query, field);
+	    break;
 	case SIMPLE_QUERY:
 	    query = parseFieldQueryParams(params);
@@ -532,5 +462,5 @@
 	    term_elem.setAttribute(FREQ_ATT, "" + term_info.term_freq_);
 	    term_elem.setAttribute(NUM_DOCS_MATCH_ATT, "" + term_info.match_docs_);
-	    String field = term_info.tag_;
+	    field = term_info.tag_;
 	    if (field.equals(query_level)) {
 		// ignore
@@ -596,4 +526,10 @@
     }
 
+    protected String addFieldInfo(String query, String field) {
+	if (field.equals("") || field.equals("ZZ")) {
+	    return query;
+	}
+	return "["+query+"]:"+field;
+    }
     /** combines all the field params into a single query
      * - for simple field query */
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGSearch.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGSearch.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2MGSearch.java	(revision 4903)
@@ -62,26 +62,17 @@
      * otherwise it creates the description version
      */
-    protected boolean createTextQueryParamList(Element param_list, boolean display,
+    protected boolean createTextQueryParamList(Element param_list, 
 					       String lang)
     {
 	// the order they are specified here is the order they appear on 
 	// the query form
-	createParameter(INDEX_PARAM, param_list, display, lang);
-	createParameter(CASE_PARAM, param_list, display, lang);
-	createParameter(STEM_PARAM, param_list, display, lang);
-	createParameter(MATCH_PARAM, param_list, display, lang);
-	createParameter(MAXDOCS_PARAM, param_list, display, lang);
-	createParameter(QUERY_PARAM, param_list, display, lang);
+	createParameter(INDEX_PARAM, param_list, lang);
+	createParameter(CASE_PARAM, param_list, lang);
+	createParameter(STEM_PARAM, param_list, lang);
+	createParameter(MATCH_PARAM, param_list,  lang);
+	createParameter(MAXDOCS_PARAM, param_list,  lang);
+	createParameter(QUERY_PARAM, param_list,  lang);
 
 	return true;
-    }
-
-
-    /** Creates a display element containing all the text strings needed to display
-	the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang)
-    {
-	// Create a service display for the basic text query service
-	return super.createServiceDisplay(service, lang);
     }
 
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java	(revision 4903)
@@ -75,5 +75,4 @@
 
     protected GDBMWrapper gdbm_src_ = null;
-    
     protected Element config_info_ = null; // the xml from the config file
 
@@ -106,10 +105,4 @@
 	dcr_service.setAttribute(GSXML.NAME_ATT, DOCUMENT_CONTENT_RETRIEVE_SERVICE);
 	short_service_info_.appendChild(dcr_service);
-
-	// set up service_info_map_ - for now, just has the same elements as above
-	// should have full details about each service incl params lists etc.
-	service_info_map_.put(DOCUMENT_STRUCTURE_RETRIEVE_SERVICE, dsr_service);
-	service_info_map_.put(DOCUMENT_METADATA_RETRIEVE_SERVICE, dmr_service);
-	service_info_map_.put(DOCUMENT_CONTENT_RETRIEVE_SERVICE, dcr_service);
 
 	// Open GDBM database for querying
@@ -146,15 +139,4 @@
         short_service_info_.appendChild(cbmr_service);
 
-        // service_info_map_
-
-	// the metadata one has the same info for now  - should this advertise what metadata is available??
-	Element cbmr_service_info = (Element) cbmr_service.cloneNode(true);
-	service_info_map_.put(CLASSIFIER_METADATA_SERVICE, cbmr_service_info);
-
-	//the browse one
-	Element cb_service_info = (Element)cb_service.cloneNode(true);
-	Element cl_list = doc_.createElement(GSXML.CLASSIFIER_ELEM+GSXML.LIST_MODIFIER);
-	cb_service_info.appendChild(cl_list);
-	
 	// the format info
 	Element cb_format_info = doc_.createElement(GSXML.FORMAT_ELEM);
@@ -166,6 +148,4 @@
 	    Element new_cl = (Element)doc_.importNode(cl, false); // just import this node, not the children
 	    
-	    cl_list.appendChild(new_cl);
-
 	    // get the format info out, and put inside a classifier element
 	    Element format_cl = (Element)new_cl.cloneNode(false);
@@ -185,6 +165,4 @@
 	}
 	    
-	
-	service_info_map_.put(CLASSIFIER_SERVICE, cb_service_info);
 	if (format_found) {
 	    format_info_map_.put(CLASSIFIER_SERVICE, cb_format_info);
@@ -201,5 +179,78 @@
 	return true;
     }
-    
+
+    protected Element getServiceDescription(String service_id, String lang) {
+
+	if (service_id.equals(CLASSIFIER_SERVICE)) {
+	    
+	    Element class_list = (Element)GSXML.getChildByTagName(config_info_, GSXML.CLASSIFIER_ELEM+GSXML.LIST_MODIFIER);
+	    if (class_list == null) {
+            // no classifiers specified
+		return null;
+	    }
+	    
+	    Element cb_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	    cb_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_BROWSE);
+	    cb_service.setAttribute(GSXML.NAME_ATT, CLASSIFIER_SERVICE);
+	    cb_service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME,  getTextString(CLASSIFIER_SERVICE+".name", lang)));
+	    
+	    Element cl_list = doc_.createElement(GSXML.CLASSIFIER_ELEM+GSXML.LIST_MODIFIER);
+	    cb_service.appendChild(cl_list);
+	    NodeList classifiers = class_list.getElementsByTagName(GSXML.CLASSIFIER_ELEM);
+	    for(int i=0; i<classifiers.getLength(); i++) {
+		Element cl = (Element)classifiers.item(i);
+		Element new_cl = (Element)doc_.importNode(cl, false); // just import this node, not the children
+		
+		cl_list.appendChild(new_cl);
+		String text = GSXML.getDisplayText(cl, 
+						GSXML.DISPLAY_TEXT_NAME, 
+						lang, "en");
+		if (text == null || text.equals("")) {
+		    // no display element was specified, use the metadata name
+		    // for now this looks in the class properties file
+		    // this needs to use a general metadata thing instead
+		    text = getTextString(cl.getAttribute(GSXML.CLASSIFIER_CONTENT_ATT), lang);
+		}
+		
+		Element cl_name = GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME, text);
+		new_cl.appendChild(cl_name);
+		
+	    }
+	    return cb_service;
+	}
+	
+	// these ones are probably never called, but put them here just in case
+	
+	if (service_id.equals(CLASSIFIER_METADATA_SERVICE)) {
+	    
+	    Element cbmr_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	    cbmr_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_RETRIEVE);
+	    cbmr_service.setAttribute(GSXML.NAME_ATT, CLASSIFIER_METADATA_SERVICE);
+	    return cbmr_service;
+	}
+
+	if (service_id.equals(DOCUMENT_STRUCTURE_RETRIEVE_SERVICE)) {
+	    Element dsr_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	    dsr_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_RETRIEVE);
+	    dsr_service.setAttribute(GSXML.NAME_ATT, DOCUMENT_STRUCTURE_RETRIEVE_SERVICE);
+	    return dsr_service;
+	}
+	if (service_id.equals(DOCUMENT_METADATA_RETRIEVE_SERVICE)) {
+	    Element dmr_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	    dmr_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_RETRIEVE);
+	    dmr_service.setAttribute(GSXML.NAME_ATT, DOCUMENT_METADATA_RETRIEVE_SERVICE);
+	    return dmr_service;
+	}
+
+	if (service_id.equals(DOCUMENT_CONTENT_RETRIEVE_SERVICE)) {
+	    Element dcr_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	    dcr_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_RETRIEVE);
+	    dcr_service.setAttribute(GSXML.NAME_ATT, DOCUMENT_CONTENT_RETRIEVE_SERVICE);
+	    return dcr_service;
+	}
+
+	return null;
+    }
+
     /** 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) {
@@ -227,15 +278,12 @@
 	    
 	    // get the display elements if any - displayName
-	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAYNAME_ELEM);
+	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAY_TEXT_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);
+		    cl.appendChild(owner.importNode(e, true));
 		    
-		    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);
+		}
 	    }
 	    
@@ -253,51 +301,4 @@
     }
 	    
-
-    /** creates a display element containing all the text strings needed to display the service page, in the language specified 
-     * the retrieval services dont get displayed to the users - they are only used internally by the actions. so this returns an empty display element
-     * for those services. CLASSIFIER_BROWSE service returns some info */
-    protected Element createServiceDisplay(String service, String lang)
-    {
-	Element display = doc_.createElement(GSXML.DISPLAY_ELEM);
-	if (!service.equals(CLASSIFIER_SERVICE)) {
-	    return display;
-	}
-
-	// CLASSIFIER_SERVICE
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM,  getTextString(service+".name", lang)));
-	//display.appendChild(GSXML.createTextElement(doc_,  GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang)));
-	
-	// need to add in the classifier name info
-	// add <classifier name="CL1">text name</classifier> to the 
-	// display node
-	NodeList classifiers = config_info_.getElementsByTagName(GSXML.CLASSIFIER_ELEM);
-	for (int i=0; i<classifiers.getLength(); i++) {
-	    Element cl = (Element)classifiers.item(i);
-	    Element disp = (Element)GSXML.getChildByTagName(cl, GSXML.DISPLAY_ELEM);
-	    String text = null;
-	    if (disp !=null) {
-		text = GSXML.getDisplayText(disp, 
-					    GSXML.DISPLAY_NAME_ELEM, 
-					    lang, "en");
-	    }
-	    if (text == null || text.equals("")) {
-		// no display element was specified, use the metadata name
-		// for now this looks in the class properties file
-		// this needs to use a general metadata thing instead
-		text = getTextString(cl.getAttribute(GSXML.CLASSIFIER_CONTENT_ATT), lang);
-	    }
-	    
-	    Element cl_elem = doc_.createElement(GSXML.CLASSIFIER_ELEM);
-	    cl_elem.setAttribute(GSXML.NAME_ATT, cl.getAttribute(GSXML.NAME_ATT));
-	    Element cl_name = GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM, text);
-	    cl_elem.appendChild(cl_name);
-		
-	    display.appendChild(cl_elem);
-	    
-	}
-	
-	return display;
-	
-    }
 
     /** parent is true if this node is definitely the  parent of something, 
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Search.java	(revision 4903)
@@ -99,6 +99,6 @@
 	}
 
-	// these entries should reflect the build config file - some services may not be available depending on how the colleciton was built.
-	// set up short_service_info_ - for now just has name and type
+	// these entries should reflect the build config file - some services may not be available depending on how the collection was built.
+	// set up short_service_info_ - for now just has id and type. the name (lang dependent) will be added in if the list is requested.
 	Element tq_service = doc_.createElement(GSXML.SERVICE_ELEM);
 	tq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY);
@@ -106,11 +106,4 @@
 	short_service_info_.appendChild(tq_service);
 
-	// set up service_info_map_ - for now, just has the same elements as above
-	// should have full details about each service incl params lists etc.
-	Element tq_service_full = (Element) tq_service.cloneNode(true);
-	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
-	createTextQueryParamList(param_list, false, null);
-	tq_service_full.appendChild(param_list);
-	service_info_map_.put(TEXT_QUERY_SERVICE, tq_service_full);
 
 	// Open GDBM database for querying
@@ -130,5 +123,21 @@
     }
 
-
+    protected Element getServiceDescription(String service, String lang) {
+	
+	if (!service.equals(TEXT_QUERY_SERVICE)) {
+	    return null;
+	}
+	Element tq_service = doc_.createElement(GSXML.SERVICE_ELEM);
+	tq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY);
+	tq_service.setAttribute(GSXML.NAME_ATT, TEXT_QUERY_SERVICE);
+	tq_service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME, getTextString(TEXT_QUERY_SERVICE+".name", lang)));
+	tq_service.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_SUBMIT, getTextString(TEXT_QUERY_SERVICE+".submit", lang)));
+	Element param_list = doc_.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER);
+	createTextQueryParamList(param_list, lang);
+	tq_service.appendChild(param_list);
+	return tq_service;
+	
+    }
+    
     protected boolean addExtraQueryInfo(Element info, Element extra_info){
 
@@ -155,15 +164,10 @@
 	    
 	    // get the display elements if any - displayName
-	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAYNAME_ELEM);
+	    NodeList display_names = node_extra.getElementsByTagName(GSXML.DISPLAY_TEXT_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(owner.importNode(e, true));
 		}
-		ind.appendChild(display);
 	    }
 	} // for each index
@@ -181,8 +185,8 @@
 /** creates a new param element and adds it to the param list */
     protected void createParameter(String name, Element param_list, 
-				   boolean display, String lang)
+				   /*boolean display,*/ String lang)
     {
 	Element param=null;
-
+	
 	if (name.equals(INDEX_PARAM)) {
 	    // the index info - read from config file
@@ -194,58 +198,32 @@
 	    String [] ind_names = new String[len];
 	    for (int i=0; i<len; i++) {
-		inds[i] = ((Element)indexes.item(i)).getAttribute(GSXML.NAME_ATT);
-		if (display) {
-		    Element disp = (Element)GSXML.getChildByTagName(indexes.item(i), GSXML.DISPLAY_ELEM);
-		    ind_names[i] = GSXML.getDisplayText(disp, GSXML.DISPLAY_NAME_ELEM, lang, "en");
-		}
+		Element index = (Element)indexes.item(i);
+		inds[i] = index.getAttribute(GSXML.NAME_ATT);
+		ind_names[i] = GSXML.getDisplayText(index, GSXML.DISPLAY_TEXT_NAME, lang, "en");
+		
 	    }
-	    if (display) {
-		param = GSXML.createParameterDisplay(doc_, INDEX_PARAM, getTextString("param."+INDEX_PARAM, lang), inds, ind_names);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, INDEX_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, default_index_, inds);
-	    }
-	} else if (name.equals(CASE_PARAM)) {
-	    if (display) {
-		String[] bool_ops = {"0", "1"};
-		String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
-		param = GSXML.createParameterDisplay(doc_, CASE_PARAM, getTextString("param."+CASE_PARAM, lang),  bool_ops, bool_texts);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, CASE_PARAM, GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, null);
-	    }
-	}
-	else if (name.equals(STEM_PARAM)) {
-	    if (display) {
-		String[] bool_ops = {"0", "1"};
-		String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
-		param = GSXML.createParameterDisplay(doc_, STEM_PARAM, getTextString("param."+STEM_PARAM, lang),  bool_ops, bool_texts);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, STEM_PARAM, GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, null);
-	    }
-	}
+	    param = GSXML.createParameterDescription(doc_, INDEX_PARAM, getTextString("param."+INDEX_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, default_index_, inds, ind_names);
+	    
+	} 
+	else if (name.equals(CASE_PARAM) || name.equals(STEM_PARAM)) {
+	    String[] bool_ops = {"0", "1"};
+	    String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)}; 
+	    param = GSXML.createParameterDescription(doc_, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_BOOLEAN, BOOLEAN_PARAM_ON, bool_ops, bool_texts);
+	} 
 	else if (name.equals(MATCH_PARAM)) {
 	    String[] vals = {MATCH_PARAM_ALL, MATCH_PARAM_SOME};
-	    if (display) {
-		String[] val_texts = {getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_ALL, lang),getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_SOME, lang)}; 
-
-		param = GSXML.createParameterDisplay(doc_, MATCH_PARAM, getTextString("param."+MATCH_PARAM, lang), vals, val_texts);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, MATCH_PARAM, GSXML.PARAM_TYPE_ENUM_SINGLE, MATCH_PARAM_ALL, vals);
-	    }	
+	    String[] val_texts = {getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_ALL, lang),getTextString("param."+MATCH_PARAM+"."+MATCH_PARAM_SOME, lang)}; 
+	    param = GSXML.createParameterDescription(doc_, MATCH_PARAM, getTextString("param."+MATCH_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, MATCH_PARAM_ALL, vals, val_texts);
+	    
 	}
 	else if (name.equals(MAXDOCS_PARAM)) {
-	    if (display) {
-		param = GSXML.createParameterDisplay(doc_, MAXDOCS_PARAM, getTextString("param."+MAXDOCS_PARAM, lang), null, null);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, MAXDOCS_PARAM, GSXML.PARAM_TYPE_INTEGER, "10", null);
-	    }
+	    param = GSXML.createParameterDescription(doc_, MAXDOCS_PARAM, getTextString("param."+MAXDOCS_PARAM, lang), GSXML.PARAM_TYPE_INTEGER, "10", null, null);
+	    
 	}
 	else if (name.equals(QUERY_PARAM)) {
-	    if (display) {
-		param = GSXML.createParameterDisplay(doc_, QUERY_PARAM, getTextString("param."+QUERY_PARAM, lang), null, null);
-	    } else {
-		param = GSXML.createParameterDescription(doc_, QUERY_PARAM, GSXML.PARAM_TYPE_STRING, null, null);
-	    }
-	}
-
+	    param = GSXML.createParameterDescription(doc_, QUERY_PARAM, getTextString("param."+QUERY_PARAM, lang), GSXML.PARAM_TYPE_STRING, null, null, null);
+	    
+	}
+	
 	// add the param to the list
 	if (param != null) {
@@ -260,24 +238,5 @@
      */
     protected abstract boolean createTextQueryParamList(Element param_list, 
-							boolean display,
 							String lang);
-
-    /** creates a display element containing all the text strings needed to display
-	the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang)
-    {
-	// Create a service display for the basic text query service
-	Element display = doc_.createElement(GSXML.DISPLAY_ELEM);
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM, getTextString(service+".name", lang)));
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang)));
-
-	// now need to add in the params
-	if (service.equals(TEXT_QUERY_SERVICE)) {
-	    createTextQueryParamList(display, true, lang);
-	}
-
-	return display;
-    }
-
 
     /** Creates a new documentNode element containing ID, node type 
@@ -293,9 +252,4 @@
 	DBInfo info = gdbm_src_.getInfo(node_id);
 	if (info == null) { // make it up - cant query the gdbm db
-	    if (is_top) {
-		doc_node.setAttribute(GSXML.NODE_TYPE_ATT, GSXML.NODE_TYPE_ROOT);
-	    } else {
-		doc_node.setAttribute(GSXML.NODE_TYPE_ATT, GSXML.NODE_TYPE_INTERIOR);
-	    }
 	    doc_node.setAttribute(GSXML.DOC_TYPE_ATT, "simple");
 	    return doc_node;
@@ -304,4 +258,9 @@
 	boolean is_leaf = (children.equals("") ? true : false);
 
+	// check for simple doc types
+	if (is_top && is_leaf) { // a single section document
+	    doc_node.setAttribute(GSXML.DOC_TYPE_ATT, "simple");
+	    return doc_node;
+	}
 	// set teh node type att
 	if (is_top) {
@@ -312,11 +271,5 @@
 	    doc_node.setAttribute(GSXML.NODE_TYPE_ATT, GSXML.NODE_TYPE_INTERIOR);
 	}
-
-	// set teh doc type att
-	if (is_top && is_leaf) { // a single section document
-	    doc_node.setAttribute(GSXML.DOC_TYPE_ATT, "simple");
-	    return doc_node;
-	}
-
+	
 	if (!is_top) { // we need to look at the top info
 	    info = gdbm_src_.getInfo(top_id);
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java	(revision 4903)
@@ -44,4 +44,7 @@
     private MGPPWrapper mgpp_src_=null;
     private String basepath_ = null;
+
+    private Element applet_description = null;
+    
     public PhindPhraseBrowse() {
 	mgpp_src_ = new MGPPWrapper();
@@ -68,9 +71,9 @@
 	short_service_info_.appendChild(e);
 
-	// set up service_info_map_ - we only have one element, and it has
-	// no extra info yet - we are not processing the config info
-	Element f = doc_.createElement(GSXML.SERVICE_ELEM);
-	f.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_APPLET);
-	f.setAttribute(GSXML.NAME_ATT, PHIND_SERVICE);
+	// set up the static applet description
+
+	applet_description = doc_.createElement(GSXML.SERVICE_ELEM);
+	applet_description.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_APPLET);
+	applet_description.setAttribute(GSXML.NAME_ATT, PHIND_SERVICE);
 
 	// add in the applet info for the phind applet
@@ -87,19 +90,16 @@
 	Document dom = converter_.getDOM(app_info);
 	Element app_elem = dom.getDocumentElement();
-	f.appendChild(doc_.importNode(app_elem, true));
-	
-	service_info_map_.put(PHIND_SERVICE, f);
+	applet_description.appendChild(doc_.importNode(app_elem, true));
 	
 	return true;
     }
 
-    /** creates a display element containing all the text strings needed to display the service page, in the language specified */
-    protected Element createServiceDisplay(String service, String lang) {
-	Element display = doc_.createElement(GSXML.DISPLAY_ELEM);
-	display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM,  getTextString(service+".name", lang)));
-	//display.appendChild(GSXML.createTextElement(doc_,  GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang)));
-
-	return display;
-	
+    protected Element getServiceDescription(String service, String lang) {
+	if (!service.equals(PHIND_SERVICE)) {
+	    return null;
+	}
+	Element describe = (Element) applet_description.cloneNode(true);
+	describe.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME,  getTextString(PHIND_SERVICE+".name", lang)));
+	return describe;
     }
 
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceRack.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceRack.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceRack.java	(revision 4903)
@@ -79,10 +79,8 @@
     protected Document doc_ = null;
 
-    /** XML element for describe requests - list of supported services */
+    /** XML element for describe requests - list of supported services
+	- this is static     */
     protected Element short_service_info_ = null;
 
-    /** XML element for describe requests - map of service name to full 
-	description */
-    protected HashMap service_info_map_ = null;
     /** XML element for stylesheet requests - map of service name to format 
 	elem */
@@ -117,5 +115,4 @@
 	doc_ = converter_.newDOM();
 	short_service_info_ = doc_.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER);
-	service_info_map_ = new HashMap();
 	format_info_map_ = new HashMap();
     }
@@ -191,9 +188,8 @@
 		String to = GSPath.getFirstLink(request.getAttribute(GSXML.TO_ATT));		
 		Element response = null;
-		if (service_info_map_.containsKey(to)) { 
-		    try {
+		try {
 		    Class c = this.getClass();
 		    Class []params = {Class.forName("org.w3c.dom.Element")};
-
+		    
 		    String method_name = "process"+to;
 		    Method m = null;
@@ -226,12 +222,7 @@
 			mainResult.appendChild(doc_.importNode(response, true));
 		    }
-		    		   
-		    } catch (ClassNotFoundException e) {
-			System.err.println("ServiceRack error: Element class not found");
-			return null;
-		    }
-		} else {
-		    // else error in to field
-		    System.err.println("ServiceRack describe request: error in 'to' field, non-existant service "+to+" specified!");
+		    
+		} catch (ClassNotFoundException e) {
+		    System.err.println("ServiceRack error: Element class not found");
 		    return null;
 		}
@@ -242,4 +233,6 @@
 		
     }
+
+ 
 
     /** process method for describe requests 
@@ -258,12 +251,11 @@
 	
 	// describe a particular service	
-	if (service_info_map_.containsKey(to)) {
-	    response.appendChild(getServiceDescription(to, lang));
+	//if (service_info_map_.containsKey(to)) {
+	Element description = getServiceDescription(to, lang);
+	if (description != null) { // may be null if non-existant service
+	    response.appendChild(description);
 	    response.setAttribute(GSXML.FROM_ATT, to);
-	    return response;
 	}
-	// else error in to field
-	System.err.println("ServiceRack describe request: error in 'to' field, to='"+to+"'.");
-	return null;
+	return response;
     
     }
@@ -288,34 +280,17 @@
 	    return response;
 	}
-	// else error in to field
+	// else no format info
 	System.err.println("ServiceRack describe request: no format info for "+to+".");
 	return response;
     }	
     
-    // the following two should be overwritten for info with any language stuff in it
     /** returns the service list for the subclass */
     protected Element getServiceList(String lang) {
-	// for now, it is static and there is no lang stuff
-	return short_service_info_;
+	// for now, it is static and has no language stuff
+	return (Element) short_service_info_.cloneNode(true);
     }
     
     /** returns a specific service description */
-    protected Element getServiceDescription(String service, String lang) {
-	Element descript = (Element)((Element)service_info_map_.get(service)).cloneNode(true);
-	// for now, create the display element on the fly - look at caching it later
-	Element display = createServiceDisplay(service, lang);
-	addServiceDisplay(descript, display);
-	return descript;
-    }
-    
-    
-    /** adds the display element into the description - appends to the root for now, but may do something fancy later */
-    protected boolean addServiceDisplay(Element descript, Element display) {
-	if (descript.getOwnerDocument() != display.getOwnerDocument()) {
-	    display = (Element)descript.getOwnerDocument().importNode(display, true);
-	}
-	descript.appendChild(display);
-	return true;
-    }
+    abstract protected Element getServiceDescription(String service, String lang);
 
     protected Element getServiceFormat(String service) {
@@ -323,6 +298,4 @@
 	return format;
     }
-    /** creates a display element containing all the text strings needed to display the service page, in the language specified */
-    abstract protected Element createServiceDisplay(String service, String lang);
 
     /** overloaded version for no args case */
@@ -345,3 +318,6 @@
 	return result;
     }
+
+    
 }
+
Index: /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/XSLTServices.java
===================================================================
--- /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/XSLTServices.java	(revision 4902)
+++ /trunk/gsdl3/src/java/org/greenstone/gsdl3/service/XSLTServices.java	(revision 4903)
@@ -119,11 +119,8 @@
   }
 
-  /** 
-   * creates a display element containing all the text strings 
-   * needed to display the service page, in the language specified 
-   */
-  protected Element createServiceDisplay(String service, String lang) {
-    return null;
-  }
+    protected Element getServiceDescription(String service, String lang) {
+
+	return null;
+    }
   
   /** process method for specific services - must be implemented by all
