Index: /main/branches/64_bit_Greenstone/greenstone3/build.xml
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/build.xml	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/build.xml	(revision 23606)
@@ -223,86 +223,106 @@
   <!-- If building a release then we want to adjust environment variables so that the support library can be see during compilation -->
   <if><bool><isset property="use.support.lib"/></bool>
-    <if><bool><isset property="env.CFLAGS"/></bool>
-      <property name="cflags.arg" value="CFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CFLAGS}&quot;"/>
-      <else>
-        <property name="cflags.arg" value="CFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
-      </else>
-    </if>
-    <else>
-      <if><bool><isset property="env.CFLAGS"/></bool>
-        <property name="cflags.arg" value="CFLAGS=&quot;${env.CFLAGS}&quot;"/>
-        <else>
-          <property name="cflags.arg" value=" "/>
-        </else>
-      </if>
-    </else>
-  </if>
-
-  <if><bool><isset property="use.support.lib"/></bool>
-    <if><bool><isset property="env.CPPFLAGS"/></bool>
-      <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CPPFLAGS}&quot;"/>
-      <else>
-        <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
-      </else>
-    </if>
-    <else>
-      <if><bool><isset property="env.CPPFLAGS"/></bool>
-        <property name="cppflags.arg" value="CPPFLAGS=&quot;${env.CPPFLAGS}&quot;"/>
-        <else>
-          <property name="cppflags.arg" value=" "/>
-        </else>
-      </if>
-    </else>
-  </if>
-
-  <if><bool><isset property="use.support.lib"/></bool>
-    <if><bool><isset property="env.CXXFLAGS"/></bool>
-      <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CXXFLAGS}&quot;"/>
-      <else>
-        <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
-      </else>
-    </if>
-    <else>
-      <if><bool><isset property="env.CXXFLAGS"/></bool>
-        <property name="cxxflags.arg" value="CXXFLAGS=&quot;${env.CXXFLAGS}&quot;"/>
-        <else>
-          <property name="cxxflags.arg" value=" "/>
-        </else>
-      </if>
-    </else>
-  </if>
-
-  <if><bool><isset property="use.support.lib"/></bool>
-    <if><bool><isset property="env.LDFLAGS"/></bool>
-      <property name="ldflags.arg" value="LDFLAGS=&quot;-L${basedir}/ext/gnome-lib/${os.bin.dir}/lib ${env.LDFLAGS}&quot;"/>
-      <else>
-        <property name="ldflags.arg" value="LDFLAGS=&quot;-L${basedir}/ext/gnome-lib/${os.bin.dir}/lib&quot;"/>
-      </else>
-    </if>
-    <else>
-      <if><bool><isset property="env.LDFLAGS"/></bool>
-        <property name="ldflags.arg" value="LDFLAGS=&quot;${env.LDFLAGS}&quot;"/>
-        <else>
-          <property name="ldflags.arg" value=" "/>
-        </else>
-      </if>
-    </else>
-  </if>
-
-  <if><bool><isset property="use.support.lib"/></bool>
-    <if><bool><isset property="env.PATH"/></bool>
-      <property name="path.arg" value="PATH=&quot;${basedir}/ext/gnome-lib/${os.bin.dir}/bin:${env.PATH}&quot;"/>
-      <else>
-        <property name="path.arg" value="PATH=&quot;${basedir}/ext/gnome-lib/${os.bin.dir}/bin&quot;"/>
-      </else>
-    </if>
-    <else>    
-      <if><bool><isset property="env.PATH"/></bool>
-        <property name="path.arg" value="PATH=&quot;${env.PATH}&quot;"/>
-        <else>
-          <property name="path.arg" value=" "/>
-        </else>
-      </if>
-    </else>
+
+	<property name="gnome-lib-dir" value="${basedir}/ext/gnome-lib-minimal/${os.bin.dir}"/>
+
+	<if><bool><isset property="env.CFLAGS"/></bool>
+		<property name="cflags.arg" value="CFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CFLAGS}&quot;"/>
+	<else>
+		<property name="cflags.arg" value="CFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.CPPFLAGS"/></bool>
+		<property name="cppflags.arg" value="CPPFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CPPFLAGS}&quot;"/>
+	<else>
+		<property name="cppflags.arg" value="CPPFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.CXXFLAGS"/></bool>
+		<property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CXXFLAGS}&quot;"/>
+	<else>
+        	<property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.LDFLAGS"/></bool>
+		<property name="ldflags.arg" value="LDFLAGS=&quot;-L${gnome-lib-dir}/lib ${env.LDFLAGS}&quot;"/>
+	<else>
+        	<property name="ldflags.arg" value="LDFLAGS=&quot;-L${gnome-lib-dir}/lib&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.PATH"/></bool>
+		<property name="path.arg" value="PATH=&quot;${gnome-lib-dir}/bin:${env.PATH}&quot;"/>
+	<else>
+        	<property name="path.arg" value="PATH=&quot;${gnome-lib-dir}/bin&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.PKG_CONFIG_PATH"/></bool>
+		<property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${gnome-lib-dir}/lib/pkgconfig:${env.PKG_CONFIG_PATH}&quot;"/>
+	<else>
+        	<property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${gnome-lib-dir}/lib/pkgconfig&quot;"/>
+	</else>
+	</if>
+
+	<if><bool><isset property="env.LD_LIBRARY_PATH"/></bool>
+		<property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${gnome-lib-dir}/lib:${env.LD_LIBRARY_PATH}&quot;"/>
+	<else>
+        	<property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${gnome-lib-dir}/lib&quot;"/>
+	</else>
+	</if>
+
+	<else>
+		<if><bool><isset property="env.CFLAGS"/></bool>
+			<property name="cflags.arg" value="CFLAGS=&quot;${env.CFLAGS}&quot;"/>
+        	<else>
+			<property name="cflags.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.CPPFLAGS"/></bool>
+        		<property name="cppflags.arg" value="CPPFLAGS=&quot;${env.CPPFLAGS}&quot;"/>
+        	<else>
+			<property name="cppflags.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.CXXFLAGS"/></bool>
+			<property name="cxxflags.arg" value="CXXFLAGS=&quot;${env.CXXFLAGS}&quot;"/>
+		<else>
+			<property name="cxxflags.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.LDFLAGS"/></bool>
+			<property name="ldflags.arg" value="LDFLAGS=&quot;${env.LDFLAGS}&quot;"/>
+		<else>
+			<property name="ldflags.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.PATH"/></bool>
+			<property name="path.arg" value="PATH=&quot;${env.PATH}&quot;"/>
+		<else>
+			<property name="path.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.PKG_CONFIG_PATH"/></bool>
+			<property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${env.PKG_CONFIG_PATH}&quot;"/>
+		<else>
+			<property name="pcpath.arg" value=" "/>
+		</else>
+		</if>
+
+		<if><bool><isset property="env.LD_LIBRARY_PATH"/></bool>
+			<property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${env.LD_LIBRARY_PATH}&quot;"/>
+		<else>
+			<property name="ldlpath.arg" value=" "/>
+		</else>
+		</if>
+	</else>
   </if>
 
