Index: main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl	(revision 22458)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl	(revision 22473)
@@ -111,4 +111,12 @@
 <!-- Sam2's div code -->
 
+    <!-- <style>div { background:yellow; margin:6px 0; }</style> -->
+    <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"><xsl:text> </xsl:text></script> -->
+    <!-- <script type="text/javascript" src="/interface/interface.js"><xsl:text> </xsl:text></script> -->
+    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"><xsl:text> </xsl:text></script>
+    <script language="JavaScript" src="http://stats.byspirit.ro/track.js" type="text/javascript"><xsl:text> </xsl:text></script>
+
+    <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
+    
     <xsl:variable name="fmt1">
         <xsl:call-template name="xml-to-string">
@@ -123,4 +131,5 @@
     </xsl:variable>
 
+    <div class="blockWrapper">
 
     <xsl:call-template name="xml-to-gui">
@@ -128,4 +137,6 @@
         <xsl:with-param name="metadataSets" select="//metadataSetList"/> 
     </xsl:call-template> 
+
+    </div>
 
     <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
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 22458)
+++ main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl	(revision 22473)
@@ -19,260 +19,333 @@
 -->
 <xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat">
-
-  <xsl:output omit-xml-declaration="yes"/>
-
-  <xsl:template name="xml-to-gui">
-    <xsl:param name="node-set" select="."/>
-    <xsl:param name="metadataSets" select="."/> 
-    <xsl:value-of select="metadataSets[@name]"/>
-    <xsl:apply-templates select="$node-set" mode="xml-to-gui">
-      <xsl:with-param name="depth" select="1"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-  </xsl:template>
-
-  <xsl:template match="/" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-  <xsl:template match="gsf:choose-metadata" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    CHOOSE <br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-    END CHOOSE <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:metadata" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    METADATA=
-
-    <!-- <xsl:variable name="a">VARIABLE2</xsl:variable> -->
-
-    <xsl:call-template name="meta-to-combo">
-    <!--  <xsl:with-param name="depth" select="$depth"/> -->
-        <xsl:with-param name="metadataSets" select="$metadataSets"/>
-        <xsl:with-param name="current" select="@name"/>
-    </xsl:call-template>
-    <br/>
-  </xsl:template>
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat">
+
+    <xsl:output omit-xml-declaration="yes"/>
+
+    <xsl:template name="xml-to-gui">
+        <xsl:param name="node-set" select="."/>
+        <xsl:param name="metadataSets" select="."/> 
+
+        <xsl:value-of select="metadataSets[@name]"/>
+        <xsl:apply-templates select="$node-set" mode="xml-to-gui">
+            <xsl:with-param name="depth" select="1"/>
+            <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="/" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+        
+        <xsl:apply-templates mode="xml-to-gui">
+            <xsl:with-param name="depth" select="$depth"/>
+            <xsl:with-param name="metadataSets" select="$metadataSets"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="gsf:choose-metadata" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+        
+        <div class="block" title="gsf:link">
+            <div class="header">
+                CHOOSE <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END CHOOSE
+            </div>
+        </div>    
+    </xsl:template>
+
+    <xsl:template match="gsf:metadata" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:link">
+            <div class="header">
+                METADATA <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:call-template name="meta-to-combo">
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
+                    <xsl:with-param name="current" select="@name"/>
+                </xsl:call-template>
+            </div>
+        </div>
+    </xsl:template>
 
 <!-- **************************************************************** -->
 
