Index: /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java
===================================================================
--- /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java	(revision 23339)
+++ /main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java	(revision 23340)
@@ -18,4 +18,10 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 
+import java.io.*;
+import org.xml.sax.*;
+import javax.xml.parsers.SAXParserFactory; 
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -26,4 +32,6 @@
     
       static Logger logger = Logger.getLogger(org.greenstone.gsdl3.action.SystemAction.class.getName());
+
+    String tempVal = "";
 
     /** process a request */
@@ -68,4 +76,11 @@
          String format_string = (String)params.get("data");
          logger.error("data="+format_string);
+
+         //SamParser sam = new SamParser();
+         //String format_statement = sam.parse(input);
+         //logger.error("format string="+format_statement);
+    
+        Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM);
+
          Iterator it = params.keySet().iterator();
          while(it.hasNext())
@@ -73,13 +88,19 @@
             logger.error("Param: "+it.next());
          }	
-        Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM);
-
+
+        //Node text = this.doc.createTextNode(format_string);
+        //page_response.appendChild(text);
+    
+        
         try {
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             DocumentBuilder builder = factory.newDocumentBuilder();
-            String input = "<html><head><title></title></head><body>" + format_string + "</body></html>";
+            //String input = "<html><head><title></title></head><body>" + format_string + "</body></html>";
+            String input = format_string;
             InputSource is = new InputSource( new StringReader( input ) );
             Document d = builder.parse( is );
-            page_response.appendChild(d);
+            Element e = d.getDocumentElement();
+            
+            page_response.appendChild(this.doc.importNode(e, true));
         }
         catch( Exception ex ) {
@@ -93,5 +114,6 @@
             logger.error(sw.toString());
         }
-
+        
+    
         //Element child = this.doc.createElement("div"); //format_string);
         //Node text = this.doc.createTextNode(format_string); //"<h1>Hi there and greetings!</h1>");
@@ -131,3 +153,63 @@
     }
 
+    /*
+    public void parse (String message) {
+        //get a factory
+        SAXParserFactory spf = SAXParserFactory.newInstance();
+        try {
+
+            //get a new instance of parser
+            SAXParser sp = spf.newSAXParser();
+            InputSource is = new InputSource( new StringReader( message ) );
+            //parse the file and also register this class for call backs
+            sp.parse(is, new SamParser());
+
+        }catch(SAXException se) {
+            se.printStackTrace();
+        }catch(ParserConfigurationException pce) {
+            pce.printStackTrace();
+        }catch (IOException ie) {
+            ie.printStackTrace();
+        }
+    }
+    */
+
+    //Event Handlers
+/*    public void startElement(String uri, String localName, String qName,
+        Attributes attributes) throws SAXException {
+        //reset
+        logger.error("Start Element: "+qName);
+        //if(qName.equalsIgnoreCase("Template")) {
+            //create a new instance of employee
+            //tempEmp = new Employee();
+            //tempEmp.setType(attributes.getValue("type"));
+            
+        //}
+    }
+
+
+    public void characters(char[] ch, int start, int length) throws SAXException {
+        tempVal = new String(ch,start,length);
+    }
+
+    public void endElement(String uri, String localName,
+        String qName) throws SAXException {
+
+        logger.error("Characters: "+tempVal);
+        logger.error("End Element: "+qName);
+        /*
+        if(qName.equalsIgnoreCase("Employee")) {
+            //add it to the list
+            myEmpls.add(tempEmp);
+
+        }else if (qName.equalsIgnoreCase("Name")) {
+            tempEmp.setName(tempVal);
+        }else if (qName.equalsIgnoreCase("Id")) {
+            tempEmp.setId(Integer.parseInt(tempVal));
+        }else if (qName.equalsIgnoreCase("Age")) {
+            tempEmp.setAge(Integer.parseInt(tempVal));
+        } */
+
+    //}
+
 }
Index: /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 23339)
+++ /main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 23340)
@@ -9,5 +9,5 @@
     var formatDiv = document.getElementById('formatStatement');
     var formatStatement = innerXHTML(formatDiv);
-    console.log(formatStatement);
+    //console.log(formatStatement);
 
 
Index: /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl	(revision 23339)
+++ /main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl	(revision 23340)
@@ -128,5 +128,5 @@
         <xsl:choose>
             <xsl:when test="$current = $meta">
-                <xsl:text disable-output-escaping="yes">&lt;option value="</xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes">" selected&gt;</xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes">&lt;/option&gt;</xsl:text>
+                <xsl:text disable-output-escaping="yes">&lt;option value="</xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes">" selected="selected"&gt;</xsl:text><xsl:value-of select="$meta"/><xsl:text disable-output-escaping="yes">&lt;/option&gt;</xsl:text>
                 <!-- <option value ="{$meta}" selected="selected"><xsl:value-of select="$meta"/></option> -->
             </xsl:when>