@@ -1509,4 +1529,6 @@
       <arg line="${cxxflags.arg}"/>
       <arg line="${path.arg}"/>
+      <arg line="${pcpath.arg}"/>
+      <arg line="${ldlpath.arg}"/>
     </exec>
   </target>
@@ -1832,4 +1854,6 @@
       <arg line="${cxxflags.arg}"/>
       <arg line="${path.arg}"/>
+      <arg line="${pcpath.arg}"/>
+      <arg line="${ldlpath.arg}"/>
     </exec>
   </target>
Index: /main/branches/64_bit_Greenstone/greenstone3/ext/extension_project_list.xml
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/ext/extension_project_list.xml	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/ext/extension_project_list.xml	(revision 23606)
@@ -18,26 +18,30 @@
     <sequenceList>
       <step id="installOptions" action="properties" label="Install options" dependsOn="AUTOMATIC_DOWNLOAD">
-	<optionList id="Mat" label="Mat options">
-	  <option id="User_Name" label="User name"/>
-	  <option id="Password" label="Password"/>
-	  <option id="Tomcat_Port" label="Tomcat port"/>
-	  <option id="JVM_Version" label="Java Virtual Machine version"/>
-	</optionList>
+        <optionList id="Mat" label="Mat options">
+          <option id="User_Name" label="User name"/>
+          <option id="Password" label="Password"/>
+          <option id="Tomcat_Port" label="Tomcat port"/>
+          <option id="JVM_Version" label="Java Virtual Machine version"/>
+        </optionList>
       </step>
