Index: deprecated/ui/.project
===================================================================
--- deprecated/ui/.project	(revision 25695)
+++ deprecated/ui/.project	(revision 25695)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>gsdl3_skinning</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: deprecated/ui/skins/classic/home.xsl
===================================================================
--- deprecated/ui/skins/classic/home.xsl	(revision 25695)
+++ deprecated/ui/skins/classic/home.xsl	(revision 25695)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html"/>  
+
+<xsl:template match="/">
+ <html>
+  <head>
+    <title>
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">siteName</xsl:with-param>
+     </xsl:call-template>
+    </title>
+    <link rel="stylesheet" href="/css/style.css" type="text/css">
+  </head>
+  <body>
+   <h1> 
+    <xsl:call-template name="metadataItem">
+     <xsl:with-param name="name">siteName</xsl:with-param>
+    </xsl:call-template>
+   </h1>
+
+   <xsl:call-template name="metadataItem">
+    <xsl:with-param name="name">siteDescription</xsl:with-param>
+   </xsl:call-template>
+
+   <h2>Collections:</h2>
+   <ul>
+    <xsl:for-each select="/page/pageResponse/collectionList/collection">
+     <li> <em> <xsl:value-of select="displayItem[@name='name']"/> </em> </li>
+    </xsl:for-each>
+   </ul>
+
+   <xsl:call-template name="uiItem">
+    <xsl:with-param name="name">footer</xsl:with-param>
+   </xsl:call-template>
+
+  </body>
+ </html>
+</xsl:template>
+
+
+
+
+
+
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x">
+   <xsl:value-of select="/page/pageResponse/metadataList/metadataItem[@name=$name]"/>
+  </xsl:variable>
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$x"/>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x">
+   <xsl:value-of select="/page/pageResponse/uiItemList/uiItem[@name=$name]"/>
+  </xsl:variable>
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$x"/>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/classic/page.xml
===================================================================
--- deprecated/ui/skins/classic/page.xml	(revision 25695)
+++ deprecated/ui/skins/classic/page.xml	(revision 25695)
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="home.xsl"?>
+ 
+<page lang="en" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/gsf">
+  <pageRequest action="p" lang="en" output="html" subaction="home" to="" type="page" uid="1" />
+  <pageResponse from="" type="describe">
+    <collectionList>
+      <collection name="gs2mgppdemo">
+        <displayItem assigned="true" lang="en" name="description">This is a demonstration collection for the Greenstone3 digital library software. It contains a small subset (11 books) of the Humanitarian and Development Libraries. It is a Greenstone2 collection, built with MGPP, which provides form based searching. The Greenstone2 configuration files have been converted to Greenstone3 equivalents, enabling it to be served using Greenstone3.</displayItem>
+
+        <displayItem assigned="true" lang="en" name="smallicon">gs2mgppdemo_sm.gif</displayItem>
+
+        <displayItem assigned="true" lang="en" name="icon">gs2mgppdemo.gif</displayItem>
+
+        <displayItem assigned="true" lang="en" name="name">Greenstone2 MGPP demo collection</displayItem>
+
+        <serviceList>
+          <service name="Identify" />
+          <service name="ListRecords" />
+          <service name="ListIdentifiers" />
+
+          <service name="ListSets" />
+          <service name="ListMetadataFormats" />
+          <service name="GetRecord" />
+          <service name="TextQuery" type="query" />
+          <service name="FieldQuery" type="query" />
+          <service name="AdvancedFieldQuery" type="query" />
+          <service name="DocumentStructureRetrieve" type="retrieve" />
+          <service name="DocumentMetadataRetrieve" type="retrieve" />
+          <service name="DocumentContentRetrieve" type="retrieve" />
+
+          <service name="ClassifierBrowse" type="browse" />
+          <service name="ClassifierBrowseMetadataRetrieve" type="retrieve" /></serviceList>
+
+        <metadataList>
+          <metadata lang="en" name="creator">greenstone@cs.waikato.ac.nz</metadata>
+
+          <metadata lang="en" name="maintainer" />
+          <metadata lang="en" name="public">true</metadata>
+
+          <metadata name="numDocs">11</metadata>
+
+          <metadata name="buildType">mgpp</metadata>
+
+          <metadata name="httpPath">http://localhost:8080/greenstone3/sites/localsite/collect/gs2mgppdemo</metadata>
+
+          <metadata name="tidyoption">untidy</metadata>
+        </metadataList>
+
+        <pluginList>
+          <plugin name="GAPlug" />
+          <plugin name="HTMLPlug">
+                <option name="-description_tags" />
+            </plugin>
+
+          <plugin name="MetadataXMLPlug" />
+          <plugin name="ArcPlug" />
+          <plugin name="RecPlug" /></pluginList>
+
+      </collection>
+    </collectionList>
+
+    <serviceClusterList />
+    <siteList />
+    <serviceList>
+      <service name="AddItem" type="gather" />
+      <service name="DisplayList" type="gather" />
+      <service name="ItemNum" type="gather" />
+
+      <service name="DeleteItems" type="gather" />
+      <service name="DeleteItem" type="gather" />
+      <service name="SendMail" type="gather" />
+      <service name="TextQuery" type="query">
+        <displayItem name="name">Cross collection search</displayItem>
+
+        <displayItem name="submit">Search</displayItem>
+
+        <displayItem name="description">Search over multiple collections</displayItem>
+
+        <paramList>
+          <param default="all" name="collection" type="enum_multi">
+            <displayItem name="name">Collections to search in</displayItem>
+
+            <option name="all">
+              <displayItem name="name">All collections</displayItem>
+            </option>
+
+            <option name="gs2mgppdemo">
+              <displayItem name="name">gs2mgppdemo: Greenstone2 MGPP demo collection</displayItem>
+            </option>
+          </param>
+
+          <param name="query" type="string">
+            <displayItem name="name">Query string</displayItem>
+          </param>
+
+        </paramList>
+      </service>
+
+      <service name="DocumentMetadataRetrieve" type="retrieve" /></serviceList>
+
+    <uiItemList>
+      <uiItem lang="en" name="footer">
+	Powered by Greenstone
+    </uiItem>
+    </uiItemList>
+
+    <metadataList>
+      <metadataItem lang="en" name="siteDescription"> 
+	This is just a random site for testing stuff
+  </metadataItem>
+
+      <metadataItem name="siteAdmin"> dnk2@cs.waikato.ac.nz </metadataItem>
+
+      <metadataItem lang="en" name="siteName">Dave&apos;s Development Site</metadataItem>
+
+    </metadataList>
+
+    <Skin skinLocation="/research/dnk2/greenstone/greenstone3/web/skins/classic" /></pageResponse>
+</page>
+
Index: deprecated/ui/skins/classic/skin.xml
===================================================================
--- deprecated/ui/skins/classic/skin.xml	(revision 25695)
+++ deprecated/ui/skins/classic/skin.xml	(revision 25695)
@@ -0,0 +1,4 @@
+<skin name="default">
+ 
+
+</skin>
Index: deprecated/ui/skins/default/skin.xml
===================================================================
--- deprecated/ui/skins/default/skin.xml	(revision 25695)
+++ deprecated/ui/skins/default/skin.xml	(revision 25695)
@@ -0,0 +1,4 @@
+<skin name="default">
+ 
+
+</skin>
Index: deprecated/ui/skins/mediaWikish/css/style.css
===================================================================
--- deprecated/ui/skins/mediaWikish/css/style.css	(revision 25695)
+++ deprecated/ui/skins/mediaWikish/css/style.css	(revision 25695)
@@ -0,0 +1,66 @@
+ 
+body {
+
+ background-color: rgb(95,110, 140);
+
+ 
+ font: x-small sans-serif;
+ text-align: justify ;
+ font-size: 90%;
+}
+
+#mainContentArea {
+ text-align: justify;
+ border: solid rgb(15,50,100);
+ border-width: 1px;
+ width:652px;
+ margin:auto;
+ padding: 10px ;
+ background-color: rgb(255,255,255);
+ }
+
+#footer {
+
+ border: 1px solid rgb(15,50,100);
+ border-top-width: 0px ;
+ width:672px;
+ bottom: 0px ;
+ background-color: rgb(195,220,245) ;
+ margin:auto;
+ text-align: center ;
+
+}
+
+
+p {
+	margin: .4em 0 .5em 0;
+	margin-left: 2em ;
+	line-height: 1.5em;
+}
+
+h1, h2, h3{
+	color: black;
+	background: none;
+	font-weight: normal;
+	margin: 0;
+	margin-top: .5em;
+	padding-bottom: .17em;
+	border-bottom: 1px solid rgb(15,50,100);
+	margin-bottom: 0.5em ;
+}
+
+h1 { font-size: 170%; }
+h2 { font-size: 150%; }
+h3 { font-size: 125%; }
+
+h4 {
+	font-size: 120%;
+	color: black;
+	background: none;
+	font-weight: normal;
+	margin: 0;
+	padding-top: .5em;
+	padding-bottom: .17em;
+	border-bottom: 1px solid #aaa;
+	margin-bottom: 0.5em ;
+}
Index: deprecated/ui/skins/mediaWikish/page.xml
===================================================================
--- deprecated/ui/skins/mediaWikish/page.xml	(revision 25695)
+++ deprecated/ui/skins/mediaWikish/page.xml	(revision 25695)
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="xsl/home.xsl"?>
+ 
+<page lang="en">
+  <pageRequest action="p" lang="en" output="xml" subaction="home" to="" type="page" uid="1" />
+  <pageResponse from="" type="describe">
+    <collectionList>
+      <collection name="gs2mgppdemo">
+        <displayItem assigned="true" lang="en" name="description">This is a demonstration collection for the Greenstone3 digital library software. It contains a small subset (11 books) of the Humanitarian and Development Libraries. It is a Greenstone2 collection, built with MGPP, which provides form based searching. The Greenstone2 configuration files have been converted to Greenstone3 equivalents, enabling it to be served using Greenstone3.</displayItem>
+
+        <displayItem assigned="true" lang="en" name="smallicon">gs2mgppdemo_sm.gif</displayItem>
+
+        <displayItem assigned="true" lang="en" name="icon">gs2mgppdemo.gif</displayItem>
+
+        <displayItem assigned="true" lang="en" name="name">Greenstone2 MGPP demo collection</displayItem>
+
+        <serviceList>
+          <service name="Identify" />
+          <service name="ListRecords" />
+          <service name="ListIdentifiers" />
+
+          <service name="ListSets" />
+          <service name="ListMetadataFormats" />
+          <service name="GetRecord" />
+          <service name="TextQuery" type="query" />
+          <service name="FieldQuery" type="query" />
+          <service name="AdvancedFieldQuery" type="query" />
+          <service name="DocumentStructureRetrieve" type="retrieve" />
+          <service name="DocumentMetadataRetrieve" type="retrieve" />
+          <service name="DocumentContentRetrieve" type="retrieve" />
+
+          <service name="ClassifierBrowse" type="browse" />
+          <service name="ClassifierBrowseMetadataRetrieve" type="retrieve" /></serviceList>
+
+        <metadataList>
+          <metadata lang="en" name="creator">greenstone@cs.waikato.ac.nz</metadata>
+
+          <metadata lang="en" name="maintainer" />
+          <metadata lang="en" name="public">true</metadata>
+
+          <metadata name="numDocs">11</metadata>
+
+          <metadata name="buildType">mgpp</metadata>
+
+          <metadata name="httpPath">http://localhost:8080/greenstone3/sites/localsite/collect/gs2mgppdemo</metadata>
+
+          <metadata name="tidyoption">untidy</metadata>
+        </metadataList>
+
+        <pluginList>
+          <plugin name="GAPlug" />
+          <plugin name="HTMLPlug">
+                <option name="-description_tags" />
+            </plugin>
+
+          <plugin name="MetadataXMLPlug" />
+          <plugin name="ArcPlug" />
+          <plugin name="RecPlug" /></pluginList>
+
+      </collection>
+    </collectionList>
+
+    <serviceClusterList />
+    <siteList />
+    <serviceList>
+      <service name="AddItem" type="gather" />
+      <service name="DisplayList" type="gather" />
+      <service name="ItemNum" type="gather" />
+
+      <service name="DeleteItems" type="gather" />
+      <service name="DeleteItem" type="gather" />
+      <service name="SendMail" type="gather" />
+      <service name="TextQuery" type="query">
+        <displayItem name="name">Cross collection search</displayItem>
+
+        <displayItem name="submit">Search</displayItem>
+
+        <displayItem name="description">Search over multiple collections</displayItem>
+
+        <paramList>
+          <param default="all" name="collection" type="enum_multi">
+            <displayItem name="name">Collections to search in</displayItem>
+
+            <option name="all">
+              <displayItem name="name">All collections</displayItem>
+            </option>
+
+            <option name="gs2mgppdemo">
+              <displayItem name="name">gs2mgppdemo: Greenstone2 MGPP demo collection</displayItem>
+            </option>
+          </param>
+
+          <param name="query" type="string">
+            <displayItem name="name">Query string</displayItem>
+          </param>
+
+        </paramList>
+      </service>
+
+      <service name="DocumentMetadataRetrieve" type="retrieve" /></serviceList>
+
+    <cssFileList>
+      <cssFile path="/research/dnk2/greenstone/greenstone3/web/skins/mediaWikish/css/style.css" /></cssFileList>
+
+    <uiItemList>
+      <uiItem lang="en" name="footer">
+
+	Powered by Greenstone
+    </uiItem>
+    </uiItemList>
+
+    <metadataList>
+      <metadataItem lang="en" name="siteDescription"> 
+	This is just a random site for testing stuff
+  </metadataItem>
+
+      <metadataItem name="siteAdmin"> dnk2@cs.waikato.ac.nz </metadataItem>
+
+      <metadataItem lang="en" name="siteName">Dave&apos;s Development Site</metadataItem>
+    </metadataList>
+  </pageResponse>
+</page>
+
+
Index: deprecated/ui/skins/mediaWikish/skin.xml
===================================================================
--- deprecated/ui/skins/mediaWikish/skin.xml	(revision 25695)
+++ deprecated/ui/skins/mediaWikish/skin.xml	(revision 25695)
@@ -0,0 +1,18 @@
+<skin name="oran">
+ <actionList>
+    <action name='p' class='PageAction'>
+      <subaction name='home' xslt='siteHome.xsl'/>
+      <subaction name='about' xslt='collectHome.xsl'/>
+      <subaction name='help' xslt='blah.xsl'/>
+      <subaction name='pref' xslt='blah.xsl'/>
+      <subaction name='nav' xslt='blah.xsl'/>
+      <subaction name="html" xslt="blah.xsl"/>
+    </action>
+    <action name='q' class='QueryAction' xslt='search.xsl'/>
+    <action name='b' class='GS2BrowseAction' xslt='blah.xsl'/>
+    <action name='a' class='AppletAction' xslt='blah.xsl'/>
+    <action name='d' class='DocumentAction' xslt='blah.xsl'/>
+    <action name='pr' class='ProcessAction' xslt='blah.xsl'/>
+    <action name='s' class='SystemAction' xslt='blah.xsl'/>
+  </actionList>
+</skin>
Index: deprecated/ui/skins/mediaWikish/xsl/collecthome.xsl
===================================================================
--- deprecated/ui/skins/mediaWikish/xsl/collecthome.xsl	(revision 25695)
+++ deprecated/ui/skins/mediaWikish/xsl/collecthome.xsl	(revision 25695)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:output method="html"/>  
+
+<xsl:template match="/">
+ <html>
+  <head>
+    <title>
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">siteName</xsl:with-param>
+     </xsl:call-template>
+	/
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">collectionName</xsl:with-param>
+     </xsl:call-template>
+    </title>
+
+    <xsl:call-template name="cssInclude"/>
+  </head>
+  <body>
+   <div id="mainContentArea">
+
+    <div id="header">
+     <div class="title_minor">
+
+      <a href="{$library}?a=p&amp;sa=home">
+       <xsl:call-template name="metadataItem">
+        <xsl:with-param name="name">siteName</xsl:with-param>
+       </xsl:call-template>
+      </a>
+      /
+     </div>
+     <div class="title_major">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name">collectionName</xsl:with-param>
+      </xsl:call-template>
+     </div>
+		 
+		 <div id="tablist" class="linklist">
+     		<xsl:call-template name="service_list" />
+		 </div>
+    
+    </div>
+
+    <div id="content" class="noSidebar">
+     <xsl:call-template name="uiItem">
+      <xsl:with-param name="name">collectionAbout</xsl:with-param>
+     </xsl:call-template>
+    </div>
+
+
+  </div>
+
+   <div id="footer" >
+    <xsl:call-template name="uiItem">
+     <xsl:with-param name="name">collectionFooter</xsl:with-param>
+    </xsl:call-template>
+   </div>
+   
+  </body>
+ </html>
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/mediaWikish/xsl/sitehome.xsl
===================================================================
--- deprecated/ui/skins/mediaWikish/xsl/sitehome.xsl	(revision 25695)
+++ deprecated/ui/skins/mediaWikish/xsl/sitehome.xsl	(revision 25695)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html"/>  
+
+<xsl:template match="/">
+ <html>
+  <head>
+    <title>
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">siteName</xsl:with-param>
+     </xsl:call-template>
+    </title>
+    <xsl:call-template name="cssFiles"/>
+  </head>
+  <body>
+   <div id="mainContentArea">
+   <h1> 
+    <xsl:call-template name="metadataItem">
+     <xsl:with-param name="name">siteName</xsl:with-param>
+    </xsl:call-template>
+   </h1>
+
+   <xsl:call-template name="metadataItem">
+    <xsl:with-param name="name">siteDescription</xsl:with-param>
+   </xsl:call-template>
+
+   <h2>Collections:</h2>
+   <ul>
+    <xsl:for-each select="/page/pageResponse/collectionList/collection">
+     <li> <em> <xsl:value-of select="displayItem[@name='name']"/> </em> </li>
+    </xsl:for-each>
+   </ul>
+
+   </div>
+
+   <div id="footer">
+   <xsl:call-template name="uiItem">
+    <xsl:with-param name="name">footer</xsl:with-param>
+   </xsl:call-template>
+   </div>
+
+   
+  </body>
+ </html>
+</xsl:template>
+
+
+
+
+<xsl:template name="cssFiles">
+
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link rel="stylesheet" href="{@path}" type="text/css"/>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x">
+   <xsl:value-of select="/page/pageResponse/metadataList/metadataItem[@name=$name]"/>
+  </xsl:variable>
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$x"/>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x">
+   <xsl:value-of select="/page/pageResponse/uiItemList/uiItem[@name=$name]"/>
+  </xsl:variable>
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="$x"/>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/css/oran.css
===================================================================
--- deprecated/ui/skins/oran/css/oran.css	(revision 25695)
+++ deprecated/ui/skins/oran/css/oran.css	(revision 25695)
@@ -0,0 +1,437 @@
+html { height: 100%; margin-bottom: 1px; }
+html.novertscroll { margin-bottom: 0; }
+
+body {
+	background: url('../img/header_bg.png') repeat-x scroll top left; 
+	color: #333;
+	font-family: Arial,Helvetica,sans-serif;
+}
+
+#container {
+	position: relative;
+	width: 790px;
+	margin: 0px auto;
+}
+
+
+#header {
+	position: relative;
+	height: 82px;
+	padding:0; margin:0;
+}
+
+#sidebar {
+	margin: 15px 10px 10px 10px;
+	width: 230px; 
+	border: 1px solid #ccc;
+	float: left;
+	padding: 5px;
+	background: url('../img/sidebarbg.png') repeat-y scroll top center;
+}
+
+#content {
+	font-size: 13px ;
+	text-align: justify;
+	min-height: 500px ;
+	overflow: visible;
+}
+
+.withSidebar{
+	width: 524px;
+	float: right;
+}
+
+.noSidebar {
+	width: 766px;
+}
+
+#footer {
+	padding: 5px;
+	font-size: 15px;
+	text-align: center ;
+	clear: both;
+	border-top: 1px solid #777;
+}
+
+#tablist ul{
+	bottom: 0;
+	right: 0;
+	padding: 0px;
+	margin-top: -3px ;
+	font-size: 14px;
+}
+
+
+.title {
+	color: white ;
+	font-size: 30px;
+	font-weight: bold ;
+	
+}
+
+.title_minor {
+	color: white ;
+	font-size: 15px;
+	font-weight: bold ;
+	padding: 0px ;
+	margin: 0px ;
+}
+
+.title_minor a, .title_minor:visited{
+	color: #fff;
+	text-decoration: none;
+}
+
+.title_minor a:hover {
+	text-decoration: underline;
+}
+
+
+.title_major {
+	color: white ;
+	font-size: 25px;
+	font-weight: bold ;
+	padding: 0px ;
+	margin: 0px ;
+	padding-left: 20px ;
+}
+
+.title_major a, .title_major:visited{
+	color: #fff;
+	text-decoration: none;
+}
+
+
+h1, h2, h3, h4, h5, h6, a.h2, a.h3 {
+	font-size: 22px;
+	display: block;
+	font-weight: bold;
+	border-bottom: 1px solid #464;
+	color: #464;
+	margin: 10px 0 .3em 0; 
+	padding: 0;
+}
+
+h2, a.h2 { font-size: 18px; }
+h3, a.h3 { font-size: 16px; border:none; }
+h4, a.h4 { font-size: 14px; border:none; }
+h5, a.h5 { font-size: 12px; border:none; }
+
+em {
+	font-style: normal; 
+	font-weight: bold;
+}
+
+.quicksearchBox {
+	position: absolute;
+	right: 0px ;
+	
+	top: 0px ;
+}
+
+.searchSummary {
+	border-bottom: 1px solid #464;
+	font-size: 14px ;
+	text-align: right;
+}
+
+.searchSummary a {
+	font-weight: bold ;
+	padding-right: 0.2em ;
+}
+
+
+input {
+	border: 1px solid black ;
+}
+
+
+.searchResults ul {
+	margin-left: 0px ;
+	padding-left: 0px ;
+	list-style-type: none;
+}
+
+.searchResults li {
+	margin-top: 10px ;
+	margin-left: 0px ;
+	background-repeat: no-repeat;
+	background-position: 0 .4em;
+	padding-left: 20px ;	
+	
+	background-image: url('../img/leafIcon.gif') ;
+}
+
+.searchResults a {
+	padding-left: 20px ;
+	font-size: 14px ;
+}
+
+/* -- tabs -- */
+
+/* -- the framework for lists of links -- */
+.linklist ul {
+	width: auto;
+	list-style: none;
+	margin-bottom: 6px;
+}
+
+.linklist li {
+	float: right;
+	margin: 0pt;
+}
+
+.linklist a {
+	display: block;
+	float: left;
+}
+
+#tablist ul{
+	bottom: 0;
+	right: 0;
+	padding: 0px 15px 0px 0px;
+	font-size: 14px;
+}
+
+#tablist li {
+	background: transparent url('../img/button-right.png') no-repeat scroll 100% -100px;
+	padding: 0 8px 0 0;
+}
+#tablist li:hover,
+#tablist li.current { background-position: 100% 0; }
+
+#tablist a {
+	margin:0;
+	padding: 5px 4px 3px 10px;
+	background: transparent url('../img/button-left.png') no-repeat scroll 0 -100px;
+	font-weight: bold;
+	color: #fff;
+	text-decoration: none;
+	line-height: 1em ;
+}
+
+#tablist li:hover a,
+#tablist li.current a {background-position: 0 0;}
+
+#subServiceList {
+	position:relative ;
+	top: -5px ;
+
+}
+
+#subServiceList ul {
+	border-collapse: collapse;
+	position: static ;
+}
+
+#subServiceList li {
+	font-weight: bold ;
+	padding: 0px 5px ;
+	font-size: 18px ;
+}
+
+#subServiceList a {
+	font-weight: normal ;
+}
+
+
+#classifierData {
+	position: static;
+	padding: 20px 0px ;
+	
+}
+
+#classifierData ul {
+	margin-left: 0px ;
+	padding-left: 0px ;
+	list-style-type: none;
+}
+
+#classifierData li {
+	margin-top: 5px ;
+	margin-left: 0px ;
+	background-repeat: no-repeat;
+	background-position: 0 .2em;
+	padding-left: 20px ;	
+}
+
+#classifierData .collapsedNode {
+	background-image: url('../img/collapsedIcon.gif') ;
+}
+
+#classifierData .expandedNode {
+	background-image: url('../img/expandedIcon.gif') ;
+	
+}
+
+#classifierData .leafNode {
+	background-image: url('../img/leafIcon.gif') ;
+}
+
+
+
+/* -- document -- */
+
+.sectionNav {
+	height: 20px ;
+}
+
+
+.prevSection {
+	
+	float:left ;
+}
+
+
+.nextSection {
+	
+	float: right ;
+}
+
+.ancestorSections {
+	
+	color: #464;
+	font-weight: bold ;
+	padding-bottom: 0px ;
+	margin-bottom: 0px ;
+	line-height: 1em ;
+}
+
+.subsectionHeader {
+	margin-top: 0px ;
+	padding-top: 0px ;
+	margin-left: 20px ;
+}
+
+.coverImage {
+	border: 1px solid gray ;
+	background-color: #f0f9f0 ;
+	padding: 5px ;
+	
+	float: left ;
+	margin-right: 10px ;
+	margin-bottom: 10px ;
+}
+
+.coverImage img {
+	
+	border: 1px solid gray ;
+}
+
+.divider {
+	clear: both; 
+}
+
+#contentsLink {
+	
+	position:relative ;
+	top: -5px ;
+	
+	font-size: 18px ;	
+	width: 100px ;
+}
+
+#contents {
+	
+	position: absolute; 
+	width: 400px ;	
+	display:none ;
+	border: 1px solid gray ;
+	background-color: #f0f9f0 ;
+	padding: 5px ;	
+}
+
+#contents ul {
+	margin-left: 0px ;
+	padding-left: 20px ;
+	list-style-type: none;
+}
+
+#contents li {
+	margin-top: 5px ;
+	margin-left: 0px ;
+
+	padding-left: 0px ;
+}
+
+#contents li a {
+	padding-left: 20px ;
+	background-repeat: no-repeat;
+	background-position: 0 .4em;
+	display: block;
+}
+
+
+
+#contents .collapsed a {
+	background-image: url('../img/collapsedIcon.gif') ;
+}
+
+#contents .collapsed ul {
+	display: none ;
+}
+
+#contents .expanded a {
+	background-image: url('../img/expandedIcon.gif') ;
+}
+
+#contents .expanded ul {
+	display: block ;
+}
+
+#contents .leaf a {
+	background-image: url('../img/leafIcon.gif') ;
+}
+
+
+#currentSection {
+	padding-left: 20px ;
+	background-repeat: no-repeat;
+	background-position: 0 .4em;
+	display: block;
+	background-image: url('../img/leafIcon.gif') ;
+	font-weight: bold ;
+	color: black ;
+}
+
+#contents li {
+	
+}
+
+/* -- sidebar -- */
+
+
+
+#sidebar a:link, #sidebar a:active, #sidebar a:visited, #sidebar a:hover {
+	color: #575;
+}
+#sidebar a:visited { color: #464; }
+#sidebar a:hover { color: #9a9; }
+
+#sidebar .itemName {
+	font-size: 16px ;
+	margin: -1px;
+	padding: 5px ;
+	background: url('../img/sidebar-button-top.png') repeat-x scroll top left; 
+	border: 1px solid gray;
+	list-style: none;
+}
+
+#sidebar .itemDetails {
+	font-size: 12px ;
+	padding: 5px ;
+	background-color: #f0f9f0;
+	border: 1px solid gray;
+	list-style: none;
+	margin: 0 0 9px 0;
+}
+
+a {
+	color: #575;
+	text-decoration: none ;	
+	cursor: pointer;
+}
+
+a:hover {
+	text-decoration: underline;
+}
Index: deprecated/ui/skins/oran/js/scripts.js
===================================================================
--- deprecated/ui/skins/oran/js/scripts.js	(revision 25695)
+++ deprecated/ui/skins/oran/js/scripts.js	(revision 25695)
@@ -0,0 +1,94 @@
+/**
+ * @author dnk2
+ */
+
+function showContents() {
+	var contents = document.getElementById("contents") ;
+	var contentsLink = document.getElementById("contentsLink") ;
+	
+	contents.style.left = contentsLink.offsetLeft + "px" ;
+	contents.style.top = (contentsLink.offsetTop + contentsLink.offsetHeight) + "px" ;
+	
+	contents.onmouseout = new Function("event", "if (isMouseLeaveOrEnter(event, this)) hideContents() ;") ;
+	
+	var ul = getSublist(contents) ;
+	
+	for(var i=0 ; i<ul.childNodes.length ; i++) {
+		collapseNode(ul.childNodes[i]) ;
+	}
+	
+	var currNode = document.getElementById("currentSection") ;
+	if (currNode != null) {
+		//alert("current section found") ;
+		currNode = currNode.parentNode ;
+		expandAncestors(currNode) ;
+	} else {
+		//alert("no current section found") ;
+	}
+	
+	
+	contents.style.display = "block" ;
+}
+
+
+function expandAncestors(node) {
+	
+	var parent = node.parentNode.parentNode ;
+	
+	if (parent.id != "contents") {
+		parent.className = "expanded" ;
+		expandAncestors(parent) ;
+	}	
+}
+
+function collapseNode(node) {
+	if (node.className == "expanded")
+		node.className = "collapsed" ;
+}
+
+function toggleNode(nodeId) {
+	
+	var node = document.getElementById(nodeId) ;
+
+	var ul = getSublist(node) ;
+	
+	if (node.className == "expanded")
+		node.className = "collapsed" ;
+	else
+		node.className = "expanded" ;
+		
+	for(var i=0 ; i<ul.childNodes.length ; i++) {
+		//alert(ul.childNodes[i].innerHTML)
+		collapseNode(ul.childNodes[i]) ;
+	}
+}
+ 
+function hideContents() {
+ 	var contents = document.getElementById("contents") ;
+	contents.style.display = "none" ;
+}
+
+ 
+ // this function determines whether the event is the equivalent of the microsoft // mouseleave or mouseenter events. 
+function isMouseLeaveOrEnter(e, handler) { 
+
+	if (e.type != 'mouseout' && e.type != 'mouseover') 
+		return false; 
+		
+	var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement; 
+	while (reltg && reltg != handler) 
+		reltg = reltg.parentNode; 
+		
+	return (reltg != handler); 
+}
+
+function getSublist(node) {
+	
+	for (var x=0 ; x<node.childNodes.length ; x++){
+		
+		if (node.childNodes[x].tagName == "UL")
+			return node.childNodes[x] ;
+	}
+	
+	return null ;
+}
Index: deprecated/ui/skins/oran/page.xml
===================================================================
--- deprecated/ui/skins/oran/page.xml	(revision 25695)
+++ deprecated/ui/skins/oran/page.xml	(revision 25695)
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="xsl/collectHome.xsl"?>
+
+ <page lang="en" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/gsf">
+  <pageRequest action="p" lang="en" output="xml" subaction="about" to="" type="page" uid="2">
+    <paramList>
+      <param name="c" value="paho" /></paramList>
+  </pageRequest>
+
+  <pageResponse from="paho" type="describe">
+    <collection name="paho">
+      <displayItem lang="en" name="smallicon">pahosml.gif</displayItem>
+
+      <displayItem lang="en" name="description">The Virtual Disaster Library was developed in November 1999, by PAHO/WHO (Pan American Health Organization / Regional Office of the World Health Organization). It contains 250 publications (25,000 pages) of experiences, ideas and solutions to advance the cause of disaster reduction.</displayItem>
+
+      <displayItem lang="en" name="name">Virtual Disaster Library</displayItem>
+
+      <displayItem lang="en" name="icon">paho.gif</displayItem>
+
+      <serviceList>
+        <service name="DocumentStructureRetrieve" type="retrieve" />
+
+        <service name="DocumentMetadataRetrieve" type="retrieve" />
+        <service name="DocumentContentRetrieve" type="retrieve" />
+        <service name="ClassifierBrowse" type="browse">
+          <displayItem name="name">Browse</displayItem>
+
+          <displayItem name="description">Browse pre-defined classification hierarchies</displayItem>
+
+          <classifierList>
+            <classifier content="Title" name="CL1">
+
+              <displayItem name="name">titles</displayItem>
+
+              <displayItem name="description">Browse by Title</displayItem>
+            </classifier>
+
+            <classifier content="Subject" name="CL2">
+              <displayItem name="name">subjects</displayItem>
+
+              <displayItem name="description">Browse by Subject</displayItem>
+
+            </classifier>
+
+            <classifier content="Organization" name="CL3">
+              <displayItem name="name">organisations</displayItem>
+
+              <displayItem name="description">Browse by Organisation</displayItem>
+            </classifier>
+          </classifierList>
+        </service>
+
+        <service name="ClassifierBrowseMetadataRetrieve" type="retrieve" />
+        <service name="TextQuery" type="query">
+          <displayItem name="name">Text Search</displayItem>
+
+          <displayItem name="submit">Search</displayItem>
+
+          <displayItem name="description">Full text and/or metadata search service</displayItem>
+
+          <paramList>
+            <param default="1" name="case" type="boolean">
+              <displayItem name="name">Turn casefolding </displayItem>
+
+              <option name="0">
+                <displayItem name="name">off</displayItem>
+              </option>
+
+              <option name="1">
+
+                <displayItem name="name">on</displayItem>
+              </option>
+            </param>
+
+            <param default="1" name="stem" type="boolean">
+              <displayItem name="name">Turn stemming </displayItem>
+
+              <option name="0">
+                <displayItem name="name">off</displayItem>
+
+              </option>
+
+              <option name="1">
+                <displayItem name="name">on</displayItem>
+              </option>
+            </param>
+
+            <param default="some" name="matchMode" type="enum_single">
+              <displayItem name="name">Match</displayItem>
+
+              <option name="some">
+                <displayItem name="name">some</displayItem>
+              </option>
+
+              <option name="all">
+                <displayItem name="name">all</displayItem>
+              </option>
+            </param>
+
+            <param default="st0" name="index" type="enum_single">
+              <displayItem name="name">Index to search in</displayItem>
+
+              <option name="stt">
+                <displayItem name="name">section titles</displayItem>
+              </option>
+
+              <option name="st0">
+
+                <displayItem name="name">chapters</displayItem>
+              </option>
+
+              <option name="ptt">
+                <displayItem name="name">paragraphs</displayItem>
+              </option>
+
+              <option name="dtt">
+                <displayItem name="name">book titles</displayItem>
+
+              </option>
+            </param>
+
+            <param default="100" name="maxDocs" type="integer">
+              <displayItem name="name">Maximum hits to return</displayItem>
+            </param>
+
+            <param name="query" type="string">
+              <displayItem name="name">Query string</displayItem>
+
+            </param>
+          </paramList>
+        </service>
+      </serviceList>
+
+      <metadataList>
+        <metadata name="creator">kjm18@cs.waikato.ac.nz</metadata>
+
+        <metadata name="public">true</metadata>
+
+        <metadata name="numDocs">272</metadata>
+
+        <metadata name="buildType">mg</metadata>
+
+        <metadata name="httpPath">http://localhost:8080/greenstone3/sites/localsite/collect/paho</metadata>
+
+        <metadata name="tidyoption">untidy</metadata>
+      </metadataList>
+
+      <pluginList /></collection>
+
+    <cssFileList>
+      <cssFile path="./ui/skins/oran/css/oran.css" />
+      <cssFile path="./sites/localsite/collect/paho/ui/css/style.css" />
+    </cssFileList>
+
+    <uiItemList>
+      <uiItem lang="en" name="footer">
+	Powered by Greenstone
+    </uiItem>
+
+      <uiItem inherit="false" lang="en" name="collectionAbout">
+      <p>
+        <metadataItem name="collectionDescription" /> 
+      </p>
+
+      <h1> About PAHO </h1>
+      <div class="rightBox">
+       <img src="./sites/localsite/collect/paho/ui/img/paho.gif"> </img>
+
+      </div> 
+
+      <p>
+	The <a href="http://www.paho.org/">Pan American Health Organization (PAHO)</a> is an international public health 	 agency with 100 years of experience in working to improve health and living standards of the countries of the 		Americas. It serves as the specialized organization for health of the Inter-American System. It also serves as the 		Regional Office for the Americas of the World Health Organization and enjoys international recognition as part of 		the United Nations system.
+      </p>
+
+      <h1> About WHO </h1>
+
+      <div class="rightBox">
+
+       <img src="./sites/localsite/collect/paho/ui/img/who.gif"> </img>
+      </div>
+      <p>
+	The <a href="http://www.who.int">World Health Organization (WHO)</a> is the directing and coordinating authority for 		health within the United Nations system. It is responsible for providing leadership on global health matters,
+        shaping the health research agenda, setting norms and standards, articulating evidence-based policy options, 
+        providing technical support to countries and monitoring and assessing health trends.
+      </p>
+      <p style="text-align:center">
+	<img src="./sites/localsite/collect/paho/ui/img/disaster.jpg"> </img>
+
+      </p>
+    </uiItem>
+    </uiItemList>
+
+    <metadataList>
+      <metadataItem lang="en" name="siteDescription"> 
+	This is just a random site for testing stuff
+  </metadataItem>
+
+      <metadataItem name="collectionDocuments"> 250 </metadataItem>
+
+      <metadataItem name="siteAdmin"> dnk2@cs.waikato.ac.nz </metadataItem>
+
+      <metadataItem name="collectionBuilt"> 19 December 1999 </metadataItem>
+
+      <metadataItem lang="en" name="collectionName">Virtual Disaster Library</metadataItem>
+
+      <metadataItem name="collectionPages"> 25,000 </metadataItem>
+
+      <metadataItem lang="en" name="siteName">Dave&apos;s Development Site</metadataItem>
+
+      <metadataItem lang="en" name="collectionDescription"> 
+	The Virtual Disaster Library was developed in November 1999, by PAHO/WHO 
+        (Pan American Health Organization / Regional Office of the World Health Organization). 
+        It contains <metadataItem name="collectionDocuments" /> publications (<metadataItem name="collectionPages" /> pages) of experiences, ideas and 		solutions to advance the cause of disaster reduction.
+  </metadataItem>
+    </metadataList>
+  </pageResponse>
+
+</page>
+
Index: deprecated/ui/skins/oran/skin.xml
===================================================================
--- deprecated/ui/skins/oran/skin.xml	(revision 25695)
+++ deprecated/ui/skins/oran/skin.xml	(revision 25695)
@@ -0,0 +1,18 @@
+<skin name="oran">
+ <actionList>
+    <action name='p' class='PageAction'>
+      <subaction name='home' xslt='siteHome.xsl'/>
+      <subaction name='about' xslt='collectHome.xsl'/>
+      <subaction name='help' xslt='blah.xsl'/>
+      <subaction name='pref' xslt='blah.xsl'/>
+      <subaction name='nav' xslt='blah.xsl'/>
+      <subaction name="html" xslt="blah.xsl"/>
+    </action>
+    <action name='q' class='QueryAction' xslt='search.xsl'/>
+    <action name='b' class='GS2BrowseAction' xslt='collectBrowse.xsl'/>
+    <action name='a' class='AppletAction' xslt='blah.xsl'/>
+    <action name='d' class='DocumentAction' xslt='collectDocument.xsl'/>
+    <action name='pr' class='ProcessAction' xslt='blah.xsl'/>
+    <action name='s' class='SystemAction' xslt='blah.xsl'/>
+  </actionList>
+</skin>
Index: deprecated/ui/skins/oran/style.css
===================================================================
--- deprecated/ui/skins/oran/style.css	(revision 25695)
+++ deprecated/ui/skins/oran/style.css	(revision 25695)
@@ -0,0 +1,540 @@
+*{ margin: 0; padding:0;}
+html { height: 100%; margin-bottom: 1px; }
+html.novertscroll { margin-bottom: 0; }
+p { margin: 0 10px 20px 0; }
+pre { margin-bottom: 20px; line-height: 120%; }
+img { border: none; }
+.cantfindkey{ background-color: #f0f;}
+span.u {	text-decoration:underline;}
+form { line-height: 180%;}
+
+
+body {
+	background: url('../img/header_bg.png') repeat-x scroll top left; 
+	color: #333;
+	font-family: sans-serif;
+}
+
+#content li, #full-content li {
+	margin-bottom: 5px;
+}
+
+#content ul, #full-content ul, #content ol, #full-content ol {
+	margin-left: 20px;
+	margin-bottom: 20px;
+}
+
+table {
+	width: 100%;
+	margin: 0 20px 20px 0;
+	border: 1px solid #aaa;
+	border-collapse: collapse;
+}
+
+tr { margin:0; background: #eee url('../img/linebg.gif') scroll repeat-x top left; }
+td{ padding:2px 6px 2px 2px;}
+h1, h2, h3, h4, h5, h6, a.h2, a.h3 {
+	font-size: 22px;
+	display: block;
+	font-weight: bold;
+	border-bottom: 1px solid #464;
+	color: #464;
+	margin: 10px 0 .3em 0; 
+	padding: 0;
+	clear: both;
+}
+h2, a.h2 { font-size: 18px; }
+h3, a.h3 { font-size: 16px; border:none; }
+h4, a.h4 { font-size: 14px; border:none; }
+h5, a.h5 { font-size: 12px; border:none; }
+a.h2:active,a.h2:link,a.h2:visited,a.h2:hover,
+a.h3:active,a.h3:link,a.h3:visited,a.h3:hover {
+	text-decoration: none;
+	text-indent: 1.2em;
+	background: url('../img/link.png') no-repeat scroll 0 0;
+}
+
+h1 .caption { color: #bcb; }
+
+small, a.small {
+	font-size: .8em;
+}
+.centered {
+	margin-left: auto;
+	margin-right: auto;
+}
+
+.centering {
+	text-align: center;
+}
+/* ------------ main layout -------------------- */
+
+#container {
+	position: relative;
+	width: 766px;
+	margin: 0 auto;
+/*	background-color: #faa; */
+}
+
+#header {
+	position: relative;
+	height: 82px;
+	padding:0; margin:0;
+/*	overflow: hidden; 
+	background-color: #afa; */
+}
+
+#sidebar {
+	margin: 10px 0 10px 0;
+	width: 210px; 
+	border: 1px solid #ccc;
+	float: left;
+	padding: 8px;
+	background: url('../img/sidebarbg.png') repeat-y scroll top center;
+/*	background-color: #aaf; */
+}
+
+#content {
+	width: 514px;
+	float: right;
+	line-height: 150%;
+/*	overflow: hidden; */
+/*	background-color: #ffa; */
+}
+
+#footer {
+	padding: 10px;
+	font-size: 10px;
+	clear: both;
+	border-top: 1px solid #777;
+}
+
+#footer a:link, a:active, a:hover, a:visited {
+	color: #777;
+}
+/* ------------------ stuff in the nav bar ----------------- */
+
+/* -- the framework for lists of links -- */
+.linklist {
+	width: auto;
+	position: absolute;
+	list-style: none;
+	margin:0;
+}
+
+.linklist li {
+	float: right;
+	margin: 0;
+}
+
+.linklist a {
+	display: block;
+	float: left;
+}
+
+/* --- page list --- */
+#pagelist {
+	bottom: 0;
+	right: 0;
+	padding: 0 15px 0 0;
+	font-size: 14px;
+}
+
+#pagelist li {
+	background: transparent url('../img/button-right.png') no-repeat scroll 100% -100px;
+	padding: 0 8px 0 0;
+}
+#pagelist li:hover,
+#pagelist li.current { background-position: 100% 0; }
+
+#pagelist a {
+	margin:0;
+	padding: 5px 4px 3px 10px;
+	background: transparent url('../img/button-left.png') no-repeat scroll 0 -100px;
+	font-weight: bold;
+	color: #fff;
+	text-decoration: none;
+	line-height: 1;
+}
+#pagelist li:hover a,
+#pagelist li.current a {background-position: 0 0;}
+
+/* -- language list -- */
+#langlist {
+	bottom: 45px;
+	right: 0;
+	padding: 0 15px 0 0;
+}
+
+#langlist li {
+/*	background: transparent url('../img/button-right.gif') no-repeat scroll 100% -50px; */
+	padding: 0 2px 0 0;
+}
+#langlist li:hover,
+#langlist li.current { background-position: 100% 0; }
+
+#langlist a {
+	display: table-cell;
+	min-width: 1em;
+	margin:0;
+	padding: 5px 5px 3px 10px;
+/*	background: transparent url('../img/button-left.png') no-repeat scroll 0 -50px; */
+	font-weight: bold;
+	text-align: center;
+	color: #fff;
+	text-decoration: none;
+	line-height: 1;
+}
+#langlist li:hover a,
+#langlist li.current a { text-decoration: underline; background-position: 0 0;}
+#langlist img.spacer { display: table-cell; }
+
+/* -- home link -- */
+#homelink {
+	display: block;
+	position: absolute;
+	top: 13px;
+	left: 5px;
+	width: 217px;
+	height: 60px;
+	background: transparent url('../img/gsdlhead.png') no-repeat scroll 0 0;
+}
+
+
+/* ------------ sidebar------------------- */
+
+
+#sidebar a:link, #sidebar a:active, #sidebar a:visited, #sidebar a:hover {
+	color: #575;
+}
+#sidebar a:visited { color: #464; }
+#sidebar a:hover { color: #9a9; }
+/*
+#sidebar h1, #sidebar h2,#sidebar h3, #sidebar h4, #sidebar h5, #sidebar h6, #sidebar a, #sidebar ul {
+	margin: 10px;
+}
+*/
+
+/* ------------ sidebar buttons  --------------------- */
+
+#sidebar div.button {
+	display: block;
+	background: url('../img/sidebar-button-top.png') repeat-x scroll top left;
+	border: 1px solid gray;
+	margin-bottom: 4px;
+}
+
+#sidebar a.button:active,
+#sidebar a.button:link,
+#sidebar a.button:visited,
+#sidebar a.button:hover {
+	display: block;
+	background-position: 3px 3px;
+	background-repeat: no-repeat;
+	padding: 8px 5px 8px 30px;
+	text-decoration: none;
+	font-weight: normal;
+	font-size: 12px;
+
+}
+
+#sidebar a.button:hover {
+	background-position: 3px -97px;
+}
+
+/* ------------ sidebar blog entries -------------------- */
+#sidebar-blog-entries li.title {
+	background: url('../img/sidebar-button-top.png') repeat-x scroll top left; 
+	border-top: 1px solid gray;
+	border-left: 1px solid gray;
+	border-right: 1px solid gray;
+	list-style: none;
+}
+
+#sidebar-blog-entries li.excerpt {
+	background-color: #f0f9f0;
+	border: 1px solid gray;
+	list-style: none;
+	margin: 0 0 9px 0;
+}
+
+#sidebar-blog-entries a.title-text {
+	display: block;
+	font-size: 14px;
+	text-decoration:none;
+	margin: 0;
+	padding: 3px;
+}
+#sidebar-blog-entries a.category-text {
+	display: block;
+	clear: left;
+	font-size: 10px;
+	text-decoration:none;	
+	margin: 0;
+	padding: 1px 1px 5px 5px;
+}
+
+#sidebar-blog-entries li span.date { 
+	font-size: 10px;
+	font-weight: normal;
+	margin: 0 5px 3px 5px;
+	text-decoration: none;
+}
+#sidebar-blog-entries li p {
+	line-height: 150%;
+	font-size: 12px;
+	margin: 0 5px 5px 5px;
+	overflow: hidden;
+}
+.small-logo {
+	float: left;
+	margin: 1px;
+	padding: 0;
+}
+
+/* ------------ content area ----------------- */
+
+#full-content a:link, #full-content a:active, #full-content a:visited, #full-content a:hover,
+#content a:link, #content a:active, #content a:visited, #content a:hover {
+	color: #575;
+}
+#full-content a:visited, #content a:visited {	color: #464; }
+#full-content a:hover, #content a:hover { color: #9a9; }
+
+img.logo {
+	float: left;
+	padding: 10px 10px;
+}
+
+div.note {
+	background-color: #eee;
+	margin: 10px 10px 20px 0;
+	padding: 20px;
+	border: 1px solid gray;
+}
+
+
+/* --- sidebar button icons --- */
+
+
+/* --- for html forms --- */
+
+input, select, option {
+	color: black;
+}
+
+input.input-text {
+	width: 290px;
+}
+
+#sidebar input.input-text {
+	width: 160px;
+}
+
+
+.righting {
+	text-align: right;
+}
+
+
+.clear {
+	clear: both;
+}
+
+textarea {
+	width: 400px;
+	height: 120px;
+	color: #000;
+}
+
+#other-specify-div {
+	display: none;
+}
+
+.formlabel {
+	display: block;
+	float: left;
+	width: 150px;
+	max-width: 150px;
+	min-width: 150px;
+}
+
+.forminput {
+	float: right;
+	width: 300px;
+}
+
+.formline {
+	background: #eee url('../images/linebg.gif') scroll repeat-x top left;
+	padding: 5px;
+}
+
+option {
+	padding-right:10px;
+}
+
+.highlighted {
+	background: #ffa url('../images/linebg-highlighted.gif') scroll repeat-x top left; 
+}
+
+.message {
+	background: transparent url('../images/warning.png') scroll no-repeat top left;
+	text-indent: 25px;
+	padding:3px;
+		
+}
+
+.floatleft{
+	float:left;
+}
+
+
+/* interesting stuff styles */
+div.commit {
+	padding: 10px;
+	border: 1px solid #017;
+	background-color: #def;
+}
+
+div.test{ border: 1px solid #070; padding: 5px; margin: 10px 0; }
+.passed-no { background-color: #fee; }
+.passed-yes { background-color: #efe; }
+
+div.bug {
+	padding: 10px;
+	border: 1px solid #730;
+	background-color: #fed;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/* --------- PAGE SPECIFIC STUFF ------------- */
+
+/* blog */
+#sidebar.wordpress {
+	line-height: 1.3em;
+}
+#sidebar.wordpress div.button{
+	line-height: 1em;
+}
+#wp-title {
+	text-align: center;
+}
+#sidebar.wordpress li {
+	list-style:none;
+	margin-left: 0;
+}
+#sidebar.wordpress #s { width: 130px; }
+#sidebar.wordpress #searchsubmit { width: 60px; }
+
+h2 a {
+	text-decoration: none;
+}
+
+div.navigation {
+	position: relative;
+	padding: 15px 0 25px 0;
+}
+
+div.alignright{
+	float:right;
+}
+div.alignleft {
+	float:left;
+}
+
+textarea {
+	width: 100%;
+	border: 1px solid black;
+}
+a.rssicon {
+	padding: 2px;
+	position: relative; top: 2px;
+	cursor: pointer;
+}
+.indented{ margin-left: 20px; }
+#feed-global {
+	cursor: pointer;
+}
+
+
+
+
+/* download */
+
+#downloadlist li {
+	list-style:none;
+}
+
+#downloadlist li>div {
+/*	background: url('../images/sidebar-button-bottom.png') repeat-x scroll bottom left; */
+}
+
+#downloadlist a:link,
+#downloadlist a:visited,
+#downloadlist a:active,
+#downloadlist a:hover {
+	display: block;
+	padding: 8px 5px 8px 30px;
+
+	background-repeat: no-repeat;
+	background-position: 3px 50%;
+
+	text-decoration: none;
+	font-weight: normal;
+	font-size: 12px;}
+
+#downloadlist li a:hover {
+	/* background-position: -497px 50%; */
+}
+
+.file {
+	display: block;
+	height: 22px;
+	padding-left: 28px;
+	margin: 0 5px 5px 5px;
+	
+	background: url('../images/os/000.png') no-repeat scroll 3px 50%;
+}
+.file-001 { background-image: url('../images/os/001.png'); }
+.file-010 { background-image: url('../images/os/010.png'); }
+.file-100 { background-image: url('../images/os/100.png'); }
+.file-111 { background-image: url('../images/os/111.png'); }
+
+.lastfile {
+	margin: 0 5px 15px 5px;
+}
+
+
+
+/* examples */
+#examplelist li {
+	list-style:none;
+	overflow: hidden;
+}
+
+#examplelist a.button:link,
+#examplelist a.button:visited,
+#examplelist a.button:active,
+#examplelist a.button:hover {
+	padding: 8px 5px 8px 5px;
+}
+
+
+
+/* sitemap */
+
+#content.sitemap>ul>li {list-style: none;  margin: 0 20px 10px 10px;}
+#content.sitemap li { margin-left: 20px; }
Index: deprecated/ui/skins/oran/xsl/collectBrowse.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/collectBrowse.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/collectBrowse.xsl	(revision 25695)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:gslib="http://www.greenstone.org/skinning">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:template match="/">
+	<html>
+		<head>
+			<title>
+				<gslib:metadataItem name="siteName" /> 
+				/ 
+				<gslib:metadataItem name="collectionName" />
+    		</title>
+
+			<gslib:css/>
+			<gslib:js/>
+  		</head>
+  		<body>
+   			<div id="container">
+
+    			<div id="header">
+					<div class="title_minor">
+
+						<a href="{$site_homeUrl}">
+							<gslib:metadataItem name="siteName" />
+						</a>
+					</div>
+				
+					<div class="title_major">
+						<gslib:metadataItem name="collectionName" />
+					</div>
+			 
+					<div id="tablist" class="linklist">
+						<ul>
+							<xsl:for-each select="$services">
+								<li>
+									<a href="">
+										<xsl:attribute name="href"> <gslib:service_url/> </xsl:attribute>
+										<xsl:attribute name="title"> <gslib:service_description/> </xsl:attribute>
+										<gslib:service_title/>
+									</a>						
+								</li>	
+							</xsl:for-each>
+						<li>
+							<a href="{$collection_homeUrl}">
+								Home
+							</a>
+						</li>							
+						</ul>
+					</div>
+					
+					<div class="quicksearchBox" >
+						<form method="get" name="quickSearch">
+							<input type="text" name="s1.query" value="{$search_query}"/>
+						
+							<input type="submit" value="Quick Search"/>
+							<gslib:search_hiddenInputs/>
+						</form>
+					</div>
+			    </div>
+	
+	    		<div id="content" class="noSidebar">
+	    			<div id="subServiceList" class="linklist">
+						<ul>
+							<xsl:for-each select="$classifiers">
+								<li>
+									<xsl:choose>
+										<xsl:when test=". = $currentClassifier">
+											<gslib:classifier_title/>
+										</xsl:when>
+										<xsl:otherwise>
+											<a>
+												<xsl:attribute name="title"><gslib:classifier_description/></xsl:attribute>
+												<xsl:attribute name="href"><gslib:classifier_url/></xsl:attribute>
+										
+												<gslib:classifier_title/>									
+											</a>
+										</xsl:otherwise>
+									</xsl:choose>
+								</li>						
+							</xsl:for-each>
+						</ul>
+	    			</div>
+			
+					<div id="classifierData">
+						<ul>
+							<xsl:for-each select="$topLevelClassifierNodes">
+								<xsl:call-template name="classifierNode"/>
+							</xsl:for-each>
+						</ul>
+					</div>
+	    		</div>
+	
+				<div id="footer" >
+					<gslib:uiItem name="collectionFooter" /> 
+				</div>
+			</div>
+		</body>
+	</html>
+</xsl:template>
+
+<!-- default browsing format statements -->
+
+<xsl:template name="classifierNode">
+	<li>
+		<xsl:attribute name="class">
+			<xsl:choose>
+				<xsl:when test="./classifierNode or ./documentNode">expandedNode</xsl:when>
+				<xsl:otherwise>collapsedNode</xsl:otherwise>
+			</xsl:choose>
+		</xsl:attribute>
+		
+		<a>
+			<xsl:attribute name="href"><gslib:classifierNode_url/></xsl:attribute>
+			<gslib:classifierNode_title/>
+		</a>
+		
+		<xsl:if test="./documentNode or ./classifierNode">
+		<ul>
+			<xsl:for-each select="./classifierNode">
+				<xsl:call-template name="classifierNode"/>
+			</xsl:for-each>
+		
+			<xsl:for-each select="./documentNode">
+				<xsl:call-template name="documentNode"/>
+			</xsl:for-each>
+		</ul>
+		</xsl:if>
+	</li>
+</xsl:template>
+
+<xsl:template name="documentNode">
+	<li class="leafNode">
+		<a>
+			<xsl:attribute name="href"><gslib:documentNode_url/>&amp;ec=1</xsl:attribute>
+			<gslib:documentNode_title/>
+		</a>
+	</li>
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/xsl/collectDocument.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/collectDocument.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/collectDocument.xsl	(revision 25695)
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:gslib="http://www.greenstone.org/skinning">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:template match="/">
+<html>
+	<head>
+		<title>
+			<gslib:metadataItem name="siteName" /> 
+			/ 
+			<gslib:metadataItem name="collectionName" />
+		</title>
+
+		<gslib:css/>
+		<gslib:js/>
+  	</head>
+  	<body>
+		<xsl:if test="$document_currentSection/@nodeType = 'root'">
+  			<xsl:attribute name="onload">showContents()</xsl:attribute>
+		</xsl:if>		
+  
+   		<div id="container">
+			<div id="header">
+    			<div class="title_minor">
+					<a href="{$site_homeUrl}">
+						<gslib:metadataItem name="siteName" />
+					</a>
+				</div>
+				
+				<div class="title_major">
+					<gslib:metadataItem name="collectionName" />
+				</div>
+		 
+				<div id="tablist" class="linklist">
+					<ul>
+						<xsl:for-each select="$services">
+							<li>
+								<a href="">
+									<xsl:attribute name="href"> <gslib:service_url/> </xsl:attribute>
+									<xsl:attribute name="title"> <gslib:service_description/> </xsl:attribute>
+									<gslib:service_title/>
+								</a>						
+							</li>
+						</xsl:for-each>
+						
+						<li>
+							<a href="{$collection_homeUrl}">
+								Home
+							</a>
+						</li>
+					</ul>
+				</div>
+				
+				<div class="quicksearchBox" >
+						<form method="get" name="quickSearch">
+							<input type="text" name="s1.query" value="{$search_query}"/>
+						
+							<input type="submit" value="Quick Search"/>
+							<gslib:search_hiddenInputs/>
+						</form>
+					</div>
+				
+			</div>
+
+    		<div id="content" class="noSidebar">
+	
+				<br/>	
+		
+				<xsl:if test="$document_coverImage_exists='true'">
+					<div class="coverImage">
+						<img src="{$document_coverImage_url}"> </img>
+					</div>
+				</xsl:if>
+		
+				<h1>
+					<gslib:document_title/>
+				</h1>
+		
+				<xsl:choose>
+					<xsl:when test="$document_type='simple'">
+						<div id="subServiceList" class="linklist">
+							<ul>
+     							<li> 
+									<a href="" target="_blank" title="open in new window">detach</a>
+								</li>
+							</ul>
+    					</div>
+						
+						<br/><br/>
+					
+						<div class="documentBody">
+							<gslib:document_content/>
+						</div>			
+					</xsl:when>
+			
+					<xsl:when test="$document_type='hierarchy' and $document_is_expanded != 'true'">
+						<div id="subServiceList" class="linklist">
+							<ul>
+     							<li> 
+									<a href="{$document_expanded_url}" title="view entire document">expand</a>
+								</li>
+								<li> 
+									<a href="" target="_blank" title="open in new window">detach</a>
+								</li>
+							</ul>
+    					</div>
+					
+						<a id="contentsLink" onClick="showContents()" onMouseOver="showContents()">Show contents</a>
+		
+						<div id="contents">
+							<ul>				
+							<xsl:for-each select="$document_topLevelNodes">
+								<xsl:call-template name="addDocNodeToContents"/>							
+							</xsl:for-each>
+							</ul>
+						</div>
+		
+						<br/><br/>
+		
+						<div class="documentBody">
+						
+							<xsl:choose>
+								<xsl:when test="$document_ancestorSections!=''">
+									<p class="ancestorSections">
+										<xsl:for-each select="$document_ancestorSections_titles">
+											<xsl:value-of select="."/> /
+										</xsl:for-each>
+									</p>
+				
+									<h2 class="subsectionHeader"> <xsl:value-of disable-output-escaping='yes' select="$document_currentSection_title"/> </h2>
+				
+								</xsl:when>
+							
+								<xsl:otherwise>
+									<xsl:if test="$document_currentSection/@nodeType != 'root'">
+										<h2> <xsl:value-of disable-output-escaping='yes' select="$document_currentSection_title"/> </h2>
+									</xsl:if>
+								</xsl:otherwise>
+							</xsl:choose>
+		
+							<xsl:call-template name="section_navigation" />
+		
+							<gslib:document_currentSection_content/>
+											
+							<xsl:call-template name="section_navigation" />
+						</div>
+					</xsl:when>
+
+					<xsl:when test="$document_type='hierarchy' and $document_is_expanded">
+						<div id="subServiceList" class="linklist">
+							<ul>
+     							<li> 
+									<a href="{$document_collapsed_url}" title="view document as sections">collapse</a>
+								</li>
+								<li> 
+									<a href="" target="_blank" title="open in new window">detach</a>
+								</li>
+							</ul>
+    					</div>
+						
+						
+						<br/><br/>
+						<xsl:for-each select="$document_allSections">
+					
+							<xsl:variable name="depth"><gslib:document_section_depth/></xsl:variable>
+							
+							<xsl:element name="h{$depth + 1}">
+								<gslib:document_section_title/>				
+							</xsl:element>
+					
+							<gslib:document_section_content/>		
+						</xsl:for-each>
+					</xsl:when>
+			
+				</xsl:choose>
+   			</div>
+			
+   			<div id="footer" >
+    			<gslib:uiItem name="collectionFooter"/>
+   			</div>
+ 		</div>
+  	</body>
+</html>
+</xsl:template>
+
+<xsl:template name="addDocNodeToContents">
+
+	<xsl:variable name="sId"> <gslib:document_section_id/></xsl:variable>
+	
+	<li class="expanded" id="{$sId}">
+		<xsl:choose>
+			<xsl:when test="@nodeType='leaf'">
+				<xsl:attribute name="class">leaf</xsl:attribute>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:attribute name="class">collapsed</xsl:attribute>
+			</xsl:otherwise>
+		</xsl:choose>
+		<a>
+			<xsl:choose>
+				<xsl:when test=".=$document_currentSection">
+					<xsl:attribute name="id">currentSection</xsl:attribute>
+				</xsl:when>
+				<xsl:when test="@nodeType='leaf'">
+					<xsl:attribute name="href"><gslib:documentNode_url/>&amp;ec=1</xsl:attribute>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:attribute name="onclick">toggleNode('<gslib:document_section_id/>')</xsl:attribute>
+				</xsl:otherwise>
+			</xsl:choose>
+			
+			<gslib:document_section_title/>
+		</a>
+		
+		<xsl:if test="./documentNode">
+			<ul>
+				<xsl:for-each select="./documentNode">
+					<xsl:call-template name="addDocNodeToContents"/>
+				</xsl:for-each>
+			</ul>
+		</xsl:if>
+	</li>
+</xsl:template>
+
+<xsl:template name="section_navigation">
+	<xsl:if test="$document_previousSection!='' or $document_nextSection!=''">
+		<div class="sectionNav">
+			<xsl:if test="$document_previousSection!=''">
+				<a class="prevSection" href="{$document_previousSection_url}" title="{$document_previousSection_title}"> &lt; Previous Section</a>
+			</xsl:if>
+			<xsl:if test="$document_nextSection!=''">
+				<a class="nextSection" href="{$document_nextSection_url}" title="{$document_nextSection_title}">Next Section &gt;</a>
+			</xsl:if>
+		</div>
+	</xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/xsl/collectDocument2.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/collectDocument2.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/collectDocument2.xsl	(revision 25695)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:gslib="http://www.greenstone.org/skinning"
+  xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:output method="html"/>  
+
+<xsl:template match="/">
+ <html>
+  <head>
+    <title>
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">siteName</xsl:with-param>
+     </xsl:call-template>
+	/
+     <xsl:call-template name="metadataItem">
+      <xsl:with-param name="name">collectionName</xsl:with-param>
+     </xsl:call-template>
+    </title>
+
+	<xsl:copy-of select="$js"/>
+  </head>
+  <body>
+  
+  	<xsl:if test="$document_currentSection/@nodeType = 'root'">
+  		<xsl:attribute name="onload">showContents()</xsl:attribute>
+	</xsl:if>		
+  
+   <div id="container">
+
+    <div id="header">
+     <div class="title_minor">
+	 
+
+
+      <a href="{$library}?a=p&amp;sa=home">
+       <xsl:call-template name="metadataItem">
+        <xsl:with-param name="name">siteName</xsl:with-param>
+       </xsl:call-template>
+      </a>
+      /
+     </div>
+     <div class="title_major">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name">collectionName</xsl:with-param>
+      </xsl:call-template>
+     </div>
+		 
+		 <div id="tablist" class="linklist">
+     		<xsl:call-template name="service_list" />
+		 </div>
+ 
+    </div>
+
+    <div id="content" class="noSidebar">
+	
+		<br/>	
+		
+		<xsl:if test="$document_coverImage_exists='true'">
+			<div class="coverImage">
+				<img src="{$document_coverImage_url}"> </img>
+			</div>
+		</xsl:if>
+		
+		<h1>
+			<xsl:value-of select="$document_title"/>
+		</h1>
+
+		<div id="subServiceList" class="linklist">
+			<ul>
+     			<li> <a href="" target="_blank">view entire document</a></li>
+				<li> <a href="" target="_blank">open in new window</a></li>
+			</ul>
+    	</div>
+		
+		<xsl:choose>
+			<xsl:when test="$document_type='simple'">
+				<div class="documentBody">
+				<xsl:value-of disable-output-escaping='yes' select="$document_currentSection_content" />
+				</div>			
+			</xsl:when>
+			
+			<xsl:when test="$document_type='hierarchy' and $document_is_expanded != 'true'">
+				<a id="contentsLink" onclick="showContents()">contents</a>
+		
+				<div id="contents">				
+					<xsl:call-template name="list_document_content" />
+				</div>
+		
+				<br/><br/>
+		
+				<div class="documentBody">
+						
+					<xsl:choose>
+						<xsl:when test="$document_ancestorSections!=''">
+							<p class="ancestorSections">
+								<xsl:for-each select="$document_ancestorSections_titles">
+									<xsl:value-of select="."/> /
+								</xsl:for-each>
+							</p>
+				
+							<h2 class="subsectionHeader"> <xsl:value-of disable-output-escaping='yes' select="$document_currentSection_title"/> </h2>
+				
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:if test="$document_currentSection/@nodeType != 'root'">
+								<h2> <xsl:value-of disable-output-escaping='yes' select="$document_currentSection_title"/> </h2>
+							</xsl:if>
+						</xsl:otherwise>
+					</xsl:choose>
+		
+					<xsl:call-template name="section_navigation" />
+		
+					<xsl:value-of disable-output-escaping='yes' select="$document_currentSection_content" />
+					
+					<xsl:call-template name="section_navigation" />
+				</div>
+			</xsl:when>
+			
+			
+			
+			<xsl:when test="$document_type='hierarchy' and $document_is_expanded">
+			
+				<xsl:for-each select="$document_allSections">
+					<xsl:variable name="pos" select="position()"/>
+					<xsl:variable name="depth">
+						<xsl:call-template name="document_section_depth">
+							<xsl:with-param name="index" select="$pos" />
+						</xsl:call-template>
+					</xsl:variable>
+			
+					<xsl:element name="h{$depth + 1}">
+					<xsl:call-template name="document_section_title">
+						<xsl:with-param name="index" select="$pos" />
+					</xsl:call-template>				
+					</xsl:element>
+					
+					<xsl:call-template name="document_section_content">
+						<xsl:with-param name="index" select="$pos" />
+					</xsl:call-template>		
+				</xsl:for-each>
+			
+			</xsl:when>
+			
+		</xsl:choose>
+    </div>
+
+   <div id="footer" >
+    <xsl:call-template name="uiItem">
+     <xsl:with-param name="name">collectionFooter</xsl:with-param>
+    </xsl:call-template>
+   </div>
+  </div>
+
+  </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="section_navigation">
+	<xsl:if test="$document_previousSection!='' or $document_nextSection!=''">
+		<div class="sectionNav">
+			<xsl:if test="$document_previousSection!=''">
+				<a class="prevSection" href="{$document_previousSection_url}" title="{$document_previousSection_title}"> &lt; Previous Section</a>
+			</xsl:if>
+			<xsl:if test="$document_nextSection!=''">
+				<a class="nextSection" href="{$document_nextSection_url}" title="{$document_nextSection_title}">Next Section &gt;</a>
+			</xsl:if>
+		</div>
+	</xsl:if>
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/xsl/collectHome.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/collectHome.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/collectHome.xsl	(revision 25695)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+xmlns:gslib="http://www.greenstone.org/skinning">
+
+
+<xsl:import href="./util.xsl"/>
+
+
+
+
+  
+<xsl:template match="/">
+	<html>
+		<head>
+			<title>
+				<gslib:metadataItem name="siteName" /> / <gslib:metadataItem name="collectionName" />
+			</title>
+		<gslib:css/>
+		<gslib:js/>
+	</head>
+	<body>
+		<div id="container">
+
+			<div id="header">
+				<div class="title_minor">
+
+					<a href="{$site_homeUrl}">
+						<gslib:metadataItem name="siteName" />
+					</a>
+				</div>
+				
+				<div class="title_major">
+					<gslib:metadataItem name="collectionName" />
+				</div>
+		 
+				<div id="tablist" class="linklist">
+					<ul>
+						<xsl:for-each select="$services">
+							<li>
+								<a>
+									<xsl:attribute name="href"> <gslib:service_url/> </xsl:attribute>
+									<xsl:attribute name="title"> <gslib:service_description/> </xsl:attribute>
+									<gslib:service_title/>
+								</a>						
+							</li>
+						</xsl:for-each>
+						
+						<li>
+							<a href="{$collection_homeUrl}">
+								Home
+							</a>
+						</li>
+						<li>
+							<a href="http://www.greenstone.org">
+								Greenstone Home
+							</a>
+						</li>
+						
+					</ul>
+				</div>
+		    
+		    </div>
+
+    <div id="content" class="noSidebar">
+		<gslib:uiItem name="collectionAbout" />
+    </div>
+
+   <div id="footer" >
+    	<gslib:uiItem name="collectionFooter" />
+   </div>
+  </div>
+
+  </body>
+ </html>
+</xsl:template>
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/xsl/search.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/search.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/search.xsl	(revision 25695)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:gslib="http://www.greenstone.org/skinning">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:template match="/">
+ <html>
+	<head>
+  		<title>
+			<gslib:metadataItem name="siteName" /> 
+			/ 
+			<gslib:metadataItem name="collectionName" />
+		</title>
+
+		<gslib:css/>
+		<gslib:js/>
+	</head>
+  	<body>
+   		<div id="container">
+
+    	<div id="header">
+					<div class="title_minor">
+
+						<a href="{$site_homeUrl}">
+							<gslib:metadataItem name="siteName" />
+						</a>
+					</div>
+				
+					<div class="title_major">
+						<gslib:metadataItem name="collectionName" />
+					</div>
+			 
+					<div id="tablist" class="linklist">
+						<ul>
+							<xsl:for-each select="$services">
+								<li>
+									<a href="">
+										<xsl:attribute name="href"> <gslib:service_url/> </xsl:attribute>
+										<xsl:attribute name="title"> <gslib:service_description/> </xsl:attribute>
+										<gslib:service_title/>
+									</a>						
+								</li>	
+							</xsl:for-each>
+						<li>
+							<a href="{$collection_homeUrl}">
+								Home
+							</a>
+						</li>							
+						</ul>
+					</div>
+					
+					<div class="quicksearchBox" >
+						<form method="get" name="quickSearch">
+							<input type="text" name="s1.query" value="{$search_query}"/>
+						
+							<input type="submit" value="Quick Search"/>
+							<gslib:search_hiddenInputs/>
+						</form>
+					</div>	
+			    </div>
+
+    			<div id="content" class="noSidebar">
+					
+					<xsl:if test="$search_query != ''">
+						<xsl:choose>
+							<xsl:when test="$search_docsReturned = 0">
+								<div class="searchSummary">    
+									Your search - <em><gslib:search_query/></em> - did not return any results.
+		    					</div> 
+							</xsl:when>
+							<xsl:otherwise>
+		     					<div class="searchSummary">    
+									Results <em><gslib:search_startIndex/></em> to <em><gslib:search_endIndex/></em> 
+									of about <em><gslib:search_docsReturned/></em>
+									for
+									<xsl:for-each select="$search_queryTerms">
+										<a>
+											<xsl:attribute name="title">
+												found in <gslib:search_queryTerm_freq/> documents								
+											</xsl:attribute>
+											<gslib:search_queryTerm_text />
+										</a>
+									</xsl:for-each>
+		    					</div> 
+								
+								<div class="searchResults">
+								<ul>
+									<xsl:for-each select="$search_results">
+										<li class="leafNode">
+											<gslib:metadata name="ancestors_*: *_Title"/> / 
+											<br/>
+											<a>
+												<xsl:attribute name="href"><gslib:documentNode_url/>&amp;ec=1</xsl:attribute>
+												
+												<gslib:documentNode_title/>
+											</a>
+										</li>
+									</xsl:for-each>
+								</ul>
+								</div>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:if>
+				</div>
+
+				<div id="footer" >
+					<gslib:uiItem name="collectionFooter" />
+				</div>
+			</div>
+		</body>
+	</html>
+</xsl:template>
+
+
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/oran/xsl/siteHome.xsl
===================================================================
--- deprecated/ui/skins/oran/xsl/siteHome.xsl	(revision 25695)
+++ deprecated/ui/skins/oran/xsl/siteHome.xsl	(revision 25695)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:gslib="http://www.greenstone.org/skinning">
+
+<xsl:import href="./util.xsl"/>
+
+<xsl:template match="/">
+	<html>
+ 		<head>
+			<title>
+				<gslib:metadataItem name="siteName" /> / <gslib:metadataItem name="collectionName" />
+			</title>
+			
+			<gslib:css/>
+			<gslib:js/>
+  		</head>
+  		<body>
+			<div id="container">
+
+				<div id="header">
+					<div class="title">
+						<gslib:uiItem name="siteHeader" />
+					</div>
+				</div>
+
+				<div id="sidebar" class="index">
+					<xsl:for-each select="$collections">						
+						<div class="itemName">		
+							<a>
+								<xsl:attribute name="href"><gslib:collection_url/></xsl:attribute>
+								<gslib:collection_title/>
+							</a>
+						</div>
+
+					</xsl:for-each>	
+				</div>
+
+    			<div id="content" class="withSidebar">
+     				<gslib:uiItem name="siteAbout" />
+    			</div>
+
+   				<div class="centering" id="footer">
+    				<gslib:uiItem name="siteFooter" />
+  				</div>
+  			</div>
+		</body>
+ 	</html>
+</xsl:template>
+
+</xsl:stylesheet>
Index: deprecated/ui/skins/shiny/home.xsl
===================================================================
--- deprecated/ui/skins/shiny/home.xsl	(revision 25695)
+++ deprecated/ui/skins/shiny/home.xsl	(revision 25695)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  extension-element-prefixes="java util"
+  exclude-result-prefixes="java util">
+
+  <!-- style includes global params interface_name, library_name -->
+  <xsl:include href="style.xsl"/>
+
+  <xsl:output method="html"/>  
+
+  <xsl:template name="pageTitle">
+    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
+  </xsl:template>
+  
+  <!-- page specific style goes here -->
+  <xsl:template name="pageStyle"/>
+
+  <xsl:template match="pageResponse">
+    <xsl:call-template name="greenstonePageBanner"/> 
+    <xsl:apply-templates select="collectionList"/>   
+  </xsl:template>
+
+  <xsl:template match="collectionList">
+    <xsl:for-each select="collection"> 
+      <xsl:variable name="ct"><xsl:choose><xsl:when test="metadataList/metadata[@name='buildType']='mgpp'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
+
+      <p>
+      <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
+	  <img width="150" border="1">
+	    <xsl:attribute name="src">
+	      <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:choose><xsl:when test="displayItem[@name='smallicon']"><xsl:value-of select="displayItem[@name='smallicon']"/></xsl:when><xsl:otherwise><xsl:value-of select="displayItem[@name='icon']"/></xsl:otherwise></xsl:choose>
+	    </xsl:attribute>
+	    <xsl:attribute name="alt">
+	      <xsl:value-of select="displayItem[@name='name']"/>
+	    </xsl:attribute>
+	  </img>
+	</a>
+      </p>
+    </xsl:for-each> 
+    <xsl:call-template name="collWarning"/>
+  </xsl:template> 
+  
+  <xsl:template name="collWarning">
+    <xsl:call-template name="dividerBar"/>	
+    <div>
+      <xsl:value-of select="util:getInterfaceText('classic', /page/@lang, 'home.coll_warning')"/>
+    </div>	
+   </xsl:template>
+</xsl:stylesheet>  
+
+
Index: deprecated/ui/skins/shiny/skin.xml
===================================================================
--- deprecated/ui/skins/shiny/skin.xml	(revision 25695)
+++ deprecated/ui/skins/shiny/skin.xml	(revision 25695)
@@ -0,0 +1,4 @@
+<skin name="default">
+ 
+
+</skin>
Index: deprecated/ui/xslt/error.xsl
===================================================================
--- deprecated/ui/xslt/error.xsl	(revision 25695)
+++ deprecated/ui/xslt/error.xsl	(revision 25695)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output 
+method="xml" 
+encoding="UTF-8" 
+doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
+doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+omit-xml-declaration="yes"
+indent="yes"/>
+
+  
+<xsl:template match="/">
+ <html>
+  <head>
+    <title> Greenstone skinning exception </title>
+  </head>
+  <body>
+   <h1> error </h1>
+   <p> the current skin specified an xslt file that does not exist. Please check that the skin is complete and that it's configuration file (skin.xml) specifies suitable xslt files for all actions. </p>
+  </body>
+ </html>
+</xsl:template>
+
+</xsl:stylesheet>
Index: deprecated/ui/xslt/library.xsl
===================================================================
--- deprecated/ui/xslt/library.xsl	(revision 25695)
+++ deprecated/ui/xslt/library.xsl	(revision 25695)
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+xmlns:gslib="http://www.greenstone.org/XSL/Library"
+exclude-result-prefixes="xalan gslib">
+
+<!-- exclude-result-prefixes="xalan gslib" -->
+
+<!-- general ............................................................................. -->
+
+<xsl:variable name="librarian"></xsl:variable>
+
+<xsl:variable name="action" select="/page/pageRequest/@action"/>
+
+<xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
+
+<xsl:variable name="lang" select="/page/pageRequest/@lang"/>
+
+<xsl:variable name="css">
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link rel="stylesheet" href="{@path}" type="text/css"/>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:variable name="js">
+ <xsl:for-each select="/page/pageResponse/jsFileList/jsFile">
+ 	<script type="text/javascript" src="{@path}"><xsl:comment>IE needs to have an explicity start and end script tag.  This comment is here to ensure the end script tag does not get collapsed into a single open-close in one go element</xsl:comment></script>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+   <xsl:variable name="x" select="/page/pageResponse/metadataList/metadataItem[@name=$name]" />
+
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<!-- get the uiItem for the given name -->
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x" select="/page/pageResponse/uiItemList/uiItem[@name=$name]" />
+  
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<!-- site level stuff ....................................................................... -->
+
+<xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
+
+<xsl:template name="collection_title">
+	<xsl:value-of disable-output-escaping='yes' select="./displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="collection_description">
+	<xsl:value-of disable-output-escaping='yes' select="./displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="collection_url">
+<xsl:value-of select="$librarian" />?a=p&amp;sa=about&amp;
+c=<xsl:value-of select="@name" />
+</xsl:template>
+
+<xsl:variable name="site_homeUrl">
+<xsl:value-of select="$librarian" />?a=p&amp;sa=home
+</xsl:variable>
+
+<!-- collection level stuff ....................................................................... -->
+
+<xsl:variable name="collection" select="/page/pageResponse/collection/@name"/>
+
+<xsl:variable name="collection_homeUrl">
+<xsl:value-of select="$librarian" />?a=p&amp;sa=about&amp;
+c=<xsl:value-of select="$collection"/>
+</xsl:variable>
+
+<xsl:variable name="services" select="/page/pageResponse/collection/serviceList/service[@type='query' or @type='browse']"/>
+
+<xsl:template name="service_title">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="./displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="service_description">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="./displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="service_url">
+	<xsl:variable name="serviceAction">
+   		<xsl:choose>
+			<!-- this hard coding doesnt seem like a good idea: why isnt the appropriate action given as an attribute of the service? -->
+    		<xsl:when test="@type='query'">q</xsl:when>
+    		<xsl:when test="@type='browse'">b</xsl:when>
+    		<xsl:when test="@type='process'">pr</xsl:when>
+    		<xsl:when test="@type='applet'">a</xsl:when>
+    		<xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
+   		</xsl:choose>
+  	</xsl:variable>
+	
+<xsl:value-of select="$librarian"/>?
+a=<xsl:value-of select="$serviceAction"/>&amp;rt=d&amp;
+s=<xsl:value-of select="@name"/>&amp;
+c=<xsl:value-of select="$collection"/>
+</xsl:template>
+
+<xsl:variable name="classifiers" select="/page/pageResponse/collection/serviceList//classifier"/>
+
+<xsl:template name="classifier_title">
+	<xsl:value-of select="./displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="classifier_description">
+	<xsl:value-of select="./displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="classifier_url">
+<xsl:value-of select="$librarian"/>?a=b&amp;rt=r&amp;
+s=<xsl:value-of select="../../@name"/>&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+cl=<xsl:value-of select="@name"/>
+</xsl:template>
+
+<!-- searching ............................................................................. -->
+
+<xsl:variable name="search_hiddenInputs">
+	<input name="a" type="hidden" value="q" />
+    <input name="sa" type="hidden" value="" />
+    <input name="rt" type="hidden" value="rd" />
+    <input name="s" type="hidden" value="TextQuery" />
+    <input name="c" type="hidden" value="{$collection}" />
+    <input name="startPage" type="hidden" value="1" />
+</xsl:variable>
+
+<xsl:variable name="search_docsReturned" select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']" />
+
+<xsl:variable name="search_startIndex" select="'1'"/>
+
+<xsl:variable name="search_endIndex" select="'20'"/>
+
+
+
+<xsl:variable name="search_query" select="/page/pageResponse/metadataList/metadata[@name='query']" />
+
+<xsl:variable name="search_queryTerms" select="/page/pageResponse/termList/term"/>
+
+<xsl:template name="search_queryTerm_text">
+	<xsl:value-of select="./@name"/>
+</xsl:template>
+
+<xsl:template name="search_queryTerm_freq">
+	<xsl:value-of select="./@freq"/>
+</xsl:template>
+
+
+<xsl:variable name="search_results" select="/page/pageResponse/documentNodeList/documentNode"/>
+
+<xsl:template name="metadata">
+	<xsl:param name="name"/>
+	
+	<xsl:value-of disable-output-escaping="yes" select="./metadataList/metadata[@name=$name]" />
+</xsl:template>
+
+<xsl:template name="search_param_li">
+	<xsl:param name="search_param"/>
+		<li>
+			<xsl:for-each select="$search_param/displayItem[@name='name']">
+				<xsl:value-of select="." />				
+			</xsl:for-each>
+			
+			<xsl:choose>
+				
+				<xsl:when test="$search_param/@type='boolean' or $search_param/@type='enum_single'">
+					<select name="s1.{$search_param/@name}">
+						<xsl:for-each select="$search_param/option">
+							<option name="{@name}">
+								<xsl:for-each select="./displayItem[@name='name']">
+									<xsl:value-of select="." />				
+								</xsl:for-each>
+							</option>
+						</xsl:for-each>
+					</select>
+				</xsl:when>
+				
+		
+				<xsl:when test="$search_param/@type='integer'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}"/>			
+				</xsl:when>
+				
+				<xsl:when test="$search_param/@type='invisible'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}" type="hidden"/>			
+				</xsl:when>
+				
+			</xsl:choose>
+  	</li>
+	
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+<!-- browsing ............................................................................. -->
+
+<xsl:variable name="currentClassifier" select="/page/pageResponse/collection/serviceList//classifier[@name = /page/pageResponse/classifier/@name]" />
+
+<xsl:variable name="topLevelClassifierNodes" select="/page/pageResponse/classifier/classifierNode"/>
+
+<xsl:variable name="topLevelClassifierNodeIds" select="/page/pageResponse/classifier/classifierNode/@nodeID"/>
+
+<xsl:template name="classifierNode_title">
+	<xsl:value-of select="./metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+
+<xsl:template name="classifierNode_url">
+
+<xsl:value-of select="$librarian"/>
+?a=b&amp;rt=r&amp;
+s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+cl=<xsl:value-of select="@nodeID" /><xsl:if test="classifierNode|documentNode">.pr</xsl:if>
+
+</xsl:template>
+
+
+<xsl:template name="documentNode_title">
+
+<xsl:value-of select="./metadataList/metadata[@name='Title']"/>
+	
+</xsl:template>
+
+
+<xsl:template name="documentNode_url">
+
+     
+	  
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="@nodeID"/>&amp;
+<!-- dt=<xsl:value-of select="@docType"/>&amp; -->
+sib=1&amp;
+p.a=b&amp;
+p.s=ClassifierBrowse
+
+</xsl:template>
+
+
+
+
+
+
+
+<!-- document viewing..................................................................... -->
+
+<xsl:variable name="document_coverImage_exists" select="/page/pageResponse/document/@hasCoverImage" />
+
+<xsl:variable name="document_coverImage_url">
+	<xsl:if test="$document_coverImage_exists">
+		<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="normalize-space(/page/pageResponse/document/metadataList/metadata[@name='archivedir'])"/>/cover.jpg
+	</xsl:if>
+</xsl:variable>
+
+<xsl:variable name="document_type">
+	<xsl:choose>
+		<xsl:when test="count(/page/pageResponse/document//documentNode) = 1">simple</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of select="/page/pageResponse/document/@docType"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+		
+
+<xsl:variable name="document_hash" select="/page/pageResponse/document/documentNode/@nodeID" />
+
+<xsl:variable name="document_is_expanded" select="/page/pageRequest/paramList/param[@name='ed']/@value=1"/>
+
+<xsl:variable name="document_expanded_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_hash"/>&amp;
+ed=1
+</xsl:variable>
+
+<xsl:variable name="document_collapsed_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_hash"/>
+</xsl:variable>
+
+<xsl:variable name="document_title" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/metadataList/metadata[@name='Title']" />
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_content" >
+	<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/documentNode/nodeContent" />
+</xsl:variable>
+
+<xsl:variable name="document_allSections" select="/page/pageResponse/document//documentNode[@nodeType!='root']" />
+
+<xsl:variable name="document_topLevelNodes" select="/page/pageResponse/document/documentNode/documentNode" />
+
+
+<xsl:variable name="document_topLevelSections" select="/page/pageResponse/document/documentNode/documentNode" />
+
+<xsl:template name="document_section_id">
+	<xsl:value-of select="./@nodeID"/>
+</xsl:template>
+
+<xsl:template name="document_section_title">
+	<xsl:value-of disable-output-escaping='yes' select="./metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+<xsl:template name="document_section_depth">
+	<xsl:value-of select="count(./ancestor::documentNode)"/>
+</xsl:template>
+
+<xsl:template name="document_section_content">
+	<xsl:value-of disable-output-escaping='yes' select="./nodeContent"/>
+</xsl:template>
+
+
+<xsl:variable name="document_currentSection" select="/page/pageResponse/document//nodeContent/.." />
+
+<xsl:variable name="document_currentSection_title" select="$document_currentSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_currentSection_content">
+	<xsl:value-of disable-output-escaping='yes' select="$document_currentSection/nodeContent" />
+</xsl:variable>
+
+<xsl:variable name="document_previousSection" select="$document_currentSection/preceding::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_previousSection_title" select="$document_previousSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_previousSection_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_previousSection/@nodeID"/>&amp;
+sib=1&amp;
+ec=1
+</xsl:variable>
+
+<xsl:variable name="document_nextSection" select="$document_currentSection/following::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_nextSection_title" select="$document_nextSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_nextSection_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_nextSection/@nodeID"/>&amp;
+sib=1&amp;
+ec=1
+</xsl:variable>
+
+<xsl:variable name="document_ancestorSections" select="$document_currentSection/ancestor::documentNode[@nodeType='internal']"/>
+
+<xsl:variable name="document_ancestorSections_titles" select="$document_ancestorSections/metadataList/metadata[@name='Title']"/>
+
+
+
+
+
+
+
+
+<!-- stuff that no-one should need to know about........................................ -->
+
+<!-- produce an exact copy of the current node, but expand and replace all metadataItems and uiItems found within. -->
+<xsl:template name="expandMetadataAndUiItems">
+ <xsl:for-each select="*|text()">
+  <xsl:choose>
+
+    <!-- if node is a metadataItem, expand it -->
+    <xsl:when test="self::node()[self::metadataItem]">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name" disable-output-escaping="yes"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <!-- if node is a uiItem, expand it -->
+    <xsl:when test="self::node()[self::uiItem]">
+      <xsl:call-template name="uiItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name" disable-output-escaping="yes"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="self::text()">
+     <xsl:value-of select="." disable-output-escaping="yes"/>
+    </xsl:when>
+
+    <!-- if a regular node -->
+    <xsl:otherwise>
+     <xsl:variable name="element-name" select="name()"/>
+     <xsl:element name="{$element-name}">
+      <xsl:for-each select="@*">
+       <xsl:variable name="attribute-name" select="name()"/>
+       <xsl:attribute name="{$attribute-name}">
+        <xsl:call-template name="attribute-filter"/>
+       </xsl:attribute>
+      </xsl:for-each>
+      <xsl:call-template name="expandMetadataAndUiItems" />
+     </xsl:element>
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="attribute-filter"><xsl:value-of select="."/></xsl:template>
+
+</xsl:stylesheet>
+
+
Index: deprecated/ui/xslt/preProcess.xsl
===================================================================
--- deprecated/ui/xslt/preProcess.xsl	(revision 25695)
+++ deprecated/ui/xslt/preProcess.xsl	(revision 25695)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+  xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+  xmlns:gslib="http://www.greenstone.org/skinning"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  xmlns:xalan="http://xml.apache.org/xalan"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:xslt="output.xsl"
+  xmlns:gs3="http://www.greenstone.org/gs3"
+  >
+
+  <xsl:output method="xml"/>
+  <xsl:namespace-alias
+    stylesheet-prefix="xslt" result-prefix="xsl"/>
+
+  <xsl:template match="/">
+
+    <!-- explicitly output the stylesheet element here so we can include the
+    namespace declarations. They were going missing before with the new xalan/xerces-->
+    <xslt:stylesheet>
+      
+      <xsl:for-each select="/skinAndLibraryXsl/skinXsl/xsl:stylesheet">
+	
+	<!-- produce an exact copy of skin stylesheet, with gslib nodes expanded. -->
+	<xsl:for-each select="@*">
+	  <xsl:variable name="attribute-name" select="name()"/>
+	  <xsl:attribute name="{$attribute-name}">
+	    <xsl:value-of select="."/>
+	  </xsl:attribute>
+	</xsl:for-each>
+	<!-- merge the attributes of the library stylesheet -->
+	<xsl:for-each select="/skinAndLibraryXsl/libraryXsl/xsl:stylesheet/@*">
+	  <xsl:variable name="attribute-name" select="name()"/>
+	  <xsl:attribute name="{$attribute-name}">
+	    <xsl:value-of select="."/>
+	  </xsl:attribute>
+	</xsl:for-each>
+	
+	<xsl:call-template name="expand_gslib_elements" />
+	
+	<!-- add content of library to the skin stylesheet -->
+	<xsl:for-each select="/skinAndLibraryXsl/libraryXsl/xsl:stylesheet">
+	  <xsl:call-template name="expand_gslib_elements" />
+	</xsl:for-each>
+	
+      </xsl:for-each>
+    </xslt:stylesheet>
+    
+    
+  </xsl:template>
+
+
+  <!-- produce an exact copy of the current node, but expand and replace all elements belonging to the gslib namespace. -->
+  <xsl:template name="expand_gslib_elements">
+
+
+    <xsl:for-each select="*|text()">
+      <xsl:choose>
+	
+	
+	<!-- if node has gslib prefix, expand it into appropriate copy-of or call-template element -->
+	<xsl:when test="namespace-uri(.)=namespace::gslib">
+	  
+	  <xsl:variable name="name" select="local-name()"/>
+	  <xsl:choose>
+	    
+	    <!-- if library contains a variable of this name, expand to it's value -->
+	    <xsl:when test="/skinAndLibraryXsl/libraryXsl//xsl:variable[@name = $name]">
+	      <xsl:element name="xsl:copy-of">
+		<xsl:attribute name="select">$<xsl:value-of select="local-name()" /></xsl:attribute>
+	      </xsl:element>
+	    </xsl:when>
+	    
+	    
+	    <!-- if library contains a template of this name, expand to a call-template and pass attributes as parameters -->
+	    <xsl:otherwise>
+	      <xsl:element name="xsl:call-template">
+		<xsl:attribute name="name"> <xsl:value-of select="local-name()" /></xsl:attribute>
+		
+		<xsl:for-each select="@*">
+		  <xsl:element name="xsl:with-param">
+		    <xsl:attribute name="name"><xsl:value-of select="name()"/></xsl:attribute>
+		    <xsl:call-template name="convert_attVal_to_valueOf" />
+		  </xsl:element>					
+		</xsl:for-each>	
+	      </xsl:element>
+	    </xsl:otherwise>
+	    
+	  </xsl:choose>	
+	</xsl:when>
+
+	<xsl:when test="self::text()">
+	  <xsl:value-of select="."/>
+	</xsl:when>
+
+	<!-- if a regular node v2 -->
+	<xsl:otherwise>
+	  <xsl:variable name="element-name" select="name()"/>
+	  <xsl:variable name="element-namespace" select="namespace-uri()"/>
+	  <xsl:element name="{$element-name}" namespace="{$element-namespace}">
+	    <xsl:for-each select="@*">
+	      <xsl:variable name="attribute-name" select="name()"/>
+	      <xsl:attribute name="{$attribute-name}">
+		<xsl:value-of select="."/>
+	      </xsl:attribute>
+	    </xsl:for-each>
+	    <xsl:call-template name="expand_gslib_elements" />
+	  </xsl:element>
+	</xsl:otherwise>
+	
+	
+      </xsl:choose>
+    </xsl:for-each>
+
+  </xsl:template>
+
+  <!-- converts an attribute value (the current node) into either a literal value or an <xsl:value-of> element -->
+  <xsl:template name="convert_attVal_to_valueOf">
+
+    <xsl:choose>
+      <!-- if attribute is not literal (starts with a "{") -->
+      <xsl:when test="starts-with(string(), '&#123;')">
+	<xsl:element name="xsl:value-of">
+	  <xsl:attribute name="disable-output-escaping">yes</xsl:attribute>
+	  <xsl:attribute name="select"><xsl:value-of select="substring(string(),2,string-length()-2)"/></xsl:attribute>
+	</xsl:element>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="."/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="create_dummy_variables">
+    <xsl:for-each select="//*[namespace-uri()=namespace::gslib]">
+      <xsl:element name="xsl:variable">
+	<xsl:attribute name="name">
+	  <xsl:value-of select="local-name()"/>
+	</xsl:attribute>
+      </xsl:element>	
+    </xsl:for-each>
+  </xsl:template>
+  
+  
+</xsl:stylesheet>
Index: deprecated/ui/xslt/temp/page.xml
===================================================================
--- deprecated/ui/xslt/temp/page.xml	(revision 25695)
+++ deprecated/ui/xslt/temp/page.xml	(revision 25695)
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml-stylesheet type="text/xsl" href="style.xsl"?>
+
+<page lang="en" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/gsf">
+  <pageRequest action="b" lang="en" output="html" to="" type="page" uid="1">
+    <paramList>
+      <param name="rt" value="r" />
+      <param name="s" value="ClassifierBrowse" />
+      <param name="c" value="paho" />
+      <param name="cl" value="CL2" /></paramList>
+  </pageRequest>
+
+  <pageResponse>
+    <service name="ClassifierBrowse" type="browse">
+      <displayItem name="name">Browse</displayItem>
+
+      <displayItem name="description">Browse pre-defined classification hierarchies</displayItem>
+
+      <classifierList>
+        <classifier content="Title" name="CL1">
+          <displayItem name="name">titles</displayItem>
+
+          <displayItem name="description">Browse by Title</displayItem>
+        </classifier>
+
+        <classifier content="Subject" name="CL2">
+          <displayItem name="name">subjects</displayItem>
+
+          <displayItem name="description">Browse by Subject</displayItem>
+        </classifier>
+
+        <classifier content="Organization" name="CL3">
+          <displayItem name="name">organisations</displayItem>
+
+          <displayItem name="description">Browse by Organisation</displayItem>
+        </classifier>
+      </classifierList>
+    </service>
+
+    <classifier name="CL2" nodeID="CL2">
+      <classifierNode nodeID="CL2.1">
+        <metadataList>
+          <metadata name="Title">ESPAÑOL</metadata>
+        </metadataList>
+      </classifierNode>
+
+      <classifierNode nodeID="CL2.2">
+        <metadataList>
+
+          <metadata name="Title">ENGLISH</metadata>
+        </metadataList>
+      </classifierNode>
+    </classifier>
+
+    <languageList>
+    <language name="en">
+      <displayItem name="name">English</displayItem>
+
+    </language>
+    <language name="fr">
+      <displayItem name="name">Français</displayItem>
+    </language>
+    <language name="es">
+      <displayItem name="name">Español</displayItem>
+    </language>
+    <language name="jp">
+
+      <displayItem name="name">????</displayItem>
+    </language>
+  </languageList>
+
+    <collection name="paho">
+      <displayItem lang="en" name="smallicon">pahosml.gif</displayItem>
+
+      <displayItem lang="en" name="description">The Virtual Disaster Library was developed in November 1999, by PAHO/WHO (Pan American Health Organization / Regional Office of the World Health Organization). It contains 250 publications (25,000 pages) of experiences, ideas and solutions to advance the cause of disaster reduction.</displayItem>
+
+      <displayItem lang="en" name="name">Virtual Disaster Library</displayItem>
+
+      <displayItem lang="en" name="icon">paho.gif</displayItem>
+
+      <serviceList>
+        <service name="DocumentStructureRetrieve" type="retrieve" />
+        <service name="DocumentMetadataRetrieve" type="retrieve" />
+        <service name="DocumentContentRetrieve" type="retrieve" />
+
+        <service name="ClassifierBrowse" type="browse">
+          <displayItem name="name">Browse</displayItem>
+
+          <displayItem name="description">Browse pre-defined classification hierarchies</displayItem>
+
+          <classifierList>
+            <classifier content="Title" name="CL1">
+              <displayItem name="name">titles</displayItem>
+
+              <displayItem name="description">Browse by Title</displayItem>
+            </classifier>
+
+            <classifier content="Subject" name="CL2">
+              <displayItem name="name">subjects</displayItem>
+
+              <displayItem name="description">Browse by Subject</displayItem>
+            </classifier>
+
+            <classifier content="Organization" name="CL3">
+              <displayItem name="name">organisations</displayItem>
+
+              <displayItem name="description">Browse by Organisation</displayItem>
+            </classifier>
+          </classifierList>
+        </service>
+
+        <service name="ClassifierBrowseMetadataRetrieve" type="retrieve" />
+        <service name="TextQuery" type="query">
+          <displayItem name="name">Text Search</displayItem>
+
+          <displayItem name="submit">Search</displayItem>
+
+          <displayItem name="description">Full text and/or metadata search service</displayItem>
+        </service>
+
+      </serviceList>
+
+      <metadataList>
+        <metadata name="creator">kjm18@cs.waikato.ac.nz</metadata>
+
+        <metadata name="public">true</metadata>
+
+        <metadata name="numDocs">272</metadata>
+
+        <metadata name="buildType">mg</metadata>
+
+        <metadata name="httpPath">http://localhost:8080/greenstone3/sites/localsite/collect/paho</metadata>
+
+        <metadata name="tidyoption">untidy</metadata>
+      </metadataList>
+
+      <pluginList /></collection>
+
+    <cssFileList>
+      <cssFile path="./ui/skins/oran/css/oran.css" />
+      <cssFile path="./sites/localsite/collect/paho/ui/css/style.css" /></cssFileList>
+
+    <jsFileList>
+      <jsFile path="./ui/skins/oran/js/scripts.js" /></jsFileList>
+
+    <uiItemList>
+      <uiItem lang="en" name="siteFooter">
+  		Powered by Greenstone
+  	</uiItem>
+
+      <uiItem name="collectionFooter">
+			Powered by Greenstone.
+    </uiItem>
+
+      <uiItem name="siteHeader">
+  		<metadataItem name="siteName" />
+  	</uiItem>
+
+      <uiItem inherit="false" lang="en" name="collectionAbout">
+      <p>
+
+        <metadataItem name="collectionDescription" /> 
+      </p>
+
+      <h1> About PAHO </h1>
+      <div class="rightBox">
+       <img src="./sites/localsite/collect/paho/ui/img/paho.gif"> </img>
+      </div> 
+
+      <p>
+	The <a href="http://www.paho.org/">Pan American Health Organization (PAHO)</a> is an international public health 	 agency with 100 years of experience in working to improve health and living standards of the countries of the 		Americas. It serves as the specialized organization for health of the Inter-American System. It also serves as the 		Regional Office for the Americas of the World Health Organization and enjoys international recognition as part of 		the United Nations system.
+      </p>
+
+      <h1> About WHO </h1>
+
+      <div class="rightBox">
+       <img src="./sites/localsite/collect/paho/ui/img/who.gif" style="padding: 5px"> </img>
+      </div>
+      <p>
+	The <a href="http://www.who.int">World Health Organization (WHO)</a> is the directing and coordinating authority for 		health within the United Nations system. It is responsible for providing leadership on global health matters,
+        shaping the health research agenda, setting norms and standards, articulating evidence-based policy options, 
+        providing technical support to countries and monitoring and assessing health trends.
+      </p>
+
+      <p style="text-align:center">
+	<img src="./sites/localsite/collect/paho/ui/img/disaster.jpg"> </img>
+      </p>
+    </uiItem>
+
+      <uiItem name="collectionHeader">
+    	<metadataItem name="siteName" />/<metadataItem name="collectionName" />
+    </uiItem>
+
+      <uiItem lang="en" name="siteAbout">
+    	<h1> About this site </h1>
+		  <p> <metadataItem name="siteDescription" /> </p>
+		  <p> I wish I had a lorem ipsum thingie right now... ah well, wikipedias entry on lorum ipsum will do the trick.</p>
+		  <h1> Lorem Ipsum </h1>
+
+		  <p>
+			  In publishing and graphic design, lorem ipsum is standard placeholder text used to demonstrate the graphic
+			  elements of a document or visual presentation, such as font, typography, and layout. Lorem ipsum also serves 
+			  as placeholder text in mock-ups of visual design projects before the actual words are inserted into the finished
+			  product. When used in this manner, it is often called greeking.
+		  </p>
+		  <p>
+				Even though using &quot;lorem ipsum&quot; often arouses curiosity due to its resemblance to classical Latin, it is not 
+				intended to have meaning. Where text is visible in a document, people tend to focus on the textual content 
+				rather than upon overall presentation, so publishers use lorem ipsum when displaying a typeface or design in 
+				order to direct the focus to presentation. &quot;Lorem ipsum&quot; also approximates a typical distribution of letters 
+				in English, which helps to shift the focus to presentation.
+		  </p>
+		  <p>
+
+				The most common lorem ipsum text reads as follows:
+		  </p>
+		  <p><em>
+				Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore 
+				magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 
+				consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
+				Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 
+			</em></p>
+    </uiItem>
+    </uiItemList>
+
+    <metadataList>
+      <metadataItem lang="en" name="siteDescription"> 
+	This is just a random site for testing stuff
+  </metadataItem>
+
+      <metadataItem name="collectionDocuments">250</metadataItem>
+
+      <metadataItem name="siteAdmin"> dnk2@cs.waikato.ac.nz </metadataItem>
+
+      <metadataItem name="collectionBuilt">19 December 1999</metadataItem>
+
+      <metadataItem lang="en" name="collectionName">Virtual Disaster Library</metadataItem>
+
+      <metadataItem name="collectionPages">25,000</metadataItem>
+
+      <metadataItem lang="en" name="siteName">Dave&apos;s Development Site</metadataItem>
+
+      <metadataItem lang="en" name="collectionDescription"> 
+	The Virtual Disaster Library was developed in November 1999, by PAHO/WHO 
+        (Pan American Health Organization / Regional Office of the World Health Organization). 
+        It contains <metadataItem name="collectionDocuments" /> publications (<metadataItem name="collectionPages" /> pages) 
+        of experiences, ideas and solutions to advance the cause of disaster reduction.
+  </metadataItem>
+
+    </metadataList>
+
+    <Skin skinLocation="/research/dnk2/greenstone/greenstone3/web/ui/skins/oran" /></pageResponse>
+</page>
+
Index: deprecated/ui/xslt/temp/style.xsl
===================================================================
--- deprecated/ui/xslt/temp/style.xsl	(revision 25695)
+++ deprecated/ui/xslt/temp/style.xsl	(revision 25695)
@@ -0,0 +1,577 @@
+<xsl:stylesheet version="1.0" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xalan="http://xml.apache.org/xalan" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html" />  
+
+<xsl:template match="/">
+	<html>
+		<head>
+			<title>
+				<xsl:call-template name="metadataItem"><xsl:with-param name="name">siteName</xsl:with-param></xsl:call-template> 
+				/ 
+				<xsl:call-template name="metadataItem"><xsl:with-param name="name">collectionName</xsl:with-param></xsl:call-template>
+    		</title>
+
+			<xsl:copy-of select="$css" />
+			<xsl:copy-of select="$js" />
+
+  		</head>
+  		<body>
+   			<div id="container">
+
+    			<div id="header">
+					<div class="title_minor">
+
+						<a href="{$site_homeUrl}">
+							<xsl:call-template name="metadataItem"><xsl:with-param name="name">siteName</xsl:with-param></xsl:call-template>
+
+						</a>
+					</div>
+				
+					<div class="title_major">
+						<xsl:call-template name="metadataItem"><xsl:with-param name="name">collectionName</xsl:with-param></xsl:call-template>
+					</div>
+			 
+					<div class="linklist" id="tablist">
+						<ul>
+							<xsl:for-each select="$serviceNames">
+
+								<li>
+									<a href="">
+										<xsl:attribute name="href"> <xsl:call-template name="service_url"><xsl:with-param name="serviceName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template> </xsl:attribute>
+										<xsl:attribute name="title"> <xsl:call-template name="service_description"><xsl:with-param name="serviceName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template> </xsl:attribute>
+										<xsl:call-template name="service_title"><xsl:with-param name="serviceName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template>
+									</a>						
+								</li>
+
+							</xsl:for-each>
+						</ul>
+					</div>
+			    </div>
+	
+	    		<div class="noSidebar" id="content">
+	    			<div class="linklist" id="subServiceList">
+						<ul>
+							<xsl:for-each select="$classifierNames">
+								<li>
+
+									<xsl:choose>
+										<xsl:when test=". = $currentClassifierName">
+											<xsl:call-template name="classifier_title"><xsl:with-param name="clsName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template>
+										</xsl:when>
+										<xsl:otherwise>
+											<a>
+												<xsl:attribute name="title"><xsl:call-template name="classifier_description"><xsl:with-param name="clsName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template></xsl:attribute>
+												<xsl:attribute name="href"><xsl:call-template name="classifier_url"><xsl:with-param name="clsName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template></xsl:attribute>
+										
+												<xsl:call-template name="classifier_title"><xsl:with-param name="clsName"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template>									
+											</a>
+
+										</xsl:otherwise>
+									</xsl:choose>
+								</li>						
+							</xsl:for-each>
+						</ul>
+	    			</div>
+			
+					<div id="classifierData">
+						<ul>
+							<xsl:for-each select="$topLevelClassifierNodes">
+
+								<li>
+									<a>
+										blah
+									</a>
+								</li>
+							</xsl:for-each>
+						</ul>
+					</div>
+	    		</div>
+
+	
+				<div id="footer">
+					<xsl:call-template name="uiItem"><xsl:with-param name="name">collectionFooter</xsl:with-param></xsl:call-template> 
+				</div>
+			</div>
+		</body>
+	</html>
+</xsl:template>
+
+<xsl:template name="displayClassifierNode">
+	<li>
+
+		<a>
+			<xsl:attribute name="href"><xsl:call-template name="classifierNode_url"><xsl:with-param name="id"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template></xsl:attribute>
+			<xsl:call-template name="classifierNode_title"><xsl:with-param name="id"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template>
+		</a>
+		
+		<xsl:variable name="childIds"><xsl:call-template name="classifierNode_childNodeIds"><xsl:with-param name="id"><xsl:value-of disable-output-escaping="yes" select="." /></xsl:with-param></xsl:call-template></xsl:variable>
+		
+		<xsl:for-each select="$childIds">
+			<xsl:call-template name="displayClassifierNode" />
+		</xsl:for-each>
+	</li>
+
+</xsl:template>
+
+
+
+
+
+
+
+
+
+<xsl:variable name="librarian">dev</xsl:variable>
+
+<xsl:variable name="action" select="/page/pageRequest/@action" />
+
+<xsl:variable name="subaction" select="/page/pageRequest/@subaction" />
+
+<xsl:variable name="lang" select="/page/pageRequest/@lang" />
+
+<xsl:variable name="css">
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link href="{@path}" rel="stylesheet" type="text/css" />
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:variable name="js">
+ <xsl:for-each select="/page/pageResponse/jsFileList/jsFile">
+ 	<script src="{@path}" type="text/javascript" />
+
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name" />
+
+   <xsl:variable name="x" select="/page/pageResponse/metadataList/metadataItem[@name=$name]" />
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem &apos;<xsl:value-of select="$name" />&apos; not defined.
+   </xsl:when>
+
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+
+<xsl:template name="uiItem">
+
+  <xsl:param name="name" />
+
+  <xsl:variable name="x" select="/page/pageResponse/uiItemList/uiItem[@name=$name]" />
+  
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem &apos;<xsl:value-of select="$name" />&apos; not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+
+
+<xsl:variable name="collectionNames" select="/page/pageResponse/collectionList/collection/@name" />
+
+<xsl:template name="collection_title">
+	<xsl:param name="name" />
+
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='name']" />
+</xsl:template>
+
+<xsl:template name="collection_description">
+	<xsl:param name="name" />
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='description']" />
+</xsl:template>
+
+<xsl:template name="collection_url">
+	<xsl:param name="name" />
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=about&amp;c=
+	<xsl:value-of select="$name" />
+
+</xsl:template>
+
+<xsl:variable name="site_homeUrl">
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=home
+</xsl:variable>
+
+
+
+<xsl:variable name="collection" select="/page/pageResponse/collection/@name" />
+
+<xsl:variable name="serviceNames" select="/page/pageResponse/collection/serviceList/service[@type='query' or @type='browse']/@name" />
+
+<xsl:template name="service_title">
+
+	<xsl:param name="serviceName" />
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='name']" />
+</xsl:template>
+
+<xsl:template name="service_description">
+	<xsl:param name="serviceName" />
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='description']" />
+</xsl:template>
+
+<xsl:template name="service_url">
+	<xsl:param name="serviceName" />
+	
+	
+	<xsl:variable name="service" select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]" />
+
+	<xsl:variable name="serviceAction">
+   	<xsl:choose>
+		
+    	<xsl:when test="$service/@type='query'">q</xsl:when>
+    	<xsl:when test="$service/@type='browse'">b</xsl:when>
+    	<xsl:when test="$service/@type='process'">pr</xsl:when>
+    	<xsl:when test="$service/@type='applet'">a</xsl:when>
+    	<xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
+
+   		</xsl:choose>
+  	</xsl:variable>
+	
+	<xsl:value-of select="$librarian" />?a=
+	<xsl:value-of select="$serviceAction" />&amp;rt=d&amp;s=
+	<xsl:value-of select="$serviceName" />&amp;c=
+	<xsl:value-of select="$collection" />
+</xsl:template>
+
+<xsl:variable name="classifierNames" select="/page/pageResponse/collection/serviceList//classifier/@name" />
+
+<xsl:template name="classifier_title">
+	<xsl:param name="clsName" />
+
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='name']" />
+</xsl:template>
+
+<xsl:template name="classifier_description">
+	<xsl:param name="clsName" />
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='description']" />
+</xsl:template>
+
+<xsl:template name="classifier_url">
+	<xsl:param name="clsName" />
+	<xsl:value-of select="$librarian" />
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/../../@name" />
+
+	&amp;c=
+	<xsl:value-of select="$collection" />
+	&amp;cl=
+	<xsl:value-of select="$clsName" />
+</xsl:template>
+
+
+
+
+<xsl:template name="hidden_search_params">
+	<input name="c" type="hidden" value="{$collection}" /> 
+	<input name="a" type="hidden" value="q" /> 
+	<input name="s" type="hidden" value="TextQuery" /> 
+</xsl:template>
+
+<xsl:template name="search_param_li">
+	<xsl:param name="search_param" />
+		<li>
+			<xsl:for-each select="$search_param/displayItem[@name='name']">
+						<xsl:value-of select="." />				
+			</xsl:for-each>
+			
+			<xsl:choose>
+				
+				<xsl:when test="$search_param/@type='boolean' or $search_param/@type='enum_single'">
+					<select name="s1.{$search_param/@name}">
+
+						<xsl:for-each select="$search_param/option">
+							<option name="{@name}">
+								<xsl:for-each select="./displayItem[@name='name']">
+									<xsl:value-of select="." />				
+								</xsl:for-each>
+							</option>
+						</xsl:for-each>
+					</select>
+				</xsl:when>
+
+				
+		
+				<xsl:when test="$search_param/@type='integer'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}" />			
+				</xsl:when>
+				
+				<xsl:when test="$search_param/@type='invisible'">
+					<input name="s1.{$search_param/@name}" type="hidden" value="{$search_param/@default}" />			
+				</xsl:when>
+				
+			</xsl:choose>
+  	</li>
+	
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<xsl:variable name="currentClassifierName" select="/page/pageResponse/classifier/@name" />
+
+<xsl:variable name="topLevelClassifierNodes" select="/page/pageResponse/classifier/classifierNode" />
+
+<xsl:variable name="topLevelClassifierNodeIds" select="/page/pageResponse/classifier/classifierNode/@nodeID" />
+
+<xsl:template name="classifierNode_title">
+	<xsl:value-of select="./metadataList/metadata[@name='Title']" />
+</xsl:template>
+
+<xsl:template name="classifierNode_url">
+	<xsl:param name="id" />
+
+	<xsl:value-of select="$librarian" />
+
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/service/@name" />
+	&amp;c=
+	<xsl:value-of select="$collection" />
+	&amp;cl=
+	<xsl:value-of select="$id" />
+</xsl:template>
+
+<xsl:template name="classifierNode_childNodeIds">
+	<xsl:param name="id" />
+	<xsl:value-of select="/page/pageResponse/classifier//classifierNode[@nodeID=$id]/classifierNode/@nodeID" />
+
+</xsl:template>
+
+<xsl:template name="list_classifer_data">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/classifier/classifierNode">
+			<xsl:call-template name="expand_classifier_node" />
+		</xsl:for-each>
+		<xsl:for-each select="/page/pageResponse/classifier/documentNode">
+			<li class="leafNode">
+				
+				<xsl:call-template name="documentNode" />
+
+			</li>
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_classifier_node">
+	<xsl:choose>
+		
+		<xsl:when test="classifierNode or documentNode">
+			
+	 		<li class="expandedNode">
+				
+				<xsl:call-template name="classifierNode" />
+
+			 	
+				<xsl:if test="classifierNode">
+				<ul>
+					<xsl:for-each select="classifierNode">
+						<xsl:call-template name="expand_classifier_node" />
+					</xsl:for-each>	
+				</ul>
+				</xsl:if>
+				<xsl:if test="documentNode">
+					<ul>
+
+						<xsl:for-each select="documentNode">
+							<li class="leafNode">
+								
+								<xsl:call-template name="documentNode" />
+							</li>
+						</xsl:for-each>
+					</ul>
+				</xsl:if>			
+			</li>
+		</xsl:when>
+
+		<xsl:otherwise>
+			<li class="collapsedNode">
+				
+				<xsl:call-template name="classifierNode" />
+			</li>
+		</xsl:otherwise>
+	</xsl:choose> 
+</xsl:template>
+
+
+
+<xsl:variable name="document_coverImage_exists" select="/page/pageResponse/document/@hasCoverImage" />
+
+<xsl:variable name="document_coverImage_url">
+	<xsl:if test="$document_coverImage_exists">
+		<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']" />/index/assoc/<xsl:value-of select="normalize-space(/page/pageResponse/document/metadataList/metadata[@name='archivedir'])" />/cover.jpg
+	</xsl:if>
+</xsl:variable>
+
+<xsl:variable name="document_type" select="/page/pageResponse/document/@docType" />
+
+<xsl:variable name="document_hash" select="/page/pageResponse/document/documentNode/@nodeID" />
+
+<xsl:variable name="document_is_expanded" select="/page/pageRequest/paramList/param[@name='ed']/@value=1" />
+
+<xsl:variable name="document_expanded_url">
+
+	<xsl:value-of select="$librarian" />?a=d&amp;
+	c=<xsl:value-of select="$collection" />&amp;
+	d=<xsl:value-of select="$document_hash" />&amp;
+	ed=1
+</xsl:variable>
+
+<xsl:variable name="document_collapsed_url">
+	<xsl:value-of select="$librarian" />?a=d&amp;
+
+	c=<xsl:value-of select="$collection" />&amp;
+	d=<xsl:value-of select="$document_hash" />
+</xsl:variable>
+
+<xsl:variable name="document_title">
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/document/metadataList/metadata[@name='Title']" />
+		</xsl:when>
+
+		<xsl:otherwise>
+			<xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']" />
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_content">
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of select="$document_currentSection_content" />
+
+		</xsl:when>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_allSectionIds" select="/page/pageResponse/document//documentNode[@nodeType!='root']" />
+
+<xsl:variable name="document_topLevelSectionIds" select="/page/pageResponse/document/documentNode/documentNode" />
+
+<xsl:template name="document_section_title">
+	<xsl:param name="sectionId" />
+	<xsl:value-of disable-output-escaping="yes" select="//page/pageResponse/document//documentNode[@nodeID=$sectionId]/metadataList/metadata[@name='Title']" />
+</xsl:template>
+
+
+<xsl:variable name="document_currentSection" select="/page/pageResponse/document//nodeContent/.." />
+
+<xsl:variable name="document_currentSection_title" select="$document_currentSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_currentSection_content" select="$document_currentSection/nodeContent" />
+
+<xsl:variable name="document_previousSection" select="$document_currentSection/preceding::documentNode[@nodeType='leaf'][1]" />
+
+<xsl:variable name="document_previousSection_title" select="$document_previousSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_previousSection_url">
+	<xsl:value-of select="$librarian" />?a=d&amp;
+	c=<xsl:value-of select="$collection" />&amp;
+
+	d=<xsl:value-of select="$document_previousSection/@nodeID" />&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_nextSection" select="$document_currentSection/following::documentNode[@nodeType='leaf'][1]" />
+
+<xsl:variable name="document_nextSection_title" select="$document_nextSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_nextSection_url">
+	<xsl:value-of select="$librarian" />?a=d&amp;
+	c=<xsl:value-of select="$collection" />&amp;
+
+	d=<xsl:value-of select="$document_nextSection/@nodeID" />&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_ancestorSections" select="$document_currentSection/ancestor::documentNode[@nodeType='internal']" />
+
+<xsl:variable name="document_ancestorSections_titles" select="$document_ancestorSections/metadataList/metadata[@name='Title']" />
+
+
+
+
+<xsl:template name="expandMetadataAndUiItems">
+ <xsl:for-each select="*|text()">
+
+  <xsl:choose>
+
+    
+    <xsl:when test="self::node()[self::metadataItem]">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    
+    <xsl:when test="self::node()[self::uiItem]">
+      <xsl:call-template name="uiItem">
+
+       <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="self::text()">
+     <xsl:value-of select="." />
+    </xsl:when>
+
+    
+    <xsl:otherwise>
+     <xsl:variable name="element-name" select="name()" />
+
+     <xsl:element name="{$element-name}">
+      <xsl:for-each select="@*">
+       <xsl:variable name="attribute-name" select="name()" />
+       <xsl:attribute name="{$attribute-name}">
+        <xsl:call-template name="attribute-filter" />
+       </xsl:attribute>
+      </xsl:for-each>
+      <xsl:call-template name="expandMetadataAndUiItems" />
+     </xsl:element>
+
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="attribute-filter"><xsl:value-of select="." /></xsl:template>
+
+<xsl:template match="gslib:blah">
+	 <p> Blah </p> 
+</xsl:template>
+
+
+
+</xsl:stylesheet>
+
Index: deprecated/ui/xslt/util.xsl
===================================================================
--- deprecated/ui/xslt/util.xsl	(revision 25695)
+++ deprecated/ui/xslt/util.xsl	(revision 25695)
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" 
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+xmlns:gslib="http://www.greenstone.org/XSL/Library" 
+xmlns:xalan="http://xml.apache.org/xalan"
+xmlns="http://www.w3.org/1999/xhtml">
+
+
+<xsl:output 
+method="xml" 
+encoding="UTF-8" 
+doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
+doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+omit-xml-declaration="yes"
+indent="yes"/>
+
+<!-- general ............................................................................. -->
+
+<xsl:variable name="librarian"></xsl:variable>
+
+<xsl:variable name="action" select="/page/pageRequest/@action"/>
+
+<xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
+
+<xsl:variable name="lang" select="/page/pageRequest/@lang"/>
+
+<xsl:variable name="css">
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link rel="stylesheet" href="{@path}" type="text/css" />
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:variable name="js">
+ <xsl:for-each select="/page/pageResponse/jsFileList/jsFile">
+ 	<script type="text/javascript" src="{@path}"></script>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+   <xsl:variable name="x" select="/page/pageResponse/metadataList/metadataItem[@name=$name]" />
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<!-- get the uiItem for the given name -->
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x" select="/page/pageResponse/uiItemList/uiItem[@name=$name]" />
+  
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<!-- site level stuff ....................................................................... -->
+
+<xsl:variable name="collectionNames" select="/page/pageResponse/collectionList/collection/@name"/>
+
+<xsl:template name="collection_title">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="collection_description">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="collection_url">
+	<xsl:param name="name"/>
+	<xsl:value-of select="$librarian" />
+?a=p&amp;sa=about&amp;c=
+	<xsl:value-of select="$name" />
+</xsl:template>
+
+<xsl:variable name="site_homeUrl">
+	<xsl:value-of select="$librarian" />
+?a=p&amp;sa=home
+</xsl:variable>
+
+<!-- collection level stuff ....................................................................... -->
+
+<xsl:variable name="collection" select="/page/pageResponse/collection/@name"/>
+
+<xsl:variable name="serviceNames" select="/page/pageResponse/collection/serviceList/service[@type='query' or @type='browse']/@name"/>
+
+<xsl:template name="service_title">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="service_description">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="service_url">
+	<xsl:param name="serviceName"/>
+	
+	
+	<xsl:variable name="service" select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]"/>
+	<xsl:variable name="serviceAction">
+   	<xsl:choose>
+		<!-- this hard coding doesnt seem like a good idea: why isnt the appropriate action given as an attribute of the service? -->
+    	<xsl:when test="$service/@type='query'">q</xsl:when>
+    	<xsl:when test="$service/@type='browse'">b</xsl:when>
+    	<xsl:when test="$service/@type='process'">pr</xsl:when>
+    	<xsl:when test="$service/@type='applet'">a</xsl:when>
+    	<xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
+   		</xsl:choose>
+  	</xsl:variable>
+	
+<xsl:value-of select="$librarian"/>?
+a=<xsl:value-of select="$serviceAction"/>&amp;rt=d&amp;
+s=<xsl:value-of select="$serviceName"/>&amp;
+c=<xsl:value-of select="$collection"/>
+</xsl:template>
+
+<xsl:variable name="classifierNames" select="/page/pageResponse/collection/serviceList//classifier/@name"/>
+
+<xsl:template name="classifier_title">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="classifier_description">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="classifier_url">
+<xsl:param name="clsName"/>
+<xsl:value-of select="$librarian"/>?a=b&amp;rt=r&amp;
+s=<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/../../@name"/>&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+cl=<xsl:value-of select="$clsName"/>
+</xsl:template>
+
+
+<!-- searching ............................................................................. -->
+
+<xsl:template name="hidden_search_params">
+	<input name="c" value="{$collection}" type="hidden"/> 
+	<input name="a" value="q" type="hidden"/> 
+	<input name="s" value="TextQuery" type="hidden"/> 
+</xsl:template>
+
+<xsl:template name="search_param_li">
+	<xsl:param name="search_param"/>
+		<li>
+			<xsl:for-each select="$search_param/displayItem[@name='name']">
+						<xsl:value-of select="." />				
+			</xsl:for-each>
+			
+			<xsl:choose>
+				
+				<xsl:when test="$search_param/@type='boolean' or $search_param/@type='enum_single'">
+					<select name="s1.{$search_param/@name}">
+						<xsl:for-each select="$search_param/option">
+							<option name="{@name}">
+								<xsl:for-each select="./displayItem[@name='name']">
+									<xsl:value-of select="." />				
+								</xsl:for-each>
+							</option>
+						</xsl:for-each>
+					</select>
+				</xsl:when>
+				
+		
+				<xsl:when test="$search_param/@type='integer'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}"/>			
+				</xsl:when>
+				
+				<xsl:when test="$search_param/@type='invisible'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}" type="hidden"/>			
+				</xsl:when>
+				
+			</xsl:choose>
+  	</li>
+	
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- browsing ............................................................................. -->
+
+<xsl:variable name="currentClassifierName" select="/page/pageResponse/classifier/@name" />
+
+<xsl:variable name="topLevelClassifierNodes" select="/page/pageResponse/classifier/classifierNode"/>
+
+
+<xsl:variable name="topLevelClassifierNodeIds" select="/page/pageResponse/classifier/classifierNode/@nodeID"/>
+
+<!--
+<xsl:template name="classifierNode_title">
+	<xsl:param name="id"/>
+	<xsl:value-of select="/page/pageResponse/classifier//classifierNode[@nodeID=$id]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+-->
+
+<xsl:template name="classifierNode_url">
+	<xsl:param name="id"/>
+
+<xsl:value-of select="$librarian"/>?a=b&amp;rt=r&amp;
+s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+cl=<xsl:value-of select="$id" /><xsl:if test="classifierNode|documentNode">.pr</xsl:if>
+
+</xsl:template>
+
+<xsl:template name="classifierNode_childNodeIds">
+	<xsl:param name="id"/>
+	<xsl:value-of select="xalan:nodeset(/page/pageResponse/classifier//classifierNode[@nodeID=$id])/classifierNode/@nodeID"/>
+</xsl:template>
+
+
+
+
+
+<xsl:template name="list_classifer_data">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/classifier/classifierNode">
+			<xsl:call-template name="expand_classifier_node" />
+		</xsl:for-each>
+		<xsl:for-each select="/page/pageResponse/classifier/documentNode">
+			<li class="leafNode">
+				<!-- call format statement for docuement node -->
+				<xsl:call-template name="documentNode" />
+			</li>
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_classifier_node">
+	<xsl:choose>
+		
+		<xsl:when test="classifierNode or documentNode">
+			<!-- if there are children -->
+	 		<li class="expandedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			 	
+				<xsl:if test="classifierNode">
+				<ul>
+					<xsl:for-each select="classifierNode">
+						<xsl:call-template name="expand_classifier_node"/>
+					</xsl:for-each>	
+				</ul>
+				</xsl:if>
+				<xsl:if test="documentNode">
+					<ul>
+						<xsl:for-each select="documentNode">
+							<li class="leafNode">
+								<!-- call format statement for docuement node -->
+								<xsl:call-template name="documentNode" />
+							</li>
+						</xsl:for-each>
+					</ul>
+				</xsl:if>			
+			</li>
+		</xsl:when>
+		<xsl:otherwise>
+			<li class="collapsedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			</li>
+		</xsl:otherwise>
+	</xsl:choose> 
+</xsl:template>
+
+<!-- document viewing..................................................................... -->
+
+<xsl:variable name="document_coverImage_exists" select="/page/pageResponse/document/@hasCoverImage" />
+
+<xsl:variable name="document_coverImage_url">
+	<xsl:if test="$document_coverImage_exists">
+		<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="normalize-space(/page/pageResponse/document/metadataList/metadata[@name='archivedir'])"/>/cover.jpg
+	</xsl:if>
+</xsl:variable>
+
+<xsl:variable name="document_type" select="/page/pageResponse/document/@docType"/>
+
+<xsl:variable name="document_hash" select="/page/pageResponse/document/documentNode/@nodeID" />
+
+<xsl:variable name="document_is_expanded" select="/page/pageRequest/paramList/param[@name='ed']/@value=1"/>
+
+<xsl:variable name="document_expanded_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_hash"/>&amp;
+ed=1
+</xsl:variable>
+
+<xsl:variable name="document_collapsed_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_hash"/>
+</xsl:variable>
+
+<xsl:variable name="document_title" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/metadataList/metadata[@name='Title']" />
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_content" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of select="$document_currentSection_content" />
+		</xsl:when>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_allSectionIds" select="/page/pageResponse/document//documentNode[@nodeType!='root']" />
+
+<xsl:variable name="document_topLevelSectionIds" select="/page/pageResponse/document/documentNode/documentNode" />
+
+<xsl:template name="document_section_title">
+	<xsl:param name="sectionId" />
+	<xsl:value-of disable-output-escaping='yes' select="//page/pageResponse/document//documentNode[@nodeID=$sectionId]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+<!--
+<xsl:template name="document_section_depth">
+	<xsl:param name="index" />
+	<xsl:value-of select="count($document_allSections[$index]/ancestor::documentNode)"/>
+</xsl:template>
+
+<xsl:template name="document_section_content">
+	<xsl:param name="index" />
+	<xsl:value-of disable-output-escaping='yes' select="$document_allSections[$index]/nodeContent"/>
+</xsl:template>
+
+-->
+
+<xsl:variable name="document_currentSection" select="/page/pageResponse/document//nodeContent/.." />
+
+<xsl:variable name="document_currentSection_title" select="$document_currentSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_currentSection_content" select="$document_currentSection/nodeContent" />
+
+<xsl:variable name="document_previousSection" select="$document_currentSection/preceding::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_previousSection_title" select="$document_previousSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_previousSection_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_previousSection/@nodeID"/>&amp;
+sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_nextSection" select="$document_currentSection/following::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_nextSection_title" select="$document_nextSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_nextSection_url">
+<xsl:value-of select="$librarian"/>?a=d&amp;
+c=<xsl:value-of select="$collection"/>&amp;
+d=<xsl:value-of select="$document_nextSection/@nodeID"/>&amp;
+sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_ancestorSections" select="$document_currentSection/ancestor::documentNode[@nodeType='internal']"/>
+<xsl:variable name="document_ancestorSections_titles" select="$document_ancestorSections/metadataList/metadata[@name='Title']"/>
+
+<xsl:template name="list_document_content">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/document/documentNode/documentNode">
+			<xsl:call-template name="expand_doc_content_node" />
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_doc_content_node">
+	<xsl:variable name="class">
+		<xsl:choose>
+			<xsl:when test="@nodeType='leaf'">leaf</xsl:when>
+			<xsl:otherwise>collapsed</xsl:otherwise>
+		</xsl:choose>	
+	</xsl:variable>
+
+	<li class="{$class}" id="{@nodeID}" >
+		<xsl:choose>
+			<xsl:when test="nodeContent">
+				<span id="currentSection">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</span>
+			</xsl:when>
+			<xsl:when test="@nodeType='leaf'">
+				<a href="{$librarian}?a=d&amp;c={$collection}&amp;d={@nodeID}&amp;sib=1&amp;ec=1">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a onclick="toggleNode('{@nodeID}')">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+		
+		<xsl:if test="documentNode">
+			<ul>
+				<xsl:for-each select="documentNode">
+					<xsl:call-template name="expand_doc_content_node" />
+				</xsl:for-each>
+			</ul>	
+		</xsl:if>
+	</li>
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- stuff that no-one should need to know about........................................ -->
+
+<!-- produce an exact copy of the current node, but expand and replace all metadataItems and uiItems found within. -->
+<xsl:template name="expandMetadataAndUiItems">
+ <xsl:for-each select="*|text()">
+  <xsl:choose>
+
+    <!-- if node is a metadataItem, expand it -->
+    <xsl:when test="self::node()[self::metadataItem]">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <!-- if node is a uiItem, expand it -->
+    <xsl:when test="self::node()[self::uiItem]">
+      <xsl:call-template name="uiItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="self::text()">
+     <xsl:value-of select="."/>
+    </xsl:when>
+
+    <!-- if a regular node -->
+    <xsl:otherwise>
+     <xsl:variable name="element-name" select="name()"/>
+     <xsl:element name="{$element-name}">
+      <xsl:for-each select="@*">
+       <xsl:variable name="attribute-name" select="name()"/>
+       <xsl:attribute name="{$attribute-name}">
+        <xsl:call-template name="attribute-filter"/>
+       </xsl:attribute>
+      </xsl:for-each>
+      <xsl:call-template name="expandMetadataAndUiItems" />
+     </xsl:element>
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="attribute-filter"><xsl:value-of select="."/></xsl:template>
+
+<xsl:template match="gslib:blah">
+	 <p> Blah </p> 
+</xsl:template>
+
+
+
+</xsl:stylesheet>
+
+
Index: deprecated/ui/xslt/util2.xsl/util.xsl
===================================================================
--- deprecated/ui/xslt/util2.xsl/util.xsl	(revision 25695)
+++ deprecated/ui/xslt/util2.xsl/util.xsl	(revision 25695)
@@ -0,0 +1,512 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
+
+<!-- general ............................................................................. -->
+
+<xsl:variable name="librarian">dev</xsl:variable>
+
+<xsl:variable name="action" select="/page/pageRequest/@action"/>
+
+<xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
+
+<xsl:variable name="lang" select="/page/pageRequest/@lang"/>
+
+<xsl:variable name="css">
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link rel="stylesheet" href="{@path}" type="text/css"/>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:variable name="js">
+ <xsl:for-each select="/page/pageResponse/jsFileList/jsFile">
+ 	<script type="text/javascript" src="{@path}"></script>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+   <xsl:variable name="x" select="/page/pageResponse/metadataList/metadataItem[@name=$name]" />
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<!-- get the uiItem for the given name -->
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x" select="/page/pageResponse/uiItemList/uiItem[@name=$name]" />
+  
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<!-- site level stuff ....................................................................... -->
+
+<xsl:variable name="collectionNames" select="/page/pageResponse/collectionList/collection/@name"/>
+
+<xsl:template name="collection_title">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="collection_description">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="collection_url">
+	<xsl:param name="name"/>
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=about&amp;c=
+	<xsl:value-of select="$name" />
+</xsl:template>
+
+<xsl:variable name="site_homeUrl">
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=home
+</xsl:variable>
+
+<!-- collection level stuff ....................................................................... -->
+
+<xsl:variable name="collection" select="/page/pageResponse/collection/@name"/>
+
+<xsl:variable name="serviceNames" select="/page/pageResponse/collection/serviceList/service[@type='query' or @type='browse']/@name"/>
+
+<xsl:template name="service_title">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="service_description">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="service_url">
+	<xsl:param name="serviceName"/>
+	
+	
+	<xsl:variable name="service" select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]"/>
+	<xsl:variable name="serviceAction">
+   	<xsl:choose>
+		<!-- this hard coding doesnt seem like a good idea: why isnt the appropriate action given as an attribute of the service? -->
+    	<xsl:when test="$service/@type='query'">q</xsl:when>
+    	<xsl:when test="$service/@type='browse'">b</xsl:when>
+    	<xsl:when test="$service/@type='process'">pr</xsl:when>
+    	<xsl:when test="$service/@type='applet'">a</xsl:when>
+    	<xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
+   		</xsl:choose>
+  	</xsl:variable>
+	
+	<xsl:value-of select="$librarian"/>?a=
+	<xsl:value-of select="$serviceAction"/>&amp;rt=d&amp;s=
+	<xsl:value-of select="$serviceName"/>&amp;c=
+	<xsl:value-of select="$collection"/>
+</xsl:template>
+
+<xsl:variable name="classifierNames" select="/page/pageResponse/collection/serviceList//classifier/@name"/>
+
+<xsl:template name="classifier_title">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="classifier_description">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="classifier_url">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="$librarian"/>
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/../../@name"/>
+	&amp;c=
+	<xsl:value-of select="$collection"/>
+	&amp;cl=
+	<xsl:value-of select="$clsName"/>
+</xsl:template>
+
+
+<!-- searching ............................................................................. -->
+
+<xsl:template name="hidden_search_params">
+	<input name="c" value="{$collection}" type="hidden"/> 
+	<input name="a" value="q" type="hidden"/> 
+	<input name="s" value="TextQuery" type="hidden"/> 
+</xsl:template>
+
+<xsl:template name="search_param_li">
+	<xsl:param name="search_param"/>
+		<li>
+			<xsl:for-each select="$search_param/displayItem[@name='name']">
+						<xsl:value-of select="." />				
+			</xsl:for-each>
+			
+			<xsl:choose>
+				
+				<xsl:when test="$search_param/@type='boolean' or $search_param/@type='enum_single'">
+					<select name="s1.{$search_param/@name}">
+						<xsl:for-each select="$search_param/option">
+							<option name="{@name}">
+								<xsl:for-each select="./displayItem[@name='name']">
+									<xsl:value-of select="." />				
+								</xsl:for-each>
+							</option>
+						</xsl:for-each>
+					</select>
+				</xsl:when>
+				
+		
+				<xsl:when test="$search_param/@type='integer'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}"/>			
+				</xsl:when>
+				
+				<xsl:when test="$search_param/@type='invisible'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}" type="hidden"/>			
+				</xsl:when>
+				
+			</xsl:choose>
+  	</li>
+	
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- browsing ............................................................................. -->
+
+<xsl:variable name="currentClassifierName" select="/page/pageResponse/classifier/@name" />
+
+<xsl:variable name="topLevelClassifierNodes" select="/page/pageResponse/classifier/classifierNode"/>
+
+
+<xsl:variable name="topLevelClassifierNodeIds" select="/page/pageResponse/classifier/classifierNode/@nodeID"/>
+
+<!--
+<xsl:template name="classifierNode_title">
+	<xsl:param name="id"/>
+	<xsl:value-of select="/page/pageResponse/classifier//classifierNode[@nodeID=$id]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+-->
+
+<xsl:template name="classifierNode_url">
+	<xsl:param name="id"/>
+
+	<xsl:value-of select="$librarian"/>
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/service/@name"/>
+	&amp;c=
+	<xsl:value-of select="$collection"/>
+	&amp;cl=
+	<xsl:value-of select="$id" />
+</xsl:template>
+
+<xsl:template name="classifierNode_childNodeIds">
+	<xsl:param name="id"/>
+	<xsl:value-of select="xalan:nodeset(/page/pageResponse/classifier//classifierNode[@nodeID=$id])/classifierNode/@nodeID"/>
+</xsl:template>
+
+
+
+
+
+<xsl:template name="list_classifer_data">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/classifier/classifierNode">
+			<xsl:call-template name="expand_classifier_node" />
+		</xsl:for-each>
+		<xsl:for-each select="/page/pageResponse/classifier/documentNode">
+			<li class="leafNode">
+				<!-- call format statement for docuement node -->
+				<xsl:call-template name="documentNode" />
+			</li>
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_classifier_node">
+	<xsl:choose>
+		
+		<xsl:when test="classifierNode or documentNode">
+			<!-- if there are children -->
+	 		<li class="expandedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			 	
+				<xsl:if test="classifierNode">
+				<ul>
+					<xsl:for-each select="classifierNode">
+						<xsl:call-template name="expand_classifier_node"/>
+					</xsl:for-each>	
+				</ul>
+				</xsl:if>
+				<xsl:if test="documentNode">
+					<ul>
+						<xsl:for-each select="documentNode">
+							<li class="leafNode">
+								<!-- call format statement for docuement node -->
+								<xsl:call-template name="documentNode" />
+							</li>
+						</xsl:for-each>
+					</ul>
+				</xsl:if>			
+			</li>
+		</xsl:when>
+		<xsl:otherwise>
+			<li class="collapsedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			</li>
+		</xsl:otherwise>
+	</xsl:choose> 
+</xsl:template>
+
+<!-- document viewing..................................................................... -->
+
+<xsl:variable name="document_coverImage_exists" select="/page/pageResponse/document/@hasCoverImage" />
+
+<xsl:variable name="document_coverImage_url">
+	<xsl:if test="$document_coverImage_exists">
+		<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="normalize-space(/page/pageResponse/document/metadataList/metadata[@name='archivedir'])"/>/cover.jpg
+	</xsl:if>
+</xsl:variable>
+
+<xsl:variable name="document_type" select="/page/pageResponse/document/@docType"/>
+
+<xsl:variable name="document_hash" select="/page/pageResponse/document/documentNode/@nodeID" />
+
+<xsl:variable name="document_is_expanded" select="/page/pageRequest/paramList/param[@name='ed']/@value=1"/>
+
+<xsl:variable name="document_expanded_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_hash"/>&amp;
+	ed=1
+</xsl:variable>
+
+<xsl:variable name="document_collapsed_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_hash"/>
+</xsl:variable>
+
+<xsl:variable name="document_title" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/metadataList/metadata[@name='Title']" />
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_content" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of select="$document_currentSection_content" />
+		</xsl:when>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_allSectionIds" select="/page/pageResponse/document//documentNode[@nodeType!='root']" />
+
+<xsl:variable name="document_topLevelSectionIds" select="/page/pageResponse/document/documentNode/documentNode" />
+
+<xsl:template name="document_section_title">
+	<xsl:param name="sectionId" />
+	<xsl:value-of disable-output-escaping='yes' select="//page/pageResponse/document//documentNode[@nodeID=$sectionId]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+<!--
+<xsl:template name="document_section_depth">
+	<xsl:param name="index" />
+	<xsl:value-of select="count($document_allSections[$index]/ancestor::documentNode)"/>
+</xsl:template>
+
+<xsl:template name="document_section_content">
+	<xsl:param name="index" />
+	<xsl:value-of disable-output-escaping='yes' select="$document_allSections[$index]/nodeContent"/>
+</xsl:template>
+
+-->
+
+<xsl:variable name="document_currentSection" select="/page/pageResponse/document//nodeContent/.." />
+
+<xsl:variable name="document_currentSection_title" select="$document_currentSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_currentSection_content" select="$document_currentSection/nodeContent" />
+
+<xsl:variable name="document_previousSection" select="$document_currentSection/preceding::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_previousSection_title" select="$document_previousSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_previousSection_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_previousSection/@nodeID"/>&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_nextSection" select="$document_currentSection/following::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_nextSection_title" select="$document_nextSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_nextSection_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_nextSection/@nodeID"/>&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_ancestorSections" select="$document_currentSection/ancestor::documentNode[@nodeType='internal']"/>
+<xsl:variable name="document_ancestorSections_titles" select="$document_ancestorSections/metadataList/metadata[@name='Title']"/>
+
+<xsl:template name="list_document_content">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/document/documentNode/documentNode">
+			<xsl:call-template name="expand_doc_content_node" />
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_doc_content_node">
+	<xsl:variable name="class">
+		<xsl:choose>
+			<xsl:when test="@nodeType='leaf'">leaf</xsl:when>
+			<xsl:otherwise>collapsed</xsl:otherwise>
+		</xsl:choose>	
+	</xsl:variable>
+
+	<li class="{$class}" id="{@nodeID}" >
+		<xsl:choose>
+			<xsl:when test="nodeContent">
+				<span id="currentSection">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</span>
+			</xsl:when>
+			<xsl:when test="@nodeType='leaf'">
+				<a href="{$librarian}?a=d&amp;c={$collection}&amp;d={@nodeID}&amp;sib=1&amp;ec=1">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a onclick="toggleNode('{@nodeID}')">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+		
+		<xsl:if test="documentNode">
+			<ul>
+				<xsl:for-each select="documentNode">
+					<xsl:call-template name="expand_doc_content_node" />
+				</xsl:for-each>
+			</ul>	
+		</xsl:if>
+	</li>
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- stuff that no-one should need to know about........................................ -->
+
+<!-- produce an exact copy of the current node, but expand and replace all metadataItems and uiItems found within. -->
+<xsl:template name="expandMetadataAndUiItems">
+ <xsl:for-each select="*|text()">
+  <xsl:choose>
+
+    <!-- if node is a metadataItem, expand it -->
+    <xsl:when test="self::node()[self::metadataItem]">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <!-- if node is a uiItem, expand it -->
+    <xsl:when test="self::node()[self::uiItem]">
+      <xsl:call-template name="uiItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="self::text()">
+     <xsl:value-of select="."/>
+    </xsl:when>
+
+    <!-- if a regular node -->
+    <xsl:otherwise>
+     <xsl:variable name="element-name" select="name()"/>
+     <xsl:element name="{$element-name}">
+      <xsl:for-each select="@*">
+       <xsl:variable name="attribute-name" select="name()"/>
+       <xsl:attribute name="{$attribute-name}">
+        <xsl:call-template name="attribute-filter"/>
+       </xsl:attribute>
+      </xsl:for-each>
+      <xsl:call-template name="expandMetadataAndUiItems" />
+     </xsl:element>
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="attribute-filter"><xsl:value-of select="."/></xsl:template>
+
+<xsl:template match="gslib:blah">
+	 <p> Blah </p> 
+</xsl:template>
+
+
+
+</xsl:stylesheet>
+
+
Index: deprecated/ui/xslt/util2.xsl/util2.xsl
===================================================================
--- deprecated/ui/xslt/util2.xsl/util2.xsl	(revision 25695)
+++ deprecated/ui/xslt/util2.xsl/util2.xsl	(revision 25695)
@@ -0,0 +1,512 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan">
+
+<!-- general ............................................................................. -->
+
+<xsl:variable name="librarian">dev</xsl:variable>
+
+<xsl:variable name="action" select="/page/pageRequest/@action"/>
+
+<xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
+
+<xsl:variable name="lang" select="/page/pageRequest/@lang"/>
+
+<xsl:variable name="css">
+ <xsl:for-each select="/page/pageResponse/cssFileList/cssFile">
+  <link rel="stylesheet" href="{@path}" type="text/css"/>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:variable name="js">
+ <xsl:for-each select="/page/pageResponse/jsFileList/jsFile">
+ 	<script type="text/javascript" src="{@path}"></script>
+ </xsl:for-each>
+</xsl:variable>
+
+<xsl:template name="metadataItem">
+  <xsl:param name="name"/>
+
+   <xsl:variable name="x" select="/page/pageResponse/metadataList/metadataItem[@name=$name]" />
+
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    metadataItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+  
+</xsl:template>
+
+<!-- get the uiItem for the given name -->
+<xsl:template name="uiItem">
+  <xsl:param name="name"/>
+
+  <xsl:variable name="x" select="/page/pageResponse/uiItemList/uiItem[@name=$name]" />
+  
+  <xsl:choose>
+   <xsl:when test="$x = ''">
+    uiItem '<xsl:value-of select="$name"/>' not defined.
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:for-each select="$x">
+     <xsl:call-template name="expandMetadataAndUiItems" />
+    </xsl:for-each>
+   </xsl:otherwise>
+  </xsl:choose>
+
+</xsl:template>
+
+<!-- site level stuff ....................................................................... -->
+
+<xsl:variable name="collectionNames" select="/page/pageResponse/collectionList/collection/@name"/>
+
+<xsl:template name="collection_title">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="collection_description">
+	<xsl:param name="name"/>
+	<xsl:value-of select="/page/pageResponse/collectionList/collection[@name=$name]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="collection_url">
+	<xsl:param name="name"/>
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=about&amp;c=
+	<xsl:value-of select="$name" />
+</xsl:template>
+
+<xsl:variable name="site_homeUrl">
+	<xsl:value-of select="$librarian" />
+	?a=p&amp;sa=home
+</xsl:variable>
+
+<!-- collection level stuff ....................................................................... -->
+
+<xsl:variable name="collection" select="/page/pageResponse/collection/@name"/>
+
+<xsl:variable name="serviceNames" select="/page/pageResponse/collection/serviceList/service[@type='query' or @type='browse']/@name"/>
+
+<xsl:template name="service_title">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="service_description">
+	<xsl:param name="serviceName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="service_url">
+	<xsl:param name="serviceName"/>
+	
+	
+	<xsl:variable name="service" select="/page/pageResponse/collection/serviceList/service[@name=$serviceName]"/>
+	<xsl:variable name="serviceAction">
+   	<xsl:choose>
+		<!-- this hard coding doesnt seem like a good idea: why isnt the appropriate action given as an attribute of the service? -->
+    	<xsl:when test="$service/@type='query'">q</xsl:when>
+    	<xsl:when test="$service/@type='browse'">b</xsl:when>
+    	<xsl:when test="$service/@type='process'">pr</xsl:when>
+    	<xsl:when test="$service/@type='applet'">a</xsl:when>
+    	<xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
+   		</xsl:choose>
+  	</xsl:variable>
+	
+	<xsl:value-of select="$librarian"/>?a=
+	<xsl:value-of select="$serviceAction"/>&amp;rt=d&amp;s=
+	<xsl:value-of select="$serviceName"/>&amp;c=
+	<xsl:value-of select="$collection"/>
+</xsl:template>
+
+<xsl:variable name="classifierNames" select="/page/pageResponse/collection/serviceList//classifier/@name"/>
+
+<xsl:template name="classifier_title">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="classifier_description">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/displayItem[@name='description']"/>
+</xsl:template>
+
+<xsl:template name="classifier_url">
+	<xsl:param name="clsName"/>
+	<xsl:value-of select="$librarian"/>
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/collection/serviceList//classifier[@name=$clsName]/../../@name"/>
+	&amp;c=
+	<xsl:value-of select="$collection"/>
+	&amp;cl=
+	<xsl:value-of select="$clsName"/>
+</xsl:template>
+
+
+<!-- searching ............................................................................. -->
+
+<xsl:template name="hidden_search_params">
+	<input name="c" value="{$collection}" type="hidden"/> 
+	<input name="a" value="q" type="hidden"/> 
+	<input name="s" value="TextQuery" type="hidden"/> 
+</xsl:template>
+
+<xsl:template name="search_param_li">
+	<xsl:param name="search_param"/>
+		<li>
+			<xsl:for-each select="$search_param/displayItem[@name='name']">
+						<xsl:value-of select="." />				
+			</xsl:for-each>
+			
+			<xsl:choose>
+				
+				<xsl:when test="$search_param/@type='boolean' or $search_param/@type='enum_single'">
+					<select name="s1.{$search_param/@name}">
+						<xsl:for-each select="$search_param/option">
+							<option name="{@name}">
+								<xsl:for-each select="./displayItem[@name='name']">
+									<xsl:value-of select="." />				
+								</xsl:for-each>
+							</option>
+						</xsl:for-each>
+					</select>
+				</xsl:when>
+				
+		
+				<xsl:when test="$search_param/@type='integer'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}"/>			
+				</xsl:when>
+				
+				<xsl:when test="$search_param/@type='invisible'">
+					<input name="s1.{$search_param/@name}" value="{$search_param/@default}" type="hidden"/>			
+				</xsl:when>
+				
+			</xsl:choose>
+  	</li>
+	
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- browsing ............................................................................. -->
+
+<xsl:variable name="currentClassifierName" select="/page/pageResponse/classifier/@name" />
+
+<xsl:variable name="topLevelClassifierNodes" select="/page/pageResponse/classifier/classifierNode"/>
+
+
+<xsl:variable name="topLevelClassifierNodeIds" select="/page/pageResponse/classifier/classifierNode/@nodeID"/>
+
+<!--
+<xsl:template name="classifierNode_title">
+	<xsl:param name="id"/>
+	<xsl:value-of select="/page/pageResponse/classifier//classifierNode[@nodeID=$id]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+-->
+
+<xsl:template name="classifierNode_url">
+	<xsl:param name="id"/>
+
+	<xsl:value-of select="$librarian"/>
+	?a=b&amp;rt=r&amp;s=
+	<xsl:value-of select="/page/pageResponse/service/@name"/>
+	&amp;c=
+	<xsl:value-of select="$collection"/>
+	&amp;cl=
+	<xsl:value-of select="$id" />
+</xsl:template>
+
+<xsl:template name="classifierNode_childNodeIds">
+	<xsl:param name="id"/>
+	<xsl:value-of select="xalan:nodeset(/page/pageResponse/classifier//classifierNode[@nodeID=$id])/classifierNode/@nodeID"/>
+</xsl:template>
+
+
+
+
+
+<xsl:template name="list_classifer_data">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/classifier/classifierNode">
+			<xsl:call-template name="expand_classifier_node" />
+		</xsl:for-each>
+		<xsl:for-each select="/page/pageResponse/classifier/documentNode">
+			<li class="leafNode">
+				<!-- call format statement for docuement node -->
+				<xsl:call-template name="documentNode" />
+			</li>
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_classifier_node">
+	<xsl:choose>
+		
+		<xsl:when test="classifierNode or documentNode">
+			<!-- if there are children -->
+	 		<li class="expandedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			 	
+				<xsl:if test="classifierNode">
+				<ul>
+					<xsl:for-each select="classifierNode">
+						<xsl:call-template name="expand_classifier_node"/>
+					</xsl:for-each>	
+				</ul>
+				</xsl:if>
+				<xsl:if test="documentNode">
+					<ul>
+						<xsl:for-each select="documentNode">
+							<li class="leafNode">
+								<!-- call format statement for docuement node -->
+								<xsl:call-template name="documentNode" />
+							</li>
+						</xsl:for-each>
+					</ul>
+				</xsl:if>			
+			</li>
+		</xsl:when>
+		<xsl:otherwise>
+			<li class="collapsedNode">
+				<!-- call format statement for classifier node -->
+				<xsl:call-template name="classifierNode" />
+			</li>
+		</xsl:otherwise>
+	</xsl:choose> 
+</xsl:template>
+
+<!-- document viewing..................................................................... -->
+
+<xsl:variable name="document_coverImage_exists" select="/page/pageResponse/document/@hasCoverImage" />
+
+<xsl:variable name="document_coverImage_url">
+	<xsl:if test="$document_coverImage_exists">
+		<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="normalize-space(/page/pageResponse/document/metadataList/metadata[@name='archivedir'])"/>/cover.jpg
+	</xsl:if>
+</xsl:variable>
+
+<xsl:variable name="document_type" select="/page/pageResponse/document/@docType"/>
+
+<xsl:variable name="document_hash" select="/page/pageResponse/document/documentNode/@nodeID" />
+
+<xsl:variable name="document_is_expanded" select="/page/pageRequest/paramList/param[@name='ed']/@value=1"/>
+
+<xsl:variable name="document_expanded_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_hash"/>&amp;
+	ed=1
+</xsl:variable>
+
+<xsl:variable name="document_collapsed_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_hash"/>
+</xsl:variable>
+
+<xsl:variable name="document_title" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/metadataList/metadata[@name='Title']" />
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:value-of disable-output-escaping='yes' select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_content" >
+	<xsl:choose>
+		<xsl:when test="$document_type='simple'">
+			<xsl:value-of select="$document_currentSection_content" />
+		</xsl:when>
+	</xsl:choose>
+</xsl:variable>
+
+<xsl:variable name="document_allSectionIds" select="/page/pageResponse/document//documentNode[@nodeType!='root']" />
+
+<xsl:variable name="document_topLevelSectionIds" select="/page/pageResponse/document/documentNode/documentNode" />
+
+<xsl:template name="document_section_title">
+	<xsl:param name="sectionId" />
+	<xsl:value-of disable-output-escaping='yes' select="//page/pageResponse/document//documentNode[@nodeID=$sectionId]/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+<!--
+<xsl:template name="document_section_depth">
+	<xsl:param name="index" />
+	<xsl:value-of select="count($document_allSections[$index]/ancestor::documentNode)"/>
+</xsl:template>
+
+<xsl:template name="document_section_content">
+	<xsl:param name="index" />
+	<xsl:value-of disable-output-escaping='yes' select="$document_allSections[$index]/nodeContent"/>
+</xsl:template>
+
+-->
+
+<xsl:variable name="document_currentSection" select="/page/pageResponse/document//nodeContent/.." />
+
+<xsl:variable name="document_currentSection_title" select="$document_currentSection/metadataList/metadata[@name='Title']" />
+
+<xsl:variable name="document_currentSection_content" select="$document_currentSection/nodeContent" />
+
+<xsl:variable name="document_previousSection" select="$document_currentSection/preceding::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_previousSection_title" select="$document_previousSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_previousSection_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_previousSection/@nodeID"/>&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_nextSection" select="$document_currentSection/following::documentNode[@nodeType='leaf'][1]"/>
+
+<xsl:variable name="document_nextSection_title" select="$document_nextSection/metadataList/metadata[@name='Title']"/>
+
+<xsl:variable name="document_nextSection_url">
+	<xsl:value-of select="$librarian"/>?a=d&amp;
+	c=<xsl:value-of select="$collection"/>&amp;
+	d=<xsl:value-of select="$document_nextSection/@nodeID"/>&amp;
+	sib=1&amp;ec=1
+</xsl:variable>
+
+<xsl:variable name="document_ancestorSections" select="$document_currentSection/ancestor::documentNode[@nodeType='internal']"/>
+<xsl:variable name="document_ancestorSections_titles" select="$document_ancestorSections/metadataList/metadata[@name='Title']"/>
+
+<xsl:template name="list_document_content">
+	<ul>
+		<xsl:for-each select="/page/pageResponse/document/documentNode/documentNode">
+			<xsl:call-template name="expand_doc_content_node" />
+		</xsl:for-each>
+	</ul>
+</xsl:template>
+
+<xsl:template name="expand_doc_content_node">
+	<xsl:variable name="class">
+		<xsl:choose>
+			<xsl:when test="@nodeType='leaf'">leaf</xsl:when>
+			<xsl:otherwise>collapsed</xsl:otherwise>
+		</xsl:choose>	
+	</xsl:variable>
+
+	<li class="{$class}" id="{@nodeID}" >
+		<xsl:choose>
+			<xsl:when test="nodeContent">
+				<span id="currentSection">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</span>
+			</xsl:when>
+			<xsl:when test="@nodeType='leaf'">
+				<a href="{$librarian}?a=d&amp;c={$collection}&amp;d={@nodeID}&amp;sib=1&amp;ec=1">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a onclick="toggleNode('{@nodeID}')">
+					<xsl:value-of disable-output-escaping='yes' select="metadataList/metadata[@name='Title']"/>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+		
+		<xsl:if test="documentNode">
+			<ul>
+				<xsl:for-each select="documentNode">
+					<xsl:call-template name="expand_doc_content_node" />
+				</xsl:for-each>
+			</ul>	
+		</xsl:if>
+	</li>
+</xsl:template>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- stuff that no-one should need to know about........................................ -->
+
+<!-- produce an exact copy of the current node, but expand and replace all metadataItems and uiItems found within. -->
+<xsl:template name="expandMetadataAndUiItems">
+ <xsl:for-each select="*|text()">
+  <xsl:choose>
+
+    <!-- if node is a metadataItem, expand it -->
+    <xsl:when test="self::node()[self::metadataItem]">
+      <xsl:call-template name="metadataItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <!-- if node is a uiItem, expand it -->
+    <xsl:when test="self::node()[self::uiItem]">
+      <xsl:call-template name="uiItem">
+       <xsl:with-param name="name"><xsl:value-of select="@name"/></xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+
+    <xsl:when test="self::text()">
+     <xsl:value-of select="."/>
+    </xsl:when>
+
+    <!-- if a regular node -->
+    <xsl:otherwise>
+     <xsl:variable name="element-name" select="name()"/>
+     <xsl:element name="{$element-name}">
+      <xsl:for-each select="@*">
+       <xsl:variable name="attribute-name" select="name()"/>
+       <xsl:attribute name="{$attribute-name}">
+        <xsl:call-template name="attribute-filter"/>
+       </xsl:attribute>
+      </xsl:for-each>
+      <xsl:call-template name="expandMetadataAndUiItems" />
+     </xsl:element>
+    </xsl:otherwise>
+  </xsl:choose>
+ </xsl:for-each>
+
+</xsl:template>
+
+<xsl:template name="attribute-filter"><xsl:value-of select="."/></xsl:template>
+
+<xsl:template match="gslib:blah">
+	 <p> Blah </p> 
+</xsl:template>
+
+
+
+</xsl:stylesheet>
+
+
