Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/Action.java	(revision 26026)
@@ -112,5 +112,5 @@
 			if (!pos.equals(""))
 			{
-			    metadata.append("pos"+pos); // first, last or indexing number
+				metadata.append("pos" + pos); // first, last or indexing number
 				metadata.append(GSConstants.META_RELATION_SEP);
 			}
@@ -174,14 +174,10 @@
 			}
 		}
-		
-		NodeList image_nodes = format.getElementsByTagName("gsf:image");
-		for(int i = 0; i < image_nodes.getLength(); i++)
-		{
-			if(format.getElementsByTagName("gsf:image").getLength() > 0)
-			{
-				meta_names.add("Thumb");
-				meta_names.add("Screen");
-				meta_names.add("SourceFile");
-			}
+
+		if (format.getElementsByTagName("gsf:image").getLength() > 0)
+		{
+			meta_names.add("Thumb");
+			meta_names.add("Screen");
+			meta_names.add("SourceFile");
 		}
 	}
@@ -258,8 +254,8 @@
 	{
 		Element documentOptionList = this.doc.createElement("interfaceOptions");
-		for(Object key : this.config_params.keySet())
+		for (Object key : this.config_params.keySet())
 		{
 			Element option = this.doc.createElement("option");
-			option.setAttribute(GSXML.NAME_ATT, (String)key);
+			option.setAttribute(GSXML.NAME_ATT, (String) key);
 			option.setAttribute(GSXML.VALUE_ATT, this.config_params.get(key).toString());
 			documentOptionList.appendChild(option);
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/BrowseAction.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/BrowseAction.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/BrowseAction.java	(revision 26026)
@@ -143,4 +143,14 @@
 				page_response.appendChild(new_format);
 				getRequiredMetadataNames(new_format, metadata_names);
+			}
+		}
+		
+		Element extraMetaListElem = (Element) GSXML.getChildByTagName(request, GSXML.EXTRA_METADATA + GSXML.LIST_MODIFIER);
+		if(extraMetaListElem != null)
+		{
+			NodeList extraMetaList = extraMetaListElem.getElementsByTagName(GSXML.EXTRA_METADATA);
+			for(int i = 0; i < extraMetaList.getLength(); i++)
+			{
+				metadata_names.add(((Element)extraMetaList.item(i)).getAttribute(GSXML.NAME_ATT));
 			}
 		}
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java	(revision 26026)
@@ -381,4 +381,14 @@
 			getRequiredMetadataNames(format_elem, meta_names);
 		}
+		
+		Element extraMetaListElem = (Element) GSXML.getChildByTagName(request, GSXML.EXTRA_METADATA + GSXML.LIST_MODIFIER);
+		if(extraMetaListElem != null)
+		{
+			NodeList extraMetaList = extraMetaListElem.getElementsByTagName(GSXML.EXTRA_METADATA);
+			for(int i = 0; i < extraMetaList.getLength(); i++)
+			{
+				meta_names.add(((Element)extraMetaList.item(i)).getAttribute(GSXML.NAME_ATT));
+			}
+		}
 
 		Element dm_param_list = createMetadataParamList(meta_names);
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/GS2BrowseAction.java	(revision 26026)
@@ -132,4 +132,15 @@
 				Element new_format = GSXML.duplicateWithNewName(this.doc, this_format, GSXML.FORMAT_ELEM, false);
 				extractMetadataNames(new_format, doc_meta_names, class_meta_names);
+				
+				Element extraMetaListElem = (Element) GSXML.getChildByTagName(request, GSXML.EXTRA_METADATA + GSXML.LIST_MODIFIER);
+				if(extraMetaListElem != null)
+				{
+					NodeList extraMetaList = extraMetaListElem.getElementsByTagName(GSXML.EXTRA_METADATA);
+					for(int i = 0; i < extraMetaList.getLength(); i++)
+					{
+						class_meta_names.add(((Element)extraMetaList.item(i)).getAttribute(GSXML.NAME_ATT));
+					}
+				}
+				
 				// set the format type
 				new_format.setAttribute(GSXML.TYPE_ATT, "browse");
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java	(revision 26026)
@@ -228,4 +228,14 @@
 		// metadata that it wants, and QueryAction should look through the format stuff to see if there is any other?
 
+		Element extraMetaListElem = (Element) GSXML.getChildByTagName(request, GSXML.EXTRA_METADATA + GSXML.LIST_MODIFIER);
+		if(extraMetaListElem != null)
+		{
+			NodeList extraMetaList = extraMetaListElem.getElementsByTagName(GSXML.EXTRA_METADATA);
+			for(int i = 0; i < extraMetaList.getLength(); i++)
+			{
+				metadata_names.add(((Element)extraMetaList.item(i)).getAttribute(GSXML.NAME_ATT));
+			}
+		}
+
 		Element dm_param_list = createMetadataParamList(metadata_names);
 
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java	(revision 26026)
@@ -32,6 +32,8 @@
 import java.nio.channels.FileChannel;
 import java.util.ArrayList;
+import java.util.Collection;
 
 import org.apache.log4j.*;
+import org.greenstone.util.GlobalProperties;
 
 /**
@@ -534,3 +536,54 @@
 	}
 
+	public static ArrayList<File> getAllXSLFiles(String interfaceName, String siteName)
+	{
+		ArrayList<File> filesToReturn = new ArrayList<File>();
+		
+		File siteCollectionDir = new File(GSFile.siteHome(GlobalProperties.getGSDL3Home(), siteName) + File.separator + "collect");
+		if(siteCollectionDir.exists() && siteCollectionDir.isDirectory())
+		{
+			File[] collections = siteCollectionDir.listFiles();
+			
+			for(File collection : collections)
+			{
+				if(collection.isDirectory())
+				{
+					File collectionTranformDir = new File(collection.getAbsolutePath() + File.separator + "transform");
+					if(collectionTranformDir.exists() && collectionTranformDir.isDirectory())
+					{
+						filesToReturn.addAll(getXSLFilesFromDirectoryRecursive(collectionTranformDir));
+					}
+				}
+			}
+		}
+		
+		filesToReturn.addAll(getXSLFilesFromDirectoryRecursive(new File(GSFile.interfaceHome(GlobalProperties.getGSDL3Home(), interfaceName) + File.separator + "transform")));
+		
+		return filesToReturn;
+	}
+
+	protected static ArrayList<File> getXSLFilesFromDirectoryRecursive(File directory)
+	{
+		ArrayList<File> filesToReturn = new ArrayList<File>();
+		
+		if(!directory.isDirectory())
+		{
+			return filesToReturn;
+		}
+		
+		File[] currentFiles = directory.listFiles();
+		for(File current : currentFiles)
+		{
+			if(current.isDirectory())
+			{
+				filesToReturn.addAll(GSFile.getXSLFilesFromDirectoryRecursive(current));
+			}
+			else if(current.getName().endsWith(".xsl"))
+			{
+				filesToReturn.add(current);
+			}
+		}
+		
+		return filesToReturn;
+	}
 }
Index: main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java
===================================================================
--- main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java	(revision 26025)
+++ main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java	(revision 26026)
@@ -79,4 +79,5 @@
 	public static final String SYSTEM_ELEM = "system";
 	public static final String FORMAT_STRING_ELEM = "formatString";
+	public static final String EXTRA_METADATA = "extraMetadata";
 
 	//config file elems
@@ -134,4 +135,5 @@
 	public static final String FROM_ATT = "from";
 	public static final String LANG_ATT = "lang";
+	public static final String HREF_ATT = "href";
 	public static final String TYPE_ATT = "type";
 	public static final String DB_TYPE_ATT = "dbType";