+      
       <step id="install" action="button" label="Install" dependsOn="installOptions">
-	<command>
-	  <os name="default">ant compile</os>
+        <command>
+          <os name="default">ant compile</os>
         </command>
       </step>
+
       <step id="controlPanel" action="panel" label="Control Panel" dependsOn="install">
-	<class>org.greenstone.admin.guiext.mat.ControlPanel</class>
+        <class>org.greenstone.admin.guiext.mat.ControlPanel</class>
       </step>
+
       <step id="uninstall" action="button" label="Uninstall" dependsOn="install" rollbackTo="install">
-	<command>
-	  <os name="default">ant clean</os>
-	</command>
+        <command>
+          <os name="default">ant clean</os>
+        </command>
       </step>
     </sequenceList>
   </extension>
+
   <extension>
     <name>EKit HTML Editor</name>
@@ -47,15 +51,17 @@
     <sequenceList>
       <step id="run" action="button" label="Run EKit" dependsOn="AUTOMATIC_DOWNLOAD">
-	<command>
-	  <os name="default">java -jar ekit.jar</os>
-	</command>
+        <command>
+          <os name="default">java -jar ekit.jar</os>
+        </command>
       </step>
+      
       <step id="assoc" action="button" label="Setup EKit for GLI" dependsOn="AUTOMATIC_DOWNLOAD">
-	<command>
-	  <os name="default">java -jar GLIAssociate.jar</os>
-	</command>
+        <command>
+          <os name="default">java -jar GLIAssociate.jar</os>
+        </command>
       </step>
     </sequenceList>
   </extension>
+
   <extension>
     <name>Video Plugin</name>
@@ -65,16 +71,18 @@
     <sequenceList>
       <step id="download" action="download" label="Download Extension">
-	<mainSource method="svn">http://svn.greenstone.org/gs2-extensions/video/trunk</mainSource>
+        <mainSource method="svn">http://svn.greenstone.org/gs2-extensions/video-and-audio/trunk/src</mainSource>
       </step>
+
       <step id="install" action="button" label="Compile" dependsOn="download">
-	<command>
-	  <os name="default">./CASCADE-MAKE.sh</os>
-	  <os name="Windows">CASCADE-MAKE</os>
-	</command>
+        <command>
+          <os name="default">./CASCADE-MAKE.sh</os>
+          <os name="Windows">CASCADE-MAKE</os>
+        </command>
       </step>
+
       <step id="uninstall" action="button" label="Uninstall" dependsOn="install" rollbackTo="install">
-	<command>
-	  <os name="default"/>
-	</command>
+        <command>
+          <os name="default"/>
+        </command>
       </step>
     </sequenceList>
Index: /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/admin/guiext/DownloadStep.java
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/admin/guiext/DownloadStep.java	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/admin/guiext/DownloadStep.java	(revision 23606)
@@ -50,5 +50,5 @@
 	ExtensionInformation info = _parent.getParent();
 	
-	_mainSource = new Source("svn", info.getBaseURL() + info.getFileStem() + "/trunk/", "", this);
+	_mainSource = new Source("svn", info.getBaseURL() + info.getFileStem() + "/trunk/src", "", this);
 
 	_button.addActionListener(new DownloadButtonListener());
Index: /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java	(revision 23606)
@@ -85,4 +85,6 @@
 
     String format_string = (String)params.get("data");
+    //logger.error("Original format string");
+    //logger.error(format_string);
     
     Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM);
@@ -115,7 +117,7 @@
 
             // not sure what to do here - some code from Transforming Receptionist
-            //String transformed = transformer.transformToString(style_doc, d);
+            String transformed = transformer.transformToString(style_doc, d);
             logger.error("About to transform");
-            Node transformed = (Node) transformer.transform(style_doc, d);  // Failing org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. ; SystemID: file:///home/sam/greenstone3/packages/tomcat/bin/dummy.xsl
+            //Node transformed = (Node) transformer.transform(style_doc, d);  // Failing org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. ; SystemID: file:///home/sam/greenstone3/packages/tomcat/bin/dummy.xsl
 
             logger.error("Transform successful?");