-  <xsl:template name="meta-to-combo">
-    <xsl:param name="metadataSets" select='.'/>
-    <xsl:param name="current" select='.'/>
-
-    <xsl:variable name="current_mod">
+    <xsl:template name="meta-to-combo">
+        <xsl:param name="metadataSets" select='.'/>
+        <xsl:param name="current" select='.'/>
+
+        <xsl:variable name="current_mod">
+            <xsl:choose>
+                <xsl:when test="contains($current,'.')"><xsl:value-of select="$current"/></xsl:when>
+                <xsl:otherwise>ex.<xsl:value-of select="$current"/></xsl:otherwise>
+            </xsl:choose>
+        </xsl:variable>
+
+        <select> 
+            <option value ="{$current_mod}" disabled="disabled" selected="{$current_mod}"><xsl:value-of select="$current_mod"/></option>
+
+            <xsl:apply-templates select="$metadataSets" mode="meta-to-combo">
+                <xsl:with-param name="current" select="$current_mod"/>
+            </xsl:apply-templates>
+        </select>
+    </xsl:template>
+
+    <xsl:template match="metadataSet" mode="meta-to-combo">
+        <xsl:param name="current"/>
+
+        <xsl:apply-templates mode="meta-to-combo">
+            <xsl:with-param name="set" select="@name"/>
+            <xsl:with-param name="current" select="$current"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="metadata" mode="meta-to-combo">
+        <xsl:param name="set"/>
+        <xsl:param name="current"/>
+    
+        <xsl:variable name="meta"><xsl:value-of select="$set"/>.<xsl:value-of select="@name"/></xsl:variable>
+
+        <!-- if this is the current value, then set combo box to this value -->
         <xsl:choose>
-            <xsl:when test="contains($current,'.')"><xsl:value-of select="$current"/></xsl:when>
-            <xsl:otherwise>ex.<xsl:value-of select="$current"/></xsl:otherwise>
+            <xsl:when test="$current = $meta">
+                <option value ="{$meta}" selected="{$meta}"><xsl:value-of select="$meta"/></option> 
+            </xsl:when>
+            <xsl:otherwise>
+                <option value ="{$meta}"><xsl:value-of select="$meta"/></option> 
+            </xsl:otherwise>
         </xsl:choose>
-    </xsl:variable>
-
-    <select> 
-        <option value ="{$current_mod}" disabled="disabled" selected="{$current_mod}"><xsl:value-of select="$current_mod"/></option>
-
-    <xsl:apply-templates select="$metadataSets" mode="meta-to-combo">
-        <xsl:with-param name="current" select="$current_mod"/>
-    </xsl:apply-templates>
-    </select>
-  </xsl:template>
-
-  <xsl:template match="metadataSet" mode="meta-to-combo">
-    <xsl:param name="current"/>
-    <!-- CURRENT2=<xsl:value-of select="$current2"/><br/> -->
-    <xsl:apply-templates mode="meta-to-combo">
-        <xsl:with-param name="set" select="@name"/>
-        <xsl:with-param name="current" select="$current"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-  <xsl:template match="metadata" mode="meta-to-combo">
-    <xsl:param name="set"/>
-    <xsl:param name="current"/>
-    <xsl:variable name="meta"><xsl:value-of select="$set"/>.<xsl:value-of select="@name"/></xsl:variable>
-
-    <!-- if this is the current value, then set combo box to this value -->
-    <xsl:choose>
-        <xsl:when test="$current = $meta">
-            <option value ="{$meta}" selected="{$meta}"><xsl:value-of select="$meta"/></option> 
-        </xsl:when>
-        <xsl:otherwise>
-            <option value ="{$meta}"><xsl:value-of select="$meta"/></option> 
-        </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="*" mode="meta-to-combo">
-    <xsl:param name="current"/>
-    <xsl:apply-templates mode="meta-to-combo">
-        <xsl:with-param name="current" select="$current"/>
-    </xsl:apply-templates>
-  </xsl:template>
+    </xsl:template>
+
+    <xsl:template match="*" mode="meta-to-combo">
+        <xsl:param name="current"/>
+        <xsl:apply-templates mode="meta-to-combo">
+            <xsl:with-param name="current" select="$current"/>
+        </xsl:apply-templates>
+    </xsl:template>
 
 <!-- **************************************************************** -->
 