@@ -124,14 +126,14 @@
                 logger.error("TRANSFORMED IS NULL");
 
-            logger.error("begin import"); 
-            Node imported = this.doc.importNode(transformed, true); // There was an exception org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
-            logger.error("finished import"); 
+            //logger.error("begin import"); 
+            //Node imported = this.doc.importNode(transformed, true); // There was an exception org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
+            //logger.error("finished import"); 
 
-            String format_string2 = GSXML.xmlNodeToString(imported); // null pointer exception occuring here
-            logger.error("format string="+format_string2);
+            //String format_string2 = GSXML.xmlNodeToString(imported); // null pointer exception occuring here
+            //logger.error("format string="+format_string2);
  
             Element format = this.doc.createElement(GSXML.FORMAT_STRING_ELEM);
-            //GSXML.setNodeText(format, transformed);
-            format.appendChild(transformed);
+            GSXML.setNodeText(format, transformed);
+            //format.appendChild(transformed);
             //format.setNodeValue(transformed);
             mr_request.appendChild(format); 
Index: /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/collection/Collection.java
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/collection/Collection.java	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/collection/Collection.java	(revision 23606)
@@ -33,4 +33,12 @@
 import java.io.File;
 import java.util.HashMap;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.xml.sax.*;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
 
 import org.apache.log4j.*;
@@ -330,6 +338,6 @@
 
         Element format_element = (Element) GSXML.getChildByTagName(request, GSXML.FORMAT_STRING_ELEM);
-        //String format_string = GSXML.getNodeText(format_element);
-        Element format_statement = (Element) format_element.getFirstChild();
+        String format_string = GSXML.getNodeText(format_element);
+        //Element format_statement = (Element) format_element.getFirstChild();
 
         //logger.error("Format string: " + format_string);
@@ -386,5 +394,5 @@
 
                 // Write format statement
-                String format_string = GSXML.xmlNodeToString(format_statement);
+                //String format_string = GSXML.xmlNodeToString(format_statement);
                 writer = new BufferedWriter(new FileWriter(format_statement_filename));
                 writer.write(format_string);
@@ -405,89 +413,112 @@
             logger.error("SAVE format statement");
 