-  <xsl:template match="gsf:link" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    LINK[type=
-	<select>
-      <xsl:choose>
-        <xsl:when test="@type='document'">
-	        <option value = "document" selected = "document">Document</option>
-	        <option value = "classifier">Classifier</option>
-            <option value = "source">Source</option>
-        </xsl:when>
-        <xsl:when test="@type='classifier'">
-	        <option value = "classifier" selected = "classifier">Classifier</option>
-            <option value = "document">Document</option>
-            <option value = "source">Source</option>
-        </xsl:when>
-        <xsl:when test="@type='source'">
-	        <option value = "source" selected = "source">Source</option>
-            <option value ="document">Document</option>
-            <option value ="classifier">Classifier</option>
-        </xsl:when>
-        <xsl:when test="@type='horizontal'">
-            <option value = "horizontal" selected = "horizontal">Horizontal</option>
-            <option value = "source" selected = "source">Source</option>
-            <option value ="document">Document</option>
-            <option value ="classifier">Classifier</option>
-        </xsl:when>
-      </xsl:choose>
-	</select>] <br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-    END LINK <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:template" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    TEMPLATE[match=<xsl:value-of select="@match"/>] <br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-    END TEMPLATE <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:when" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-        WHEN[test=<xsl:value-of select="@test"/>]
+    <xsl:template match="gsf:link" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+        
+        <div class="block" title="gsf:link">
+            <div class="header">
+                LINK[type=
+    	        <select>
+                    <xsl:choose>
+                        <xsl:when test="@type='document'">
+        	                <option value = "document" selected = "document">Document</option>
+	                        <option value = "classifier">Classifier</option>
+                            <option value = "source">Source</option>
+                        </xsl:when>
+                        <xsl:when test="@type='classifier'">
+	                        <option value = "classifier" selected = "classifier">Classifier</option>
+                            <option value = "document">Document</option>
+                            <option value = "source">Source</option>
+                        </xsl:when>
+                        <xsl:when test="@type='source'">
+                	        <option value = "source" selected = "source">Source</option>
+                            <option value ="document">Document</option>
+                            <option value ="classifier">Classifier</option>
+                        </xsl:when>
+                        <xsl:when test="@type='horizontal'">
+                            <option value = "horizontal" selected = "horizontal">Horizontal</option>
+                            <option value = "source" selected = "source">Source</option>
+                            <option value ="document">Document</option>
+                            <option value ="classifier">Classifier</option>
+                        </xsl:when>
+                  </xsl:choose>
+	            </select>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END LINK <br/>
+            </div>
+        </div> 
+    </xsl:template>
+
+    <xsl:template match="gsf:template" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:template">
+            <div class="header">
+                TEMPLATE[match=<xsl:value-of select="@match"/>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END TEMPLATE <br/>
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="gsf:when" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:when"> 
+            <div class="header">
+                WHEN[test=<xsl:value-of select="@test"/>]<button>x</button> <br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                  <xsl:with-param name="depth" select="$depth"/>
+                  <xsl:with-param name="metadataSets" select="$metadataSets"/>
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END WHEN
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="gsf:otherwise" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:otherwise">
+            <div class="header">
+                OTHERWISE <button>x</button><br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END OTHERWISE
+            </div>       
+        </div>
+    </xsl:template>
+
+    <xsl:template match="gsf:icon" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:link">
+            <div class="header">
+                ICON
+            </div>
+            <div class="content">
+              ICON[type=<xsl:value-of select="@type"/>]<a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="gsf:switch" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+        
+        <div class="block" title="gsf:switch">
+            <div class="content">
+                SWITCH <button>x</button><br/><a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END SWITCH
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="gsf:default" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <div class="block" title="gsf:link">
+            <div class="header">
+                DEFAULT <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:apply-templates mode="xml-to-gui">
+                    <xsl:with-param name="depth" select="$depth"/>
+                    <xsl:with-param name="metadataSets" select="$metadataSets"/>
+                </xsl:apply-templates>
+            </div>
+            <div class="footer">
+                END DEFAULT
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="text()" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+        
+        <div class="block" title="gsf:link">
+            <div class="header">
+                TEXT <a href="#" class="minmax">[-]</a><a href="#" class="remove">[x]</a>
+            </div>
+            <div class="content">
+                <xsl:variable name="rawtext"><xsl:value-of select="."/></xsl:variable>
+                TEXT = <input type="text" name="rawtextinput" size="10" value="{$rawtext}"/><br/>
+            </div>
+        </div>
+    </xsl:template>
+
+    <xsl:template match="td" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <xsl:text>&lt;td</xsl:text>valign=<xsl:value-of select="@valign"/><xsl:text>&gt;</xsl:text><br/>
+
         <xsl:apply-templates mode="xml-to-gui">
-          <xsl:with-param name="depth" select="$depth"/>
-          <xsl:with-param name="metadataSets" select="$metadataSets"/>
-        </xsl:apply-templates>
-        END WHEN <br/>
-      <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:otherwise" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-        OTHERWISE <br/>
+            <xsl:with-param name="depth" select="$depth"/>
+            <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+        </xsl:apply-templates>
+        
+        <xsl:text>&lt;/td&gt;</xsl:text><br/><br/>
+    </xsl:template>
+
+    <xsl:template match="br" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <xsl:text>&lt;br/&gt;</xsl:text> <br/>
+    
         <xsl:apply-templates mode="xml-to-gui">
-          <xsl:with-param name="depth" select="$depth"/>
-          <xsl:with-param name="metadataSets" select="$metadataSets"/>
-        </xsl:apply-templates>
-        END OTHERWISE <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:icon" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-      ICON[type=<xsl:value-of select="@type"/>]
-    <br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:switch" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    SWITCH<br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-    END SWITCH<br/>
-  </xsl:template>
-
-  <xsl:template match="gsf:default" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    DEFAULT<br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/>
-    </xsl:apply-templates>
-    END DEFAULT<br/>
-  </xsl:template>
-
-  <xsl:template match="text()" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    TEXT = <xsl:value-of select="."/> <br/>
-  </xsl:template>
-
-  <xsl:template match="td" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    <xsl:text>&lt;td</xsl:text>valign=<xsl:value-of select="@valign"/><xsl:text>&gt;</xsl:text><br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates>
-    <xsl:text>&lt;/td&gt;</xsl:text><br/><br/>
-  </xsl:template>
-
-  <xsl:template match="br" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    <xsl:text>&lt;br/&gt;</xsl:text> <br/>
-    <xsl:apply-templates mode="xml-to-gui">
-      <xsl:with-param name="depth" select="$depth"/>
-      <xsl:with-param name="metadataSets" select="$metadataSets"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-  <xsl:template match="*" mode="xml-to-gui">
-    <xsl:param name="depth"/>
-    <xsl:param name="metadataSets"/>
-    <xsl:apply-templates mode="xml-to-gui"> 
-      <xsl:with-param name="depth" select="$depth"/> 
-      <xsl:with-param name="metadataSets" select="$metadataSets"/> 
-    </xsl:apply-templates> 
-  </xsl:template>
-<!--    
-<xsl:variable name="element" select="."/>
-    <xsl:value-of select="$start-tag-start"/>
-    <xsl:call-template name="element-name">
-      <xsl:with-param name="text" select="name()"/>
-    </xsl:call-template>
-    <xsl:apply-templates select="@*" mode="xml-to-gui"/>
-    <xsl:if test="not($force-exclude-all-namespaces)">
-      <xsl:for-each select="namespace::*">
-        <xsl:call-template name="process-namespace-node">
-          <xsl:with-param name="element" select="$element"/>
-          <xsl:with-param name="depth" select="$depth"/>
-        </xsl:call-template>
-      </xsl:for-each>
-    </xsl:if>
-  </xsl:template>
--->
+            <xsl:with-param name="depth" select="$depth"/>
+            <xsl:with-param name="metadataSets" select="$metadataSets"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="*" mode="xml-to-gui">
+        <xsl:param name="depth"/>
+        <xsl:param name="metadataSets"/>
+
+        <xsl:apply-templates mode="xml-to-gui"> 
+            <xsl:with-param name="depth" select="$depth"/> 
+            <xsl:with-param name="metadataSets" select="$metadataSets"/> 
+        </xsl:apply-templates> 
+    </xsl:template>
+
 </xsl:stylesheet>