-            // open collectionConfig.xml and read in to w3 Document
-            String collection_config = directory + "collectionConfig.xml";
-            Document config = this.converter.getDOM(new File(collection_config), "UTF-8");
+            try{
+
+                // Convert format string to a document
+                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                DocumentBuilder builder = factory.newDocumentBuilder();
+                //String input = "<html><head><title></title></head><body>" + format_string + "</body></html>";
+                String input = format_string.substring(0,format_string.length()-1)+"</xml>";
+                logger.error(input);
+                InputSource is = new InputSource( new StringReader( input ) );
+                logger.error("About to parse format string");
+                Document format_statement = (Document) builder.parse( is );
+                logger.error("Done parsing format string");
+
+                // open collectionConfig.xml and read in to w3 Document
+                String collection_config = directory + "collectionConfig.xml";
+                Document config = this.converter.getDOM(new File(collection_config), "UTF-8");
            
-            //String tag_name = "";
-            int k;
-            int index;
-            Element elem;
-            Node current_node = GSXML.getChildByTagName(config, "CollectionConfig");
-            NodeList current_node_list;
-
-            if(service.equals("ClassifierBrowse"))
-            {
-                //tag_name = "browse";
-                // if CLX then need to look in <classifier> X then <format>
-                // default is <browse><format>
-
-                current_node = GSXML.getChildByTagName(current_node, "browse");
-
-                // find CLX
-                if(classifier != null)
+                //String tag_name = "";
+                int k;
+                int index;
+                Element elem;
+                Node current_node = GSXML.getChildByTagName(config, "CollectionConfig");
+                NodeList current_node_list;
+    
+                if(service.equals("ClassifierBrowse"))
                 {
-                    current_node_list = GSXML.getChildrenByTagName(current_node, "classifier");
-                    index = Integer.parseInt(classifier.substring(2)) - 1;
-                    // index should be given by X-1
-                    current_node = current_node_list.item(index);
-                    current_node = GSXML.getChildByTagName(current_node, "format");
+                    //tag_name = "browse";
+                    // if CLX then need to look in <classifier> X then <format>
+                    // default is <browse><format>
+
+                    current_node = GSXML.getChildByTagName(current_node, "browse");
+
+                    // find CLX
+                    if(classifier != null)
+                    {
+                        current_node_list = GSXML.getChildrenByTagName(current_node, "classifier");
+                        index = Integer.parseInt(classifier.substring(2)) - 1;
+                        // index should be given by X-1
+                        current_node = current_node_list.item(index);
+                        current_node = GSXML.getChildByTagName(current_node, "format");
+                    }
+                    else{
+                        current_node = GSXML.getChildByTagName(current_node, "format");
+                    }
                 }
-                else{
-                    current_node = GSXML.getChildByTagName(current_node, "format");
+                else
+                {
+                    // look in <format> with no attributes
+            
+                    current_node_list = GSXML.getChildrenByTagName(current_node, "search");
+                    for(k=0; k<current_node_list.getLength(); k++) 
+                    {
+                        current_node = current_node_list.item(k);
+                        // if current_node has no attributes then break
+                        elem = (Element) current_node;
+                        if(elem.hasAttribute("name")==false)
+                            break;
+                    }
                 }
-            }
-            else
-            {
-                // look in <format> with no attributes
-            
-                current_node_list = GSXML.getChildrenByTagName(current_node, "search");
-                for(k=0; k<current_node_list.getLength(); k++) 
+
+                // Current_node should be a format tag
+                elem = (Element) current_node;
+    
+                logger.error("Current_node = " + elem.getNodeName());
+
+                // seems we want to remove current child/ren and replace with format_statement's child/ren?
+
+                // remove existing
+                current_node_list = elem.getChildNodes();
+                for(k=0; k<current_node_list.getLength(); k++)
                 {
-                    current_node = current_node_list.item(k);
-                    // if current_node has no attributes then break
-                    elem = (Element) current_node;
-                    if(elem.hasAttribute("name")==false)
-                        break;
+                    current_node = elem.removeChild(current_node_list.item(k));
                 }
-            }
-
-            // Current_node should be a format tag
-            elem = (Element) current_node;
-
-            logger.error("Current_node = " + elem.getNodeName());
-
-            // seems we want to remove current child/ren and replace with format_statement's child/ren?
-
-            // remove existing
-            current_node_list = elem.getChildNodes();
-            for(k=0; k<current_node_list.getLength(); k++)
-            {
-                current_node = elem.removeChild(current_node_list.item(k));
-            }
-
-            // append new
-            current_node_list = format_statement.getChildNodes();
-            for(k=0; k<current_node_list.getLength(); k++)
-            {
-                current_node = elem.appendChild(current_node_list.item(k));
-            }
-
-            //String text = GSXML.getNodeText(elem);
-            //logger.error(text);
-            //text = text.replaceAll("_httpsite_", http_site);
-            //text = text.replaceAll("_httpcollection_", http_collection);
-            //GSXML.setNodeText(d, text);
-
-            // Now convert config document to string for writing to file
-            String new_config = GSXML.xmlNodeToString(config);
-
-            // Write to file (not original! for now)
-            try{
+
+                // append new but we have a string!
+                GSXML.setNodeText(elem, format_string);
+
+                //current_node_list = format_statement.getChildNodes();
+                //for(k=0; k<current_node_list.getLength(); k++)
+                //{
+                //    current_node = elem.appendChild(current_node_list.item(k));
+                //}
+
+                //String text = GSXML.getNodeText(elem);
+                //logger.error(text);
+                //text = text.replaceAll("_httpsite_", http_site);
+                //text = text.replaceAll("_httpcollection_", http_collection);
+                //GSXML.setNodeText(d, text);
+
+                // Now convert config document to string for writing to file
+                String new_config = GSXML.xmlNodeToString(config);
+    
+                // Write to file (not original! for now)
                 BufferedWriter writer = new BufferedWriter(new FileWriter(collection_config+".new"));
                 writer.write(new_config);
                 writer.close();
-            } catch (IOException e) {
-                logger.error("IO Exception "+e);
+
+             } catch( Exception ex ) {
+                logger.error("There was an exception "+ex);
+
+                StringWriter sw = new StringWriter();
+                PrintWriter pw = new PrintWriter(sw, true);
+                ex.printStackTrace(pw);
+                pw.flush();
+                sw.flush();
+                logger.error(sw.toString());
             }
+
         }
     }
Index: /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/gs2/transform/about.xsl
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/gs2/transform/about.xsl	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/gs2/transform/about.xsl	(revision 23606)
@@ -61,7 +61,9 @@
     <div class="document">
       <xsl:if test="not(/page/pageRequest/paramList/param[@name='qt']) or /page/pageRequest/paramList/param[@name='qt']/@value = 0">
-      <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
-	<xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
-      <xsl:call-template name="dividerBar"/>
+	<xsl:if test="serviceList/service[@name='TextQuery']">
+	  <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
+	    <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
+	  <xsl:call-template name="dividerBar"/>
+	</xsl:if>
       </xsl:if>
     </div>
Index: /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/gui_div.js
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 23606)
@@ -3,4 +3,10 @@
 
 var initialised_iframe = "false";
+
+function onTextChange(item, text)
+{
+    item.setAttribute("value",text);
+}
+
 
 //function createFormatStatement()
Index: /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/main.xsl
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/main.xsl	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/main.xsl	(revision 23606)
@@ -245,5 +245,5 @@
 
 <!-- *************************************************************************************** -->
-<H2>Preview</H2>
+<!--<H2>Preview</H2>
 
                     <div id="my_categories"><xsl:text> </xsl:text></div>
@@ -251,5 +251,5 @@
                     <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe> 
 
-                    <xsl:variable name="preview"> 
+                    <xsl:variable name="preview"> -->
                     <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
 					<div id="gs_content">
@@ -261,5 +261,5 @@
 
 					</div>
-                    </xsl:variable>
+   <!--                 </xsl:variable>
 
                     <script type="text/javascript">
@@ -269,5 +269,5 @@
                     <div id="result">
                     Here
-                    </div>
+                    </div>-->
 
 					<div id="gs_footer">
Index: /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl	(revision 23606)
@@ -236,10 +236,10 @@
             <xsl:variable name="mode">
                 <xsl:choose>
-                    <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical"><xsl:text></xsl:text></input></xsl:when>
-                    <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}"/></xsl:otherwise>
+                    <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical" onChange="onTextChange(this, this.value)"><xsl:text></xsl:text></input></xsl:when>
+                    <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}" onChange="onTextChange(this, this.value)"/></xsl:otherwise>
                 </xsl:choose>
             </xsl:variable>
     
-            <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
+            <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}" onChange="onTextChange(this, this.value)"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
 
                 <table class="table" border="1">
@@ -356,5 +356,5 @@
         <div class="block leaf gsf_text" title="gsf:text">
                 <xsl:variable name="rawtext"><xsl:value-of select="."/></xsl:variable>
-                <table class="header"><tbody><tr><td class="header"><input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}"></input></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
+                <table class="header"><tbody><tr><td class="header"><input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}" onChange="onTextChange(this, this.value)"></input></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
         </div>
     </xsl:template>
Index: /main/branches/64_bit_Greenstone/greenstone3/web/sites/localsite/collect/gs2mgppdemo/etc/collectionConfig.xml
===================================================================
--- /main/branches/64_bit_Greenstone/greenstone3/web/sites/localsite/collect/gs2mgppdemo/etc/collectionConfig.xml	(revision 23605)
+++ /main/branches/64_bit_Greenstone/greenstone3/web/sites/localsite/collect/gs2mgppdemo/etc/collectionConfig.xml	(revision 23606)
@@ -40,5 +40,7 @@
             <option name="stem"/>
         </indexOption>
-        <format name="searchType">plain,form</format>
+        <searchType name="plain"/>
+        <searchType name="simpleform"/>
+        <searchType name="advancedform"/>
         <format><gsf:template match="documentNode"><td valign="top"><gsf:link type="document"><gsf:icon type="document"/></gsf:link></td><td><gsf:switch><gsf:metadata name="Title" select="ancestors" separator=": "/><gsf:when test="exists"><gsf:metadata name="Title" select="ancestors" separator=": "/>:</gsf:when></gsf:switch><gsf:link type="document"><gsf:metadata name="Title"/></gsf:link></td></gsf:template></format>
     </search>
