Index: greenstone3/trunk/web/interfaces/oran/transform/about.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/about.xsl	(revision 19855)
+++ 	(revision )
@@ -1,97 +1,0 @@
-<?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"/>	
-	
-	<!-- the main page layout template is here -->
-	<xsl:template match="page">
-		<html>
-			<head>
-				<title>
-					<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-					<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-				</title>
-
-				<xsl:call-template name="globalStyle"/>
-				<xsl:call-template name="pageStyle"/>
-
-			</head>
-			<body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-		<xsl:call-template name="response" />
-		<xsl:call-template name="greenstoneFooter"/>
-	</div>
-			</body>
-		</html>
-	</xsl:template>
-
-	<xsl:template name="pageTitle">
-		<xsl:value-of select="/page/pageResponse/*/displayItem[@name='name']"/>
-	</xsl:template>
-
-	<!-- page specific style goes here -->
-	<xsl:template name="pageStyle"/>
-
-	<xsl:template match="pageResponse">
-		<xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
-		<xsl:apply-templates select="collection|serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
-	</xsl:template>
-	
-	<xsl:template match="collection|serviceCluster">
-		<xsl:param name="collName"/>
-		<xsl:call-template name="standardPageBanner">
-			<xsl:with-param name="collName" select="$collName"/>
-		</xsl:call-template>
-		<xsl:call-template name="navigationBar">
-			<xsl:with-param name="collName" select="$collName"/>
-		</xsl:call-template>		 
-		<div id="content"> 
-			<xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
-			<xsl:apply-templates select="serviceList">
-	<xsl:with-param name="collName" select="$collName"/>
-			</xsl:apply-templates>
-		</div>
-	</xsl:template>
-	
-	
-	<xsl:template match="serviceList">
-		<xsl:param name="collName"/>
-		<h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
-		<xsl:choose>
-			<xsl:when test="service">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
-			</xsl:when>
-			<xsl:otherwise>
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
-			</xsl:otherwise>
-		</xsl:choose>
-		
-		<xsl:if test="service">
-			<ul id="servicelist">		
-	<xsl:for-each select="service">
-		<xsl:variable name="action"><xsl:choose>
-				<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:if test="$action !='DO_NOT_DISPLAY'">
-			<li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
-		</xsl:if>
-		</xsl:for-each>
-			</ul> 
-		</xsl:if> 
-	</xsl:template>
-
-</xsl:stylesheet>	
-
Index: greenstone3/trunk/web/interfaces/oran/transform/applet.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/applet.xsl	(revision 19855)
+++ 	(revision )
@@ -1,56 +1,0 @@
-<?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"/>  
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="pageResponse/service/applet"/>
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-    <xsl:call-template name="standardPageBanner">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>
-    
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-    <div class="phrasebrowse">
-      <xsl:copy-of select="service/applet"/>
-    </div>
-  </xsl:template>
-</xsl:stylesheet>  
-
Index: greenstone3/trunk/web/interfaces/oran/transform/authen.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/authen.xsl	(revision 19855)
+++ 	(revision )
@@ -1,654 +1,0 @@
-<?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:include href="service-params.xsl"/>
-
-  <xsl:output method="html"/> 
-
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.authentication')"/>
-  </xsl:template>
-
-  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-  <xsl:template name="pageHead">
-    <head>
-      <title>
-	<xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-      </title>
-      <xsl:call-template name="globalStyle"/>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-  </xsl:template>
-
-  <xsl:template name="pageStyle"/>
-
-  <xsl:template match="page">
-    <html>
-      <xsl:call-template name="pageHead" />
-      <xsl:call-template name="addGroup" />
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
- 	  <xsl:variable name="authen_service" select="/page/pageRequest/paramList/param[@name='s']/@value"/>
-	  <xsl:variable name="sub_action" select="/page/pageRequest/@subaction"/>
-	  <xsl:variable name="asn_param" select ="/page/pageRequest/paramList/param[@name='s1.asn']/@value"/>
-	  <xsl:variable name="uan" select ="/page/pageRequest/paramList/param[@name='s1.uan']/@value"/>
-	  <xsl:variable name="pro_action" select ="/page/pageResponse/authenticationNode/service/@aup"/>
-	  <xsl:variable name="au_node" select ="/page/pageResponse/authenticationNode"/>
-	  <xsl:variable name="asn" select ="/page/pageResponse/authenticationNode/service/@asn"/>
-	  <xsl:variable name="info" select ="/page/pageResponse/authenticationNode/service/@info"/>
-	  <xsl:variable name="err" select ="/page/pageResponse/authenticationNode/service/@err"/>
-	  <xsl:variable name="rt" select="/page/pageRequest/paramList/param[@name='rt']/@value"/>
-	  <xsl:variable name="un_s" select="/page/pageResponse/authenticationNode/service/@un"/>
-	  <xsl:variable name="pw_s" select="/page/pageResponse/authenticationNode/service/@pw"/>
-	  
-	  <div align="left" >
-	    <table align="left" border="0" width="100%">
-	      <tr align="left">
-		<td><h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.authentication')"/></h2></td>
-		<td><xsl:if test="$un_s!=''">
-		    <xsl:if test="$asn!='' and $asn!='0'">
-		      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
-		    </xsl:if>
-		  </xsl:if></td>
-	      </tr>
-	    </table>
-	  </div>
-
-	  <div id="navbar">
-	    <ul id="navbarlist">
-	      <!--greenstone home-->
-	      <li><a href="{$library_name}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.greenstone_home')"/></a></li>
-	      
-	      <!--list users-->
-	      <li>
-		<xsl:choose>
-		  <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ListUsers&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
-		  </xsl:when>
-		  <xsl:otherwise>
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
-		  </xsl:otherwise>
-		</xsl:choose></li>
-	      
-	      <!--add a new user-->
-	      <li>
-		<xsl:choose>
-		  <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=AddUser&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw=&amp;s1.umun=&amp;s1.umpw=&amp;s1.umgp=&amp;s1.umas=&amp;s1.umc="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user')"/></a> 
-		  </xsl:when>
-		  <xsl:otherwise>
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user')"/></a>
-		  </xsl:otherwise>
-		</xsl:choose>
-	      </li>
-	      
-	      <!-- change password-->
-	      <li>
-		<xsl:choose>
-		  <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ModifyPassword&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw=&amp;s1.umpw1=&amp;s1.umpw2=&amp;s1.umpw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password')"/></a>
-		  </xsl:when>
-		  <xsl:otherwise>
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password')"/></a>
-		  </xsl:otherwise>
-		</xsl:choose>
-	      </li>
-
-	      <li>
-		<xsl:choose>
-		  <xsl:when test="$un_s!='' and $asn!='' and $asn!='0'">
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login&amp;s1.un=&amp;s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.logout')"/></a>
-		  </xsl:when>
-		  <xsl:otherwise>
-		    <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login')"/></a>
-		  </xsl:otherwise>
-		</xsl:choose>
-	      </li>
-	    </ul>
-	  </div>
-
-	  <table align="left" border="0" width="100%">
-	    <tr>
-	      <td>
-		<div id="content" align="center">
-		  <!-- login -->
-		  <xsl:if test="$pro_action='Login'">
-		    <xsl:choose>
-		      <xsl:when test="$asn!='' and $asn!='0'">
-			<p align="left"> <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_successfully')"/></p>
-		      </xsl:when>
-		      <xsl:otherwise>
-
-			<p align="left">
-			  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
-			<xsl:if test="$err='un-pw-err'">
-			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
-			</xsl:if>
-			<xsl:if test="$err='no-permission' and $info='Login'">
-			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
-			</xsl:if>
-			<xsl:if test="$err='as-false'">
-			  <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
-			</xsl:if>
-			<xsl:call-template name="login">
-			  <xsl:with-param name="sub_action" select="$sub_action"/>
-			  <xsl:with-param name="authen_service" select="$authen_service"/>
-			  <xsl:with-param name="pro_action" select="$pro_action"/>	
-			</xsl:call-template>
-
-		      </xsl:otherwise>
-		    </xsl:choose>
-		  </xsl:if>
-
-		  <!-- list users-->
-		  <xsl:if test="$pro_action='ListUsers'">
-		    
-		    <xsl:if test="$asn='1' and $info='all-un'">
-		      <xsl:call-template name="listusers" >
-		      </xsl:call-template>
-		    </xsl:if>
-
-		    <xsl:if test="$info='Login'">
-		      <p align="left">
-			<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/></p>
-		      <xsl:if test="$err='no-permission' and $info='Login'">
-			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
-		      </xsl:if>
-		    </xsl:if>
-		  </xsl:if>
-		  
-		  <!-- add a new user-->
-		  <xsl:if test="$pro_action='AddUser'"> 
-		    <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
-		      <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
-		    </xsl:if>
-
-		    <xsl:if test="$asn!='1'">
-		      <p align="left">
-			<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/>
-		      </p>
-		      <xsl:if test="$err='no-permission'">
-			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
-		      </xsl:if>
-		    </xsl:if>
-		    
-		    <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
-		      <xsl:call-template name="listusers" >
-		      </xsl:call-template>
-		    </xsl:if>
-		    
-		    <xsl:if test="$info='adduser_interface'">
-		      <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.add_a_new_user_title')"/></h2>
-		      <xsl:if test="$err='pw-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_err')"/></font></p>
-		      </xsl:if>	
-		      <xsl:if test="$err='un-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
-		      </xsl:if>	
-		      <xsl:if test="$err='un-exist'">
-			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
-		      </xsl:if>
-		      <xsl:call-template name="edituser" >
-			<xsl:with-param name="sub_action" select="$sub_action"/>
-			<xsl:with-param name="authen_service" select="$authen_service"/>
-			<xsl:with-param name="pro_action" select="$pro_action"/>
-			<xsl:with-param name="umun_s" />
-			<xsl:with-param name="umpw_s" />
-			<xsl:with-param name="umas_s" />
-			<xsl:with-param name="umgp_s" />
-			<xsl:with-param name="umc_s" />
-			<xsl:with-param name="oumun_s" />
-			<xsl:with-param name="un_s" select="$un_s"/>
-			<xsl:with-param name="pw_s" select="$pw_s"/>
-			<xsl:with-param name="asn" select="$asn"/>
-		      </xsl:call-template>
-
-		    </xsl:if> 
-		  </xsl:if>
-		  
-		  <!-- modify the passwrod of a user-->
-		  <xsl:if test="$pro_action='ModifyPassword'">
-		    
-		    <xsl:if test="$err!='' and $err!='umpw1-err' and $err!='umpw2-err' and $err!='pw-umpw-nm-err' and $err!='umpw-null-err' and $err!='umpw1-umpw2-nm-err' and $err!='umpw1-umpw2-null-err'"><p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
-		    </xsl:if>
-
-		    <xsl:if test="$err=''">
-		      <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_title')"/></h2>
-		      <p align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_successed_content')"/></p>
-		    </xsl:if>
-		    
-		    <xsl:if test="$asn!='0' and $info='modify_interface'">
-		      <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_title')"/></h2>
-		      <p align="left"><font color="grey"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.change_password_describe_line_1')"/></font></p>
-
-		      <xsl:if test="$err='umpw1-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password_invalid')"/></font></p>
-		      </xsl:if>
-		      <xsl:if test="$err='umpw2-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retyped_password_invalid')"/></font></p>
-		      </xsl:if>
-		      <xsl:if test="$err='pw-umpw-nm-err' or $err='umpw-null-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password_warning')"/></font></p>
-		      </xsl:if>  
-		      <xsl:if test="$err='umpw1-umpw2-nm-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.two_password_not_match')"/></font></p>
-		      </xsl:if> 
-		      <xsl:if test="$err='umpw1-umpw2-null-err'">
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_empty_warning')"/></font></p>
-		      </xsl:if> 
-		      
-		      <xsl:call-template name="modifypassword">
-			<xsl:with-param name="sub_action" select="$sub_action"/>
-			<xsl:with-param name="authen_service" select="$authen_service"/>
-			<xsl:with-param name="pro_action" select="$pro_action"/>
-			<xsl:with-param name="un_s" select="$un_s"/>
-			<xsl:with-param name="pw_s" select="$pw_s"/>
-			<xsl:with-param name="asn" select="$asn"/>
-		      </xsl:call-template>
-		    </xsl:if>
-		  </xsl:if> 
-
-		  <!-- delete a user -->
-		  <xsl:if test="$pro_action='DeleteUser'"> 
-		    <xsl:if test="$err!=''">
-		      <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
-		    </xsl:if>
-
-		    <xsl:if test="$info='confirm'">
-		      <xsl:call-template name="deleteuser"> 
-			<xsl:with-param name="sub_action" select="$sub_action"/>
-			<xsl:with-param name="authen_service" select="$authen_service"/>
-			<xsl:with-param name="pro_action" select="$pro_action"/>
-			<xsl:with-param name="un_s" select="$un_s"/>
-			<xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>	
-			<xsl:with-param name="asn" select="$asn"/>
-		      </xsl:call-template>
-		    </xsl:if>
-		    <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
-		      <xsl:call-template name="listusers" >
-		      </xsl:call-template>
-		    </xsl:if>
-		  </xsl:if>
-		  
-		  <!-- edit the user's info -->
-		  <xsl:if test="$pro_action='EditUser'"> 
-		    <xsl:if test="$err!='' and $err!='umpw-err' and $err!='umun-err' and $err!='ini-umpw-err' and $err!='un-exist'">
-		      <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
-		    </xsl:if>
-
-		    <xsl:if test="$info='edituser-interface'"> 
-		      <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.edit_user_information')"/></h2>
-		      <xsl:if test="$err='umpw-err'"> 
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_err')"/></font></p>
-		      </xsl:if>
-		      <xsl:if test="$err='umun-err'"> 
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
-		      </xsl:if>
-		      <xsl:if test="$err='ini-umpw-err'"> 
-			<p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p>
-		      </xsl:if>
-		      <xsl:if test="$err='un-exist'">
-			<p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
-		      </xsl:if>
-		      <xsl:call-template name="edituser" >
-			<xsl:with-param name="sub_action" select="$sub_action"/>
-			<xsl:with-param name="authen_service" select="$authen_service"/>
-			<xsl:with-param name="pro_action" select="$pro_action"/>
-			<xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>
-			<xsl:with-param name="umpw_s" select="/page/pageResponse/authenticationNode/service/@umpw"/>
-			<xsl:with-param name="umas_s" select="/page/pageResponse/authenticationNode/service/@umas"/>
-			<xsl:with-param name="umgp_s" select="/page/pageResponse/authenticationNode/service/@umgp"/>
-			<xsl:with-param name="umc_s" select="/page/pageResponse/authenticationNode/service/@umc"/>
-			<xsl:with-param name="oumun_s" select="/page/pageResponse/authenticationNode/service/@oumun"/>
-			<xsl:with-param name="un_s" select="$un_s"/>
-			<xsl:with-param name="pw_s" select="$pw_s"/>
-			<xsl:with-param name="asn" select="$asn"/>
-		      </xsl:call-template>
-		    </xsl:if> 
-		    <xsl:if test="$info='all-un'">
-		      <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
-			<xsl:call-template name="listusers" >
-			</xsl:call-template>
-		      </xsl:if>
-		    </xsl:if>
-		  </xsl:if>
-		  
-		</div>
-	      </td>
-	    </tr>
-	  </table>
-	  <div id="navbar">	  
-	    <xsl:call-template name="greenstoneFooter" />
-	  </div>	  
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-  
-  <!--template name="login"-->
-  <xsl:template name="login">
-    <xsl:param name="sub_action"/>
-    <xsl:param name="authen_service"/>
-    <xsl:param name="pro_action"/>
-    <div>
-      <form id="LoginForm" method="get" action="{$library_name}">
-	<input type='hidden' name='a' value='g'/>
-	<input type='hidden' name='sa' value='{$sub_action}'/>
-	<input type='hidden' name='s' value='{$authen_service}'/>
-	<input type='hidden' name='rt' value='r'/>
-	<input type='hidden' name='s1.asn' value='0'/>
-	<input type='hidden' name='s1.uan' value='1'/>
-	<input type='hidden' name='s1.aup' value='{$pro_action}'/>
-	<input type='hidden' name='s1.umpw1' value=''/>
-	<input type='hidden' name='s1.umpw2' value=''/>
-	<input type='hidden' name='s1.umc' value=''/>
-	<input type='hidden' name='s1.umgp' value=''/>
-	<input type='hidden' name='s1.umun' value=''/>
-	<input type='hidden' name='s1.umpw' value=''/>
-	<input type='hidden' name='s1.umas' value=''/>
-
-	<table align="center">
-	  <tr>
-	    <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></td><td><input type="string" name="s1.un" size="10" value=""/></td><td></td>
-	  </tr>
-	  <tr>
-	    <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password')"/></td><td><input type="password" name="s1.pw" size="10" value=""/></td><td>
-	      <input type="submit" value="submit"></input></td>
-	  </tr>
-	</table>
-      </form>
-    </div>
-  </xsl:template>
-
-  <!--template name="listusers"-->
-  <xsl:template name="listusers" >
-    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
-
-    <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
-      <tr>
-	<th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></th>
-	<th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status')"/></th>
-	<th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></th>
-	<th bgcolor="#d0d0d0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></th>
-	<th bgcolor="#d0d0d0"></th>
-      </tr>
-      <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
-	<tr>
-	  <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
-	  <td id="status" bgcolor="#eeeeee">
-	    <script type="text/javascript">
-	      <xsl:text disable-output-escaping="yes">
-		var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
-		if (status=="true"){
-		  document.getElementById("status").innerHTML="enabled";
-		}
-		if (status=="false"){
-		  document.getElementById("status").innerHTML="disabled";
-		}
-	      </xsl:text>		 
-	    </script>
-	  </td>
-	  <td id="group" bgcolor="#eeeeee">
-	    <script type="text/javascript">
-	      <xsl:text disable-output-escaping="yes">
-		var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
-		var split_groups= groups.split(",");
-		var new_groups="";
-		for (j=0; j &lt; split_groups.length ; j++){
-		  new_groups+=split_groups[j]+" &lt;br /&gt; ";
-		}
-		document.getElementById('group').innerHTML=new_groups;
-	      </xsl:text>		 
-	    </script>
-	  </td>
-	  <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
-	  <td bgcolor="#eeeeee">
-	    <form name="ListUsersForm" method="get" action="{$library_name}">
-	      <input type='hidden' name='a' value='g'/>
-	      <input type='hidden' name='sa' value='authen'/>
-	      <input type='hidden' name='s' value='Authentication'/>
-	      <input type='hidden' name='rt' value='r'/>
-	      <input type='hidden' name='s1.asn' value='1'/>
-	      <input type='hidden' name='s1.uan' value='1'/>
-
-	      <input type='hidden'><xsl:attribute name="name">s1.oumun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
-	      <input type='hidden'><xsl:attribute name="name">s1.umun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
-	      <input type='hidden' name='s1.cm' value=''/>
-
-	      <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">EditUser</xsl:attribute></input>
-	      <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
-	    </form>
-	  </td>
-	</tr>
-      </xsl:for-each>
-    </table>
-  </xsl:template>
-
-  <!--template name="modifypassword"-->
-  <xsl:template name="modifypassword" >
-    <xsl:param name="sub_action"/>
-    <xsl:param name="authen_service"/>
-    <xsl:param name="pro_action"/>
-    <xsl:param name="un_s"/>
-    <xsl:param name="pw_s"/>
-    <xsl:param name="asn"/>
-    <div>
-      <form id="modifyForm" method="get" action="{$library_name}">
-	<input type='hidden' name='a' value='g'/>
-	<input type='hidden' name='sa' value='{$sub_action}'/>
-	<input type='hidden' name='s' value='{$authen_service}'/>
-	<input type='hidden' name='rt' value='r'/>
-	<input type='hidden' name='s1.un' value='{$un_s}'/>
-	<input type='hidden' name='s1.pw' value='{$pw_s}'/>
-	<input type='hidden' name='s1.asn' value='{$asn}'/>
-	<input type='hidden' name='s1.uan' value='1'/>
-	<input type='hidden' name='s1.aup' value='{$pro_action}'/>
-	
-	<table align="center"><tr><td align="right">
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
-	  <tr><td align="right">
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
-	  <tr><td align="right">
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
-	  <tr><td></td><td>
-	      <input type="submit" value="submit"></input></td>
-	  </tr>
-	</table>
-      </form>
-    </div>
-  </xsl:template>
-
-  <!--template name="deleteuser"-->
-  <xsl:template name="deleteuser">
-    <xsl:param name="sub_action"/>
-    <xsl:param name="authen_service"/>
-    <xsl:param name="pro_action"/>
-    <xsl:param name="un_s"/>
-    <xsl:param name="umun_s"/>
-    <xsl:param name="asn"/>
-    <div >
-      <form id="deleteForm" method="get" action="{$library_name}">
-	<input type='hidden' name='a' value='g'/>
-	<input type='hidden' name='sa' value='{$sub_action}'/>
-	<input type='hidden' name='s' value='{$authen_service}'/>
-	<input type='hidden' name='rt' value='r'/>
-	<input type='hidden' name='s1.aup' value='{$pro_action}'/>
-	<input type='hidden' name='s1.asn' value='{$asn}'/>
-	<input type='hidden' name='s1.uan' value='1'/>
-	<input type='hidden' name='s1.umun' value='{$umun_s}'/>
-	<p><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.do_you_really_want_to_permanently_remove_user')"/> <xsl:value-of select="$umun_s"/>" ?</font></p>
-	<input type="submit" value="yes"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-	<input type="submit" value="no"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-      </form>
-    </div>
-  </xsl:template>
-  
-  <!--template name="edituser"-->
-  <xsl:template name="edituser" >
-    <xsl:param name="sub_action"/>
-    <xsl:param name="authen_service"/>
-    <xsl:param name="pro_action"/>
-    <xsl:param name="un_s"/>
-    <xsl:param name="pw_s"/>
-    <xsl:param name="umun_s"/>
-    <xsl:param name="umpw_s"/>
-    <xsl:param name="umas_s"/>
-    <xsl:param name="umgp_s"/>
-    <xsl:param name="umc_s"/>
-    <xsl:param name="oumun_s"/>	
-    <xsl:param name="asn"/>
-    <div>
-      <form id="editForm" method="get" action="{$library_name}">
-	<input type='hidden' name='a' value='g'/>
-	<input type='hidden' name='sa' value='{$sub_action}'/>
-	<input type='hidden' name='s' value='{$authen_service}'/>
-	<input type='hidden' name='rt' value='r'/>
-	<input type='hidden' name='s1.asn' value='{$asn}'/>
-	<input type='hidden' name='s1.uan' value='1'/>
-	<input type='hidden' name='s1.aup' value='{$pro_action}'/>
-	<input type='hidden' name='s1.un' value='{$un_s}'/>
-	<input type='hidden' name='s1.pw' value='{$pw_s}'/>
-	
-	<table align="left" ><tr><td>
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/></td><td><input type="text" name="s1.umun" size="15" value="{$umun_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username_describe')"/></font></td></tr>
-	  <tr><td>
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password')"/></td><td><input type="password" name="s1.umpw" size="15" value="{$umpw_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_describe')"/></font></td></tr>
-	  <tr><td>
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status')"/></td><td>	
-	      <select name="s1.umas">
-		<xsl:if test="$umas_s=''">
-		  <option value="true" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
-		  <option value="false"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
-		</xsl:if> 
-		<xsl:if test="$umas_s='true'">
-		  <option value="true" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
-		  <option value="false"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
-		</xsl:if> 
-		<xsl:if test="$umas_s='false'">
-		  <option value="true"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.enabled')"/></option>
-		  <option value="false" selected="selected"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.disabled')"/></option>
-		</xsl:if> 
-	      </select></td><td></td></tr>
-	  <tr><td>
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups')"/></td><td><input type="text" id="group" name="s1.umgp" size="70" value="{$umgp_s}"/></td><td><font color="gray"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.groups_describe')"/></font></td></tr>
-	  <tr>
-	    <td></td>
-	    <td  align="right"> <select id="groups" size="0">
-		<script type="text/javascript">
-		  <xsl:text disable-output-escaping="yes">
-		    var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
-		    var group_string=document.getElementById("group").value;
-		    var split_group_string=group_string.split(",");
-		    var find=0;
-		    for (i=0; i &lt; group_arr.length; i++){
-		      find=0;
-		      for (j=0; j &lt; group_arr.length; j++){
-		        if (split_group_string[j]==group_arr[i]){
-		          find=1;
-		        }
-		      }
-		      if (find==0){
-		        op = document.createElement('option');
-		        op.innerHTML = group_arr[i];
-		        op.setAttribute("value", group_arr[i]);
-		        document.getElementById("groups").appendChild(op);
-		      }
-	            }
-		    
-		  </xsl:text>		 
-		</script>
-	      </select></td><td><input type="button" name="addGroupButton" value="add" onClick="addGroup('groups')"/></td>
-	  </tr>
-	  <tr>
-	    <td></td>
-	    <td  align="right"> 
-	      <select  id="collects" size="0">
-		<xsl:for-each select="/page/pageResponse/collectionList/collection">
-		  <script type="text/javascript">
-		    <xsl:text disable-output-escaping="yes">
-		      var group="</xsl:text><xsl:value-of select="@name"/>-collection-editor<xsl:text disable-output-escaping="yes">";
-		      var group_string=document.getElementById("group").value;
-		      var split_group_string=group_string.split(",");
-		      var find=0;
-		      for (i=0; i &lt; split_group_string.length; i++){
-		        if (split_group_string[i]==group){
-		          find=1;
-		        }
-		      }
-		      if (find==0){
-		        op = document.createElement('option');
-		        op.innerHTML = group;
-		        op.setAttribute("value", group);
-		        document.getElementById("collects").appendChild(op);
-		      }
-		    </xsl:text>		 
-		  </script>
-		</xsl:for-each>
-	      </select>
-	    </td>
-	    <td><input type="button" name="addGroupButton" value="add" onClick="addGroup('collects')"/></td>
-	  </tr>
-	  <tr><td>
-	      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/>
-
-		</textarea></div></td></tr> 
-	  <tr>
-
-	    <td></td><td>
-	      <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-	      <xsl:if test="$pro_action!='AddUser'">
-		<input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
-	      </xsl:if>
-	    </td><td></td></tr>
-	</table>
-	<input type='hidden' name='s1.oumun' value='{$oumun_s}'/>
-      </form>
-    </div>
-  </xsl:template>
-
-  <!-- addGroup() javascript -->
-  <xsl:template name="addGroup">
-    <script type="text/javascript">
-      <xsl:text disable-output-escaping="yes">
-	function addGroup(g){
-	  var itemSelected;
-	  var splitGroup;
-	  var groupExit;
-
-	  if (document.getElementById("editForm")!=null){
-	    //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
-	    itemSelected=document.getElementById(g).options.selectedIndex;
-	    if (document.getElementById(g).options[itemSelected].text!=""){
-	      if (document.getElementById("group").value==""){
-	        document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
-	      }else{
-	        splitGroup=document.getElementById("group").value.split(",");
-	        for (var i=0; i &lt; splitGroup.length; i++){
-	          if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
-	            alert(document.getElementById(g).options[itemSelected].text + " has been added.");
-	            groupExit=1;
-	            break;
-	          }
-	        }
-	        if (groupExit!=1) {
-	          document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
-	        }
-	      }
-	      document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
-	    }
-	  }
-	}
-      </xsl:text>
-    </script>    
-  </xsl:template>
-  
-</xsl:stylesheet>  
-
Index: greenstone3/trunk/web/interfaces/oran/transform/berry.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/berry.xsl	(revision 19855)
+++ 	(revision )
@@ -1,748 +1,0 @@
-<?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">
-
-  <!--<xsl:include href="style.xsl"/>-->
-  <xsl:include href="service-params.xsl"/>
-  <xsl:include href="berrytools.xsl"/>
-
-  <xsl:output method="html"/>  
-
-  <xsl:param name="library_name"/>
-  
-   <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <xsl:call-template name="pageHead"/>	 
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:apply-templates select="pageResponse"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-
-  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-  <xsl:template name="pageHead">
-    <head>
-      <title>
-	<xsl:call-template name="pageTitle"/>
-      </title>
-      <xsl:call-template name="pageStyle"/>
-    </head>
-  </xsl:template>
-  
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/>
-    Berry Basket
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle" >
-    <xsl:call-template name="styleSheet" />
-    <xsl:call-template name="loadLibrary" />
-    <xsl:call-template name="buildContent" />   
-    <!-- <xsl:call-template name="showMailBox" />-->
-  </xsl:template>    
-  
-  <xsl:template match="pageResponse">
-    <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-    <xsl:call-template name="berryPageBanner" />
-    <xsl:apply-templates select="paramList"/>
-    <div id="content" ><span></span></div> 
-    <xsl:call-template name="footBanner" />
-  </xsl:template>
-  
-
-  <xsl:template match="collection">
-    <xsl:for-each select="item">
-      <xsl:text disable-output-escaping="yes">
-	var  doc = new Array();             
-      </xsl:text>
-      <xsl:for-each select="@*">
-	<xsl:text disable-output-escaping="yes">
-	  doc["</xsl:text><xsl:value-of select="name()" /><xsl:text disable-output-escaping="yes">"]='</xsl:text><xsl:value-of select="." /><xsl:text disable-output-escaping="yes">'; </xsl:text>   
-      </xsl:for-each>
-      <xsl:text disable-output-escaping="yes"> 
-	docList[docList.length] = doc; 
-      </xsl:text>  
-    </xsl:for-each>     
-  </xsl:template>
-  
-  
-  <xsl:template name="buildContent">
-    <script type="text/javascript">
-      <xsl:text disable-output-escaping="yes">
-	var previousView;
-	var docList = new Array();
-	var urlonly = false;
-	var mailinfo = new Array();
-	mailinfo['address'] = "To: ";
-	mailinfo['cc'] = "CC: ";
-	mailinfo['bcc'] = "Bcc: ";
-	mailinfo['subject'] = "Subject: "; 
-	var textwin;
-	var mailwin;
-      </xsl:text>
-      <xsl:apply-templates select="/page/pageResponse/collection" />       
-      
-      <xsl:text disable-output-escaping="yes">
-    
-       function navigate(e){   
-             var target = e.target;
-       
-	     if (target.id.toLowerCase() == 'fullview'){  
-                  showFullView();
-              }
-
-             if (target.id.toLowerCase() == 'textview'){       
-               showTextView();
-             }
-
-             if (target.id.toLowerCase() == 'email'){       
-               showEmail();
-            }
-
-            if (target.id.toLowerCase() == 'sendmail'){       
-               sendMail();
-            }
-            
-           
-
-            if (target.id.toLowerCase() == 'urlcheck' &amp;&amp; urlonly){
-               var urlcheck = YAHOO.util.Dom.get('urlcheck');
-               urlcheck.src = 'interfaces/default/images/check3.gif';              
-               var parea  =YAHOO.util.Dom.get('pretextarea');       
-               urlonly = false;
-               populateUrlsAndMetadata(parea);
-               return;
-               
-            }
-
-            if (target.id.toLowerCase() == 'urlcheck' &amp;&amp; !urlonly ){ 
-                var urlcheck = YAHOO.util.Dom.get('urlcheck');
-                urlcheck.src = 'interfaces/default/images/check4.gif';                       
-                var parea  =YAHOO.util.Dom.get('pretextarea');
-                populateUrls(parea);        
-                urlonly = true;
-                return;
-             } 
-
-            if (target.id.toLowerCase() == 'extextview' ){
-               if (textwin != null){
-                   textwin.close();
-               }
-
-               textwin = window.open("","Berry basket plain text view","status=1,width=450,height=300");
-               textwin.moveTo(0,0);
-               var content = document.createElement('div');
-                buildPreview(content);
-                var body = textwin.document.getElementsByTagName('body')[0]; 
-                body.appendChild(content);
-                var prearea =  textwin.document.getElementsByTagName('textarea')[0];
-                prearea.cols = '55';
-                prearea.rows = '15';        
-             }
-
-             if (target.id.toLowerCase() == 'exemail' ){
-               if (mailwin != null){
-                   mailwin.close();
-               }
-               mailwin = window.open("","Berry basket mail to a friend","status=1,width=450,height=350");
-               mailwin.moveTo(0,0);
-               var content = document.createElement('div');
-               getEmailContent(content);
-               var body = mailwin.document.getElementsByTagName('body')[0]; 
-               body.appendChild(content);           
-                var prearea =  mailwin.document.getElementsByTagName('textarea')[0];
-                prearea.cols = '50';
-                prearea.rows = '11'; 
-             }
-              
-        }
-
-        function showFullView(){
-          
-             var content =  YAHOO.util.Dom.get('content'); 
-             var fullview =  YAHOO.util.Dom.get('fullview');
-
-              if (previousView != null){
-                 previousView.style.backgroundImage =  'url("interfaces/default/images/bg_on.png")'; 
-              } 
-              previousView = fullview;
-              previousView.style.backgroundImage =  'url("interfaces/default/images/bg_green.png")';
-
-               while (content.hasChildNodes()) {
-		 content.removeChild(content.firstChild);
-	       }                        
-           
-             if (docList.length == 0){
-                 content.appendChild(document.createTextNode("Your berry basket is empty."));
-                 return;
-              }
-
- 
-            var trashbin = document.createElement('div');
-            trashbin.id ='trashbin';   
-            var binhandle = document.createElement('div');
-            binhandle.id = 'binhandle';   
-            binhandle.appendChild(document.createElement('span'));          
-            trashbin.appendChild(binhandle) 
-
-            content.appendChild(trashbin);
-
-            var dd = new ygDDOnTop('trashbin');
-            dd.setHandleElId('binhandle');      
-            new YAHOO.util.DDTarget('trashbin','trash');
-        
-            var dlist = document.createElement('div');
-            content.appendChild(dlist);                          
-            var ol =   document.createElement('ol');            
-            dlist.appendChild(ol); 
-
-             for (var i in docList){
-               var doc = docList[i];
-               var li = document.createElement('li'); 
-               var a = document.createElement('a'); 
-               var text ="";
-               a.href ="?a=d&amp;c="+doc['collection']+"&amp;d="+doc['name'];
-               a.appendChild(document.createTextNode(doc['title'])); 
-                if (doc['root_title'] != ""){
-                     li.appendChild(document.createTextNode(doc['root_title']+": ")); 
-                   }               
-               li.appendChild(a);
-               var metadata = "";
-               for (var metaItem in doc &amp;&amp; metaItem != 'title'){
-                    metadata = "\n"+metaItem+": "+ doc[metaItem]+"\n";
-               }
-               text +=metadata+"\n";
-               li.appendChild(document.createTextNode(text));
-               li.id = doc['collection']+":"+ doc['name']; 
-               li.className = 'berrydoc';
-               ol.appendChild(li);
-                new ygDDPlayer(li.id,'trash',docList); 
-         }
-
-         /**          
-           var extra = document.createElement('div');
-           var textview =  document.createElement('span'); 
-           textview.id = 'extextview';
-           textview.className = 'extralink';   
-           textview.appendChild(document.createTextNode("plain text version"));                   
-           var email =  document.createElement('span');
-           email.appendChild(document.createTextNode("email to a friend"));
-           email.id = 'exemail';      
-           email.className = 'extralink';    
-           extra.appendChild(textview);
-           extra.appendChild(email);
-           content.appendChild(extra);
-         **/ 
-        }
-
-       function showTextView(){
-             var content =  YAHOO.util.Dom.get('content'); 
-             var textview =  YAHOO.util.Dom.get('textview');
-
-              if (previousView != null &amp;&amp; textview !=null){
-                 previousView.style.backgroundImage =  'url("interfaces/default/images/bg_on.png")'; 
-              } 
-
-             if (textview !=null){
-               previousView = textview;
-               previousView.style.backgroundImage =  'url("interfaces/default/images/bg_green.png")';
-             }
-
-               while (content.hasChildNodes()) {
-		 content.removeChild(content.firstChild);
-	       }                        
-           
-             if (docList.length == 0){
-                content.appendChild(document.createTextNode("Your berry basket is empty."));
-                return;
-              }
-
-             buildPreview(content);   
-
-        
-       }
-
-       function getEmailContent(content){
-           var item ;
-           var tr;
-           var td;
-           var input;
-           
-           table = document.createElement('table');
-           table.setAttribute("class","mailtable");          
-
-          for (item in mailinfo){
-  	   tr = document.createElement('tr');       
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailinfo[item]));
-           tr.appendChild(td);
- 
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", item);
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "text");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-          
-          }
-
- 	   // an empty line
-           tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.appendChild(document.createElement('br'));
-	   tr.appendChild(td);
-  	   table.appendChild(tr);
-
-	   content.appendChild(table);
-          
-           buildPreview(content);   
-
-           //send button
-	   input = document.createElement('input'); 
-           input.setAttribute("id", 'sendmail');
-           input.setAttribute("class", "sendbutton");
-           input.setAttribute("type", "button");
-           input.setAttribute("value", "send");        
-           content.appendChild(input);
-           
-        }
-
-      
-        function showEmail(){
-          
-             var content =  YAHOO.util.Dom.get('content'); 
-             var email =  YAHOO.util.Dom.get('email');
-
-              if (previousView != null &amp;&amp; email !=null ){
-                 previousView.style.backgroundImage =  'url("interfaces/default/images/bg_on.png")'; 
-              } 
-              
-              if (email != null){
-                previousView = email;
-               previousView.style.backgroundImage =  'url("interfaces/default/images/bg_green.png")';
-             }
-               while (content.hasChildNodes()) {
-		 content.removeChild(content.firstChild);
-	       }                        
-           
-             if (docList.length == 0){
-                content.appendChild(document.createTextNode("Your berry basket is empty."));
-                return;
-              }
-
-                   
-           var item ;
-           var tr;
-           var td;
-           var input;
-           
-           table = document.createElement('table');
-           table.setAttribute("class","mailtable");          
-
-          for (item in mailinfo){
-  	   tr = document.createElement('tr');       
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailinfo[item]));
-           tr.appendChild(td);
- 
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", item);
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "text");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-          
-          }
-
- 	   // an empty line
-           tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.appendChild(document.createElement('br'));
-	   tr.appendChild(td);
-  	   table.appendChild(tr);
-
-	   content.appendChild(table);
-          
-           buildPreview(content);   
-
-           //send button
-	   input = document.createElement('input'); 
-           input.setAttribute("id", 'sendmail');
-           input.setAttribute("class", "sendbutton");
-           input.setAttribute("type", "button");
-           input.setAttribute("value", "send");        
-           content.appendChild(input);
-
-         }
-
-
-         function buildPreview(parent){
-             var div = document.createElement('div');
-         
-         
-             var img =  document.createElement('img');
-             img.src = 'interfaces/default/images/check3.gif';
-             img.id = 'urlcheck'; 
-             div.appendChild(img);
-       
-             var urls = document.createElement('span');
-             urls.id = 'urls';
-             urls.className = 'berrycheck';
-             urls.appendChild(document.createTextNode('URL only'));
-             div.appendChild(urls);
-
-            // var urlsmetadata = document.createElement('span');
-            // urlsmetadata.id = 'urlsmetadata'
-            // urlsmetadata.className = 'berryradio';
-            // urlsmetadata.appendChild(document.createTextNode('URLs and Metadata'));
-              
-            // div.appendChild(urlsmetadata);
-          
-          
-             parent.appendChild(div);
-
-                       
-             var parea  = document.createElement('textarea');
-             parea.id = 'pretextarea';                        
-
-             parent.appendChild(parea);        
-          
-         
-             populateUrlsAndMetadata(parea);	    
-               
-                       	
-         }
-
-        
-       function populateUrls(parea){
-          var urls="";
-          var doc_url = document.URL;
-          var root_url = doc_url.substring(0,doc_url.indexOf('?'));
-           
-          for (var i in docList){
-              var doc = docList[i];
-              urls +=root_url+"?a=d&amp;c="+doc["collection"]+"&amp;d="+doc["name"]+"\n\n";  
-                     
-          }
-
-           parea.value = urls;
-            
-         }
-
-	 function populateUrlsAndMetadata(parea){
-                       
-              var doc_url = document.URL;
-              var root_url = doc_url.substring(0,doc_url.indexOf('?'));
-              var fulltext="";
-
-              for (var i in docList){
-                   var doc = docList[i];
-                   var url =root_url+"?a=d&amp;c="+doc['collection']+"&amp;d="+doc['name']+"\n";  
-                    for (var metaItem in doc){
-                        var metadata = metaItem+": "+ doc[metaItem]+"\n";
-                      }
-                     fulltext +=url+metadata+"\n";
-                 
-              }
-
-               parea.value = fulltext;
-                  
-           }                                                    	    		 
-	                     
-          function sendMail(){
-              var  url = "?a=pr&amp;rt=r&amp;ro=1&amp;s=SendMail&amp;c=";
-                     var request_type = "POST";
-                     var postdata = ""; 
- 	             var i;	     
-                     //get checked items
-                      for (i in mailinfo)
-			{ 
-                         
-                          var input = YAHOO.util.Dom.get(i);  
-                          var value = input.value;  
-			  postdata +="&amp;s1."+i+"="+value;	
-			}                                   
-
-
-                       var content = YAHOO.util.Dom.get('pretextarea').value;
-                       
-                       content = content.replace(/&amp;/g,'-------');  
-                       postdata +="&amp;s1.content="+content;
-                                                                
-                      
-                        var callback = {
-     			   success:function(o){
-                                    var result = o.responseText;
-                                    alert(result);     
-	 			                                                                      
-                                	} ,
-     			    failure:function(o){
-                                        alert("Sending mail falied");    
- 				     }    
-  			 }
-                                               
- 	               
-   			YAHOO.util.Connect.asyncRequest(request_type , url , callback, postdata);         
-         }	
-
-        YAHOO.util.Event.addListener(window,'click', navigate);
-        YAHOO.util.Event.addListener(window,'load', showFullView);
-      </xsl:text>
-    </script>    
-  </xsl:template>
-
-  <xsl:template name="styleSheet">
-    <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>  
-    <link rel="stylesheet" href="interfaces/default/style/berry.css" type="text/css"/>  
-  </xsl:template>
-  
-  <xsl:template name="showMailBox">
-    <script type="text/javascript">
-      <xsl:text disable-output-escaping="yes">
-	var show = false;	
-	var table;
-	var mailserver  = new Array();     
-	mailserver['host'] = "Mail Server: ";
-	mailserver['user'] = "User Name: ";
-	mailserver['password'] = "Password: ";
-	
-	var mailinfo = new Array();
-	mailinfo['address'] = "To: ";
-	mailinfo['cc'] = "CC: ";
-	mailinfo['bcc'] = "Bcc: ";
-	mailinfo['subject'] = "Subject: "; 
-	
-	function mailBoxUpdate(e) {
-		var target = e.target;
-		if (target.id.toLowerCase() == 'sendasemail' &amp;&amp; !show){
-	       	    showMailBox();
-                    show = true;
-                }
-                else{
-                    if (target.id.toLowerCase() == 'sendasemail' &amp;&amp; show){
-                       hideMailBox();
-                       show = false;
-                    }
-
-                     if (target.id.toLowerCase() == 'sendmail'){
-                      sendMail();
-                    }
-                }
-
-
-                	
-        }
-
-       function showMailBox(){
-           var mailbox = YAHOO.util.Dom.get('mailbox');  
-           if (table != null &amp;&amp; !show){
-               mailbox.appendChild(table);
-              return;
-           }
-                        
-           var item ;
-           var tr;
-           var td;
-           var input;
-           
-           table = document.createElement('table');
-           table.setAttribute("class","mailtable");          
-
-           // mail server
-           tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailserver['host']));
-           tr.appendChild(td);
- 
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", 'host');
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "text");
-           td.appendChild(input);
-           td.appendChild(document.createTextNode(' e.g. webmail.cs.waikato.ac.nz'));
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-         
-           //user name 
-	   tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailserver['user']));
-           tr.appendChild(td);
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", 'user');
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "text");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-
-           //password 	
-	   tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailserver['password']));
-           tr.appendChild(td);
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", 'password');
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "password");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-
-           // an empty line
-           tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.appendChild(document.createElement('br'));
-	   tr.appendChild(td);
-  	   table.appendChild(tr);
-
-          for (item in mailinfo){
-  	   tr = document.createElement('tr');       
-           td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           td.appendChild(document.createTextNode(mailinfo[item]));
-           tr.appendChild(td);
- 
-           td = document.createElement('td');
-           input = document.createElement('input'); 
-           input.setAttribute("id", item);
-           input.setAttribute("class", "mailinput");
-           input.setAttribute("type", "text");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-          
-          }
-
- 	// an empty line
-           tr = document.createElement('tr');
-           td = document.createElement('td');
-           td.appendChild(document.createElement('br'));
-	   tr.appendChild(td);
-  	   table.appendChild(tr);
-
-	//send button
-	   tr = document.createElement('tr');
-       	   td = document.createElement('td');
-           td.setAttribute("class","mailitem");
-           input = document.createElement('input'); 
-           input.setAttribute("id", 'sendmail');
-           input.setAttribute("class", "sendbutton");
-           input.setAttribute("type", "button");
-           input.setAttribute("value", "send");
-           td.appendChild(input);
-           tr.appendChild(td);	        
-           table.appendChild(tr);
-
-           
-          mailbox.appendChild(table);
-         }            
-     
-
-       function hideMailBox(){
-          var mailbox = YAHOO.util.Dom.get('mailbox');	
-          while (mailbox.hasChildNodes()) {
-		mailbox.removeChild(mailbox.firstChild);
-	   }
-         }
-      
-         function sendMail(){
-              var  url = "?a=pr&amp;rt=r&amp;ro=1&amp;s=SendMail&amp;c=";
-                     var request_type = "POST";
-                     var postdata = ""; 
- 	             var i;	     
-                     //get checked items
-                      for (i in mailinfo)
-			{ 
-                         
-                          var input = YAHOO.util.Dom.get(i);  
-                          var value = input.value;  
-			  postdata +="&amp;s1."+i+"="+value;	
-			}                                   
-
-
-                       for (i in mailserver){
-                          var input = YAHOO.util.Dom.get(i);  
-                          var value = input.value; 
-                           postdata +="&amp;s1."+i+"="+value;
-                        }
-
-                       var content = YAHOO.util.Dom.get('pretextarea').value;
-                       
-                       content = content.replace(/&amp;/g,'-------');  
-                       postdata +="&amp;s1.content="+content;
-                                                                
-                      
-                        var callback = {
-     			   success:function(o){
-                                    var response = o.responseXML;
-            	                       
-	 			         alert(response.getAttribute('status'));                                                               
-                                	} ,
-     			    failure:function(o){
-                                        alert("Sending mail falied");    
- 				     }    
-  			 }
-                                               
- 	               
-   			YAHOO.util.Connect.asyncRequest(request_type , url , callback, postdata);         
-                 }	
-
-              
-            YAHOO.util.Event.addListener(window,'click',mailBoxUpdate );
-
-      </xsl:text> 
-    </script>
-  </xsl:template>
-  
-  <xsl:template name="berryPageBanner">
-    <div class='banner'>
-      <div class='pageinfo'>
-	<p class='bannerlinks'>
-	  <a class='navlink' href='{$library_name}?a=p&amp;sa=home' title='Library home page' >HOME</a>
-	  <a class='navlink' href='{$library_name}?a=p&amp;sa=help&amp;c='  title='Help pages' >HELP</a>
-	  <a class='navlink' href='{$library_name}?a=p&amp;sa=pref&amp;c=' title='Change your interface preferences'>PREFERENCES</a>
-	</p>      
-      </div>
-      <div class='basketimage'><p class='bannertitle'>Berry Basket</p></div>        
-    </div>
-    <div class="bannerextra"></div>
-    
-    <div >
-      <p class='navbar'><span id='fullview' class='navlink'>full view</span><span id='textview' class='navlink'>plain text version</span><span id='email' class='navlink'>email to a friend</span></p>
-    </div> 
-  </xsl:template>
-  
-  <xsl:template name="footBanner">
-    <div >
-      <p class='navbar'><span >powered by greenstone3</span></p>
-    </div> 
-  </xsl:template>
-  
-  <xsl:template name="direction">
-    <xsl:if test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:if>
-  </xsl:template>
-
-</xsl:stylesheet>  
-
Index: greenstone3/trunk/web/interfaces/oran/transform/berrytools.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/berrytools.xsl	(revision 19855)
+++ 	(revision )
@@ -1,402 +1,0 @@
-<?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">
-
-  <xsl:param name="berryBaskets"/>
-  
-  <xsl:template name="berrybasket">
-    <div id="berrybasket" class="hide" >
-      <div id="baskethandle"><span></span></div>
-      <div id ="berries"><span></span></div>
-    </div>
-  </xsl:template>
-  
-  <xsl:template name="documentBerryBasket">
-    <xsl:param name="collName"/>
-    <xsl:param name="selectedNode"/>
-    <xsl:param name="rootNode"/>
-    <xsl:param name="docType" />
-    <div id="berrybasket" class="hide" >
-      <div id="baskethandle"><span></span></div>
-      <div id ="berries" ><span></span></div>
-    </div>
-    <xsl:choose>
-      <xsl:when test="$selectedNode = $rootNode">
-	<p id="documentberries">    
-	  <img class='pick'  id="{$collName}:{$rootNode}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/><span id="{$collName}:{$rootNode}:root" class="documentberry">the whole document</span></p>       
-      </xsl:when>
-      <xsl:otherwise>
-	<p id="documentberries">    
-	  <img class='pick'  id="{$collName}:{$rootNode}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/><span id="{$collName}:{$rootNode}:root" class="documentberry">the whole document</span><img class='pick'  id="{$collName}:{$selectedNode}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/><span id="{$collName}:{$selectedNode}:section" class="documentberry">the current section</span></p>
-      </xsl:otherwise> 
-    </xsl:choose>
-  </xsl:template>
-
-  
-  <xsl:template name="loadLibrary">
-    <script type="text/javascript" src="interfaces/default/js/YAHOO.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/event.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/connection.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/dom.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/dragdrop.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/ygDDPlayer.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    <script type="text/javascript" src="interfaces/default/js/ygDDOnTop.js"><xsl:text disable-output-escaping="yes"> </xsl:text></script>
-    
-  </xsl:template>
-  
-  <xsl:template name="js-library">
-    <xsl:call-template name="loadLibrary" />	
-    <xsl:call-template name="basketCheckout" />
-  </xsl:template> 
-  
-  <!-- should be called for a documentNode -->
-  <xsl:template name="addBerry">
-    <xsl:param name="collName"/>
-    <td valign="top"><img class='pick' id="{$collName}:{@nodeID}" src="interfaces/default/images/berry3.png" alt="in basket" width="15" height="15" border="0"/></td>
-  </xsl:template>
-  
-  <xsl:template name="basketCheckout">
-    <script type="text/javascript">
-      <xsl:text disable-output-escaping="yes">
-      //used to stored the current items in berrybasket, including collection name, document id and dodument title 
-      //in the format of collection:id:[title], it is updated when the page is loaded (reloaded) or the user adds
-      // new items in the berry basket (see ygDDplayer.js). It is used to show the contents of the berry basket. 
-     var berryList =  new Array();
-     var show = false;    
- 
-     // the default width and height of the berry basket
-     var oldHeight=90;
-     var oldWidth=140;
-     var oldBg;
-
-     var dd = new ygDDOnTop('berrybasket');
-     dd.setHandleElId('baskethandle');
-
-     var checkout = function(){
-       var request_type = "GET";
-       var url = "?a=pr&amp;rt=r&amp;ro=1&amp;s=ItemNum&amp;o=XML&amp;c="; 
- 
-         var responseSuccess = function(o){
-	     var response = o.responseXML;
-             var size = response.getElementsByTagName('size').item(0).getAttribute('value');       
-           
-             var items = response.getElementsByTagName('item');
-             
-             for (var i=0;i &lt; items.length ; i++ ){
- 
-                 // remove berries images from if the berry basket has already contains this item  
-                
-                 var itemID = items[i].getAttribute('collection')+":"+items[i].getAttribute('name');
-                 var item =  YAHOO.util.Dom.get(itemID);
-                 if (item != null){
-                    var parent = item.parentNode;
-                    parent.removeChild(item);
-                   
-                   if (parent !=null &amp;&amp; parent.id == "documentberries"){
-                         var root = YAHOO.util.Dom.get(itemID+":root");
-                         var section = YAHOO.util.Dom.get(itemID+":section");
-                         if(root!=null &amp;&amp; root.id.indexOf(itemID) !=-1){
-                             parent.removeChild(root);
-                          }
-     
-	                  if(section!=null &amp;&amp; section.id.indexOf(itemID) !=-1){
-                             parent.removeChild(section);
-        	          }
-                      
-                          
-                     }
-                 }
-                                
-                  berryList[berryList.length] = items[i];                   	
-	      }
-
-               //add berryimage into the berry basket
-                updateBerryImages();         
-             
-                // set berries images visible
-             // they are set to be invisible to prevent flickering when first loaded (see berry.css) 
-            
-             var berries =document.getElementsByTagName('img');
-	     var berrybasket = new YAHOO.util.DDTarget('berrybasket','basket');
-           
-             for (var j=0; j &lt; berries.length; j++){
-          
-                  var berry = berries[j]; 
-                   var parent = berry.parentNode;
-                   
-                   
-                   if (parent !=null &amp;&amp; parent.id == "documentberries"){
-                         var root = YAHOO.util.Dom.get(berry.id+":root");
-                         var section = YAHOO.util.Dom.get(berry.id+":section");
-                         if(root!=null &amp;&amp; root.id.indexOf(berry.id) !=-1){
-                             root.style.visibility ="visible" ;
-                          }
-     
-	                  if(section!=null &amp;&amp; section.id.indexOf(berry.id) !=-1){
-                             section.style.visibility ="visible" ;
-        	          }
-                      
-                          
-                     }  
-
-               if (berry.className  &amp;&amp;  berry.className  == 'pick')
-                  { 
-                    berry.style.visibility = "visible";
-                    new ygDDPlayer(berry.id,'basket',berryList); 
-                  }   
-     	      
-             }
-           
-           }
-
-         var responseFailure = function(o){
-             
-          }  
-
-        var callback = {
-        success: responseSuccess,
-        failure: responseFailure 
-      }
-
-      YAHOO.util.Connect.asyncRequest(request_type , url , callback);
-   }
-
-    function updateBerryImages(){
-     
-      for (var i =0;i &lt; berryList.length &amp;&amp; i &lt;12 ; i++ ){
-               var berries = YAHOO.util.Dom.get('berries');
-               var img = document.createElement('img');
-               img.src = 'interfaces/default/images/berry3.png';
-               img.height = 15;
-               img.width = 15;
-               img.border = 0;              
-               berries.appendChild(img);
-          }
-
-    }
-
-    function basketUpdate(e) {
-		var target = e.target;
-               
-		if ((target.id.toLowerCase() == 'berrybasket' || target.id.toLowerCase() == 'berries')  &amp;&amp; !show){
-	       	    showBasket();
-                    show = true;
-                }
-                else{
-                    if (target.id.toLowerCase() == 'hideview' &amp;&amp; show){
-                       hideBasket();
-                       show = false;
-                    }
-                }
-           
-            if (target.className == 'pick'){
-              addBerry(target);
-            }
-            
-        }
-
-     function showBasket() {
-        var berryBasket  = YAHOO.util.Dom.get('berrybasket');  
-        var basketHandle = YAHOO.util.Dom.get('baskethandle'); 
-        var berries = YAHOO.util.Dom.get('berries');   
-        var div = document.createElement('div');
-        var list = document.createElement('ol');
-        var width = 500;
-        var height = 40;
-        var i=0;
- 
-        list.id = 'doclist';
-      
-       //remove berryImages in the berry basket 
-       while (berries.hasChildNodes()) {
-       	  berries.removeChild(berries.firstChild);
-	}
-
-       while (basketHandle.hasChildNodes()) {
-       	  basketHandle.removeChild(basketHandle.firstChild);
-	}
-
-       for (i in berryList){
-            var berryItem = berryList[i];
-            var berryElement = document.createElement('li');
-            var title = berryItem.getAttribute('title');
-            var root_title = berryItem.getAttribute('root_title'); 
-            var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name'); 
-
-            if (root_title != ""){
-              root_title +=":";
-            }
-	    
-            title = root_title+title;	
-            if (title.length > 50){
-               title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
-             }
-  
-            berryElement.appendChild(document.createTextNode(title));
-            berryElement.setAttribute("class","berryitem");
-            list.appendChild(berryElement);
-            height +=18;
-          } 
-      	   
-        oldHeight = berryBasket.style.height;
-        oldWidth = berryBasket.style.width;
-        oldBg = berryBasket.style.background; 
-        berryBasket.style.height = height;
-        berryBasket.style.width = width;
-        berryBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
-        berryBasket.style.cursor = "default";         
-        berryBasket.className = "show";
-        div.appendChild(list); 	
-        berries.appendChild(div);  
-        berries.style.height = height - 40;
-
-        var links = document.createElement('div');
-        var hideView = document.createElement('a');
-        var fullView = document.createElement('a');
-        links.appendChild(hideView);
-        links.appendChild(fullView);
-        basketHandle.appendChild(links);
-        hideView.appendChild(document.createTextNode("Hide"));
-        fullView.appendChild(document.createTextNode("Full View"));
-        hideView.setAttribute("id","hideview");
-        fullView.setAttribute("href","?a=g&amp;sa=berry&amp;c=&amp;s=DisplayList&amp;rt=r");
-        fullView.setAttribute("class","fullview");
-
-        }
-
-      function hideBasket() {
-          var i = 0;
-          var berryBasket  = YAHOO.util.Dom.get('berrybasket');  
-          var basketHandle  = YAHOO.util.Dom.get('baskethandle'); 
-          var berries = YAHOO.util.Dom.get('berries'); 
-          berryBasket.style.height = oldHeight;
-          berryBasket.style.width = oldWidth;
-          berryBasket.style.background = oldBg;
-          berryBasket.style.cursor = "pointer";
-          berryBasket.className = "hide";
-
-          while (berries.hasChildNodes()) {
-		berries.removeChild(berries.firstChild);
-	}
-         
-        while (basketHandle.hasChildNodes()) {
-		basketHandle.removeChild(basketHandle.firstChild);
-	}
-         
-        updateBerryImages();
-      }    
-
-
-     function addBerry(el){
-      var  addurl = "?a=pr&amp;rt=r&amp;ro=1&amp;s=AddItem&amp;c=&amp;s1.id=2&amp;o=XML&amp;s1.item=" + el.id;	   
-      var addSuccess = function(o){ 
- 		 var result = o.responseXML;
-                 var items = result.getElementsByTagName('item');
-                 if (items.length &gt; 0){
-                    var item = items[0];
-                    var berrybasket = YAHOO.util.Dom.get('berrybasket');
-        	    var berries = YAHOO.util.Dom.get('berries');
-                    berryList[berryList.length]= item;   
-                    var parent =el.parentNode;
-                    if (parent == null) return;     
-                    parent.removeChild(el);
-               
-                     var itemID = item.getAttribute('collection')+":"+item.getAttribute('name'); 
-                    if (parent !=null  &amp;&amp; parent.id == "documentberries"){
-                         var root = YAHOO.util.Dom.get(itemID+":root");
-                         var section = YAHOO.util.Dom.get(itemID+":section");
-                         if(root!=null  &amp;&amp; root.id.indexOf(itemID) !=-1){
-                             parent.removeChild(root);
-                          }
-     
-	                  if(section!=null  &amp;&amp; section.id.indexOf(itemID) !=-1){
-                             parent.removeChild(section);
-        	          }                                                
-                     }
-
-                    if (!YAHOO.util.Dom.get('hideview') &amp;&amp;  berryList.length &lt; 13){
-                      while (berries.hasChildNodes()) {
-       	                   berries.removeChild(berries.firstChild);
-	                }
-                        
-                     for (var i =0; i &lt; berryList.length; i++ ){
-                             var img = document.createElement('img');
-                              img.src = 'interfaces/default/images/berry3.png';
-                              img.height = 15;
-                              img.width = 15;
-                              img.border = 0;              
-                              berries.appendChild(img);
-                       }
-      	            
-                                                     
-	          }
-                 else{
-           
-                  if (YAHOO.util.Dom.get('hideview')){
-                        var berryBasket  = YAHOO.util.Dom.get('berrybasket');
-                        var berries  = YAHOO.util.Dom.get('berries');
-                        var doclist = YAHOO.util.Dom.get('doclist'); 
-                        var tid = el.id;                                  
-                        var berryItem; 
-                        var berryElement = document.createElement('li');
-                         for (var i in berryList){
-                             berryItem = berryList[i];
-                             var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
-                             if (id == tid){
-                               var title = berryItem.getAttribute('title');
-                               var root_title = berryItem.getAttribute('root_title');  
-                                if (root_title != ""){
-                                      root_title +=":";
-                                     }
-	    
-                                title = root_title+title;	
-                                if (title.length > 50){
-                                   title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
-                                }
-            
-                               berryElement.appendChild(document.createTextNode(title));
-                               berryElement.setAttribute("class","berryitem");
-                               doclist.appendChild(berryElement);
-                               var heightStr =  berryBasket.style.height+"";
-                               var height =parseInt(heightStr.substring(0,heightStr.length-2)) +18;                             
-                               berryBasket.style.height = height;
-                               berries.style.height = height;
-                               break;
-                            }
-                         }
-                             
-                      }
-                    
-                 }
-               }
-                                       
-             }
-
-           var addFailure = function(o){ }
-
-           var addcallback = {
-        	   success:addSuccess,
-     	           failure:addFailure
-                }
-
-            YAHOO.util.Connect.asyncRequest(request_type , addurl , addcallback);    
-
-         }
-
-  
-      
-     YAHOO.util.Event.addListener(window,'load', checkout); 
-     YAHOO.util.Event.addListener(window,'click', basketUpdate); 
-      </xsl:text>
-    </script>
-  </xsl:template>
-
-  <xsl:template name="berryStyleSheet">
-    <link rel="stylesheet" href="interfaces/default/style/berry.css" type="text/css"/>  
-  </xsl:template>
-  
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/classifier.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/classifier.xsl	(revision 19855)
+++ 	(revision )
@@ -1,138 +1,0 @@
-<?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"
-	xmlns:gslib="http://www.greenstone.org/skinning"
-	extension-element-prefixes="java util"
-	exclude-result-prefixes="java util">
-	
-	<!-- style includes global params interface_name, library_name -->
-	<xsl:include href="berrytools.xsl"/>
-
-	<xsl:output method="html"/> 
-
-	<!-- the main page layout template is here -->
-	<xsl:template match="/page/pageResponse">
-
-		<html>
-
-			<head>
-				<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-				<title><xsl:call-template name="pageTitle"/><xsl:text> </xsl:text></title>
-				<link rel="stylesheet" href="/interfaces/oran/style/core.css" type="text/css"/>
-			</head>
-
-			<body><gslib:textDirectionAttribute/>
-
-				<div id="container">
-
-					<gslib:displayErrorsIfAny/>
-
-					<div id="banner">
-
-						<!-- show the title -->
-						<h1>
-							<a><xsl:attribute name="href">/<xsl:value-of select="$library_name"/></xsl:attribute>
-								My Greenstone Library
-							</a> /
-						</h1>
-						<h2>
-							<a><xsl:attribute name="href">/<xsl:value-of select="collection/@name"/></xsl:attribute>
-								<gslib:collectionName/>
-							</a>
-						</h2>
-
-						<!-- show the available 'services' (browse, search, etc.) -->
-						<ul id="nav">
-							<xsl:for-each select="/page/pageResponse/collection/serviceList/service">
-								<gslib:navigationTab/>
-							</xsl:for-each>
-						</ul>
-						<div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
-						<div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
-					</div>
-
-					<div id="content">
-
-						<!-- show the classifiers (title, subject, etc.) -->
-						<div id="classifierList">
-							<ul>
-								<xsl:for-each select="service/classifierList/classifier">
-									<li><gslib:classifierLink/></li>
-								</xsl:for-each>
-							</ul>
-							<div class="clear"><xsl:text> </xsl:text></div>
-						</div>
-						
-						<gslib:berryBasket/>
-
-						<!--
-							show the clasifier results - 
-							you can change the appearance of the results by editing
-							the two templates at the bottom of this file
-						-->
-						<ul id="classifierResults">
-							<xsl:apply-templates select="classifier/*"/>
-						</ul>
-
-					</div> <!-- content -->
-
-					<div id="footer">
-						<gslib:poweredByGS3TextBar/>
-						<div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
-						<div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
-					</div>
-
-				</div>
-
-
-			</body>
-
-		</html>
-
-	</xsl:template>
-
-
-	<!--
-	TEMPLATE FOR DOCUMENTS
-	-->
-	<xsl:template match="documentNode" priority="3">
-
-		<!-- show the document details -->
-		<li class="document">
-			<a>
-
-				<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
-				<xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
-			</a>
-		</li>
-
-	</xsl:template>
-
-
-	<!--
-	TEMPLATE FOR GROUPS OF DOCUMENTS
-	-->
-	<xsl:template match="classifierNode" priority="3">
-
-		<li class="shelf">
-
-			<a>
-				<xsl:attribute name="href">
-					<xsl:value-of select="$library_name"/>?a=b&amp;rt=r&amp;s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute>
-				<xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
-			</a>
-
-			<!-- show any documents or sub-groups in this group -->
-			<xsl:if test="documentNode|classifierNode">
-				<ul>
-					<xsl:apply-templates select="documentNode|classifierNode"/>
-				</ul>
-			</xsl:if>
-		</li>
-
-	</xsl:template>
-
-</xsl:stylesheet>
-
Index: greenstone3/trunk/web/interfaces/oran/transform/config_format.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/config_format.xsl	(revision 19855)
+++ 	(revision )
@@ -1,122 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xslt="output.xsl"
-  xmlns:java="http://xml.apache.org/xslt/java"
-  xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
-  extension-element-prefixes="java">
-  
-  <xsl:output method="xml"/>
-  <xsl:namespace-alias
-    stylesheet-prefix="xslt" result-prefix="xsl"/>
-
-  <xsl:template match="format">
-    <format>
-      <xsl:apply-templates/>
-    </format>
-  </xsl:template>
-  
-  <xsl:template match="gsf:template">
-    <xslt:template>
-      <xsl:copy-of select="@*"/>
-      <xsl:attribute name="priority">2</xsl:attribute> 
-      <xsl:if test=".//gsf:link">
-	<xslt:param name="serviceName"/>
-	<xslt:param name="collName"/>
-      </xsl:if>
-      <xsl:apply-templates/>
-    </xslt:template>
-  </xsl:template>
-  
-  <xsl:template match="gsf:link">
-    <xsl:choose>
-      <xsl:when test="@type='classifier'">
-	<a><xslt:attribute name='href'><xslt:value-of select='$library_name'/>?a=b&amp;rt=r&amp;s=<xslt:value-of select='$serviceName'/>&amp;c=<xslt:value-of select='$collName'/>&amp;cl=<xslt:value-of select='@nodeID'/><xslt:if test="classifierNode|documentNode">.pr</xslt:if><xslt:if test="parent::node()[@orientation='horizontal']">&amp;sib=1</xslt:if></xslt:attribute>
-	  <xsl:apply-templates/>
-	</a>
-      </xsl:when>
-      <xsl:otherwise> <!-- a document link -->
-	<xslt:variable name="bookswitch"><xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xslt:variable>
-	<xslt:choose>
-	  <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'">
-	    <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;ed=1&amp;book=on&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
-	  </xslt:when>
-	  <xslt:otherwise>
-	    <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&amp;book=off&amp;c=<xslt:value-of select='$collName'/>&amp;d=<xslt:value-of select='@nodeID'/>&amp;dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&amp;sib=1</xslt:if>&amp;p.a=<xslt:value-of select="/page/pageRequest/@action"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a>
-	  </xslt:otherwise>
-	</xslt:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="gsf:icon">
-    <xsl:choose>
-      <xsl:when test="@type='classifier'">
-	<xslt:call-template name="bookshelfimg"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xslt:apply-templates select="." mode="displayNodeIcon"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template match="gsf:metadata[@format]">
-    <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">java:org.greenstone.gsdl3.util.XSLTUtil.<xsl:value-of select="@format"/>(metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>'], /page/@lang )</xsl:attribute></xslt:value-of>
-  </xsl:template>
-
-  <xsl:template match="gsf:metadata">
-    <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>']</xsl:attribute></xslt:value-of>
-  </xsl:template>
-
-  <xsl:template match="gsf:metadata" mode="get-metadata-name">
-    <xsl:if test="@multiple='true'">all_</xsl:if><xsl:if test='@select'><xsl:value-of select='@select'/>_</xsl:if><xsl:if test="@separator">*<xsl:value-of select='@separator'/>*_</xsl:if><xsl:value-of select="@name"/>
-  </xsl:template>
-  
-  <xsl:template match="gsf:metadata-old">
-    <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">metadataList/metadata[@name="<xsl:choose><xsl:when test="@select='parent'">parent_</xsl:when><xsl:when test="@select='root'">root_</xsl:when><xsl:when test="@select='ancestors'">ancestors'<xsl:value-of select='@separator'/>'_</xsl:when><xsl:when test="@select='siblings'">siblings_'<xsl:value-of select='@separator'/>'_</xsl:when></xsl:choose><xsl:value-of select="@name"/>"]</xsl:attribute></xslt:value-of>
-  </xsl:template>
-  
-  <xsl:template match="gsf:text">
-    <xslt:apply-templates select="nodeContent"/>
-  </xsl:template>
-  
-  <xsl:template match="gsf:choose-metadata">
-    <xslt:choose>
-      <xsl:for-each select="gsf:metadata">
-	<xslt:when><xsl:attribute name="test">metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>']</xsl:attribute>
-	  <xsl:apply-templates select="."/>
-	</xslt:when>
-      </xsl:for-each>
-      <xsl:if test="gsf:default">
-	<xslt:otherwise><xsl:apply-templates select="gsf:default"/></xslt:otherwise>
-      </xsl:if>
-    </xslt:choose>
-  </xsl:template>
-  
-  <xsl:template match="gsf:switch">
-    <xsl:variable name="meta-name"><xsl:apply-templates select="gsf:metadata" mode="get-metadata-name"/></xsl:variable>
-    <xslt:variable name="meta"><xsl:choose><xsl:when test="@preprocess"><xslt:value-of select="util:{@preprocess}(metadataList/metadata[@name='{$meta-name}'])"/></xsl:when><xsl:otherwise><xslt:value-of select="metadataList/metadata[@name='{$meta-name}']"/></xsl:otherwise></xsl:choose></xslt:variable>
-    <xslt:choose>
-      <xsl:for-each select="gsf:when">
-	<xslt:when test="util:{@test}($meta, '{@test-value}')">
-	  <xsl:apply-templates/>
-	</xslt:when>
-      </xsl:for-each>
-      <xsl:if test="gsf:otherwise">
-	<xslt:otherwise>
-	  <xsl:apply-templates select="gsf:otherwise/node()"/>
-	</xslt:otherwise>
-      </xsl:if>
-    </xslt:choose>
-  </xsl:template>
-  
-  <xsl:template match="*">
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
-
-
Index: greenstone3/trunk/web/interfaces/oran/transform/document.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/document.xsl	(revision 19855)
+++ 	(revision )
@@ -1,634 +1,0 @@
-<?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"
-  xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
-  extension-element-prefixes="java util"
-  exclude-result-prefixes="java util gsf">
-
-
-  <!-- style includes global params interface_name, library_name -->
-  <xsl:include href="style.xsl"/>
-  <xsl:include href="service-params.xsl"/>
-  <xsl:include href="berrytools.xsl"/>
-
-  <xsl:output method="html"/>
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
-    <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable>
-
-    <xsl:choose> 
-      <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'">
-	<html>
-	  <xsl:call-template name="response" />
-        </html>
-      </xsl:when>
-
-      <xsl:otherwise>    
-        <html>
-	  <head>
-	    <title>
-	      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	    </title>
-	    <xsl:call-template name="globalStyle"/>
-	    <xsl:call-template name="pageStyle"/>
-	  </head>
-          <body>
-	    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	    <div id="page-wrapper">
-	      <xsl:call-template name="response" />
-	      <xsl:call-template name="greenstoneFooter"/>
-	    </div>
-          </body>
-        </html>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-  <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 
-  <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
-  
-  <xsl:template name="pageTitle">
-    <xsl:variable name="docID" select="/page/pageResponse/document/@selectedNode"/>
-    <xsl:for-each select='/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode'><xsl:if test='position()!=1'>::</xsl:if><xsl:value-of select="metadataList/metadata[@name='Title']"/></xsl:for-each>
-  </xsl:template>
-
-  <!-- this is hard coded for GATE, should somehow do it dynamically-->
-  <xsl:template name="pageStyle">
-    <style type="text/css">
-      <xsl:text disable-output-escaping="yes">
-	span.Location {  display:inline; color : red }
-	span.Person {  display:inline; color : green }
-	span.Organization {  display:inline; color : yellow }
-	span.Date {  display:inline; color : blue }
-	span.query_term {display: inline; background-color : yellow }
-      </xsl:text>
-    </style>
-    <!--TODO: add berry basket switch-->
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
-    <xsl:if test="$berrybasketswitch = 'on'">
-      <xsl:call-template name="berryStyleSheet"/>  
-      <xsl:call-template name="js-library"/>
-    </xsl:if>
-  </xsl:template>
-  
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'">
-        <xsl:call-template name="standardPageBanner">
-	  <xsl:with-param name="collName" select="$collName"/>
-        </xsl:call-template>
-        <xsl:call-template name="navigationBar">
-	  <xsl:with-param name="collName" select="$collName"/>
-        </xsl:call-template>
-	
-        <!--<xsl:if test="$berryBaskets = 'true'">-->
-        <xsl:if test="$berrybasketswitch = 'on'">
-          <xsl:call-template name="documentBerryBasket">
-	    <xsl:with-param name="collName" select="$collName"/>
-	    <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
-	    <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
-	    <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
-          </xsl:call-template>
-        </xsl:if>
-      </xsl:when>
-    </xsl:choose>	
-
-    <!-- display the document -->
-    <xsl:if test="$bookswitch != 'flashxml'">
-      <xsl:text disable-output-escaping="yes">&lt;div id="content"&gt;</xsl:text>
-    </xsl:if>
-    <xsl:apply-templates select="document">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:apply-templates>
-    <xsl:if test="$bookswitch != 'flashxml'">
-      <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
-    </xsl:if>
-  </xsl:template>
-  
-  <xsl:template match="document">
-    <xsl:param name="collName"/>
-    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
-    <xsl:choose>
-      <xsl:when test="$external != ''">
-	<xsl:call-template name="externalPage">
-	  <xsl:with-param name="external" select="$external"/>
-	</xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:choose>
-	<xsl:when test="$bookswitch = 'flashxml'">
-	  <xsl:call-template name="xmldocumentContentPeeling">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>
-	</xsl:when>
-	
-	<xsl:when test="$bookswitch = 'on'">
-	  <xsl:call-template name="documentHeading">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>
-	  <div id="bookdiv"></div>
-	  <script type="text/javascript">
-	    <xsl:text disable-output-escaping="yes">
-	      var doc_url = document.URL; 
-	      doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
-	      doc_url += '&amp;book=flashxml';
-
-	      var flash_plug_html = ""
-	      flash_plug_html += '&lt;OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n';
-	      flash_plug_html += '  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n';
-	      flash_plug_html += '  height="100%" id="Book" swLiveConnect="true" \n';
-	      flash_plug_html += '  width="100%"&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="allowScriptAccess" value="always" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="movie" value="Book.swf';
-	      flash_plug_html += '?src_image=' + escape(img_cover);
-	      flash_plug_html += '&amp;doc_url=' + escape(doc_url)
-	      flash_plug_html += '" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="quality" value="high" /&gt;\n';
-	      flash_plug_html += '    &lt;PARAM name="bgcolor" value="#FFFFFF" /&gt;\n';
-	      flash_plug_html += '    &lt;EMBED align="middle" \n';
-	      flash_plug_html += '      allowScriptAccess="always" swLiveConnect="true" \n';
-	      flash_plug_html += '      bgcolor="#FFFFFF" height="100%" name="Book" \n';
-	      flash_plug_html += '      pluginspage="http://www.macromedia.com/go/getflashplayer" \n';
-	      flash_plug_html += '      quality="high" \n';
-	      flash_plug_html += '      src="Book.swf';
-	      flash_plug_html += '?src_image=' + escape(img_cover);
-	      flash_plug_html += '&amp;doc_url=' + escape(doc_url);
-	      flash_plug_html += '"\n'; 
-	      flash_plug_html += '      type="application/x-shockwave-flash" width="100%" /&gt;\n';
-	      flash_plug_html += '&lt;/OBJECT&gt;\n';
-	      var flash_div = document.getElementById("bookdiv");
-	      flash_div.innerHTML = flash_plug_html;
-	    </xsl:text>
-	  </script>
-	</xsl:when> 
-	<xsl:otherwise>
-	  <xsl:call-template name="documentHeading">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>
-	  
-	  <xsl:call-template name="documentArrows">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>         
-	  <xsl:call-template name="documentContent">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>
-	  <xsl:call-template name="documentArrows">
-	    <xsl:with-param name="collName" select="$collName"/>
-	  </xsl:call-template>   
-	</xsl:otherwise>
-	</xsl:choose>
-	
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="documentHeading">
-    <xsl:param name="collName"/>
-    <xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
-    <xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
-    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
-    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
-    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
-    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
-    <div id="documentheading">
-      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
-	</xsl:call-template></a>
-      <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
-    </div>
-    
-    <div id="docheadwrapper">
-      <div id="documentinfo">
-	
-	<xsl:choose>
-	  <xsl:when test="$bookswitch = 'on'">
-	    <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
-	      <div id="headingimage">
-		<xsl:call-template name="coverImage"/> 
-	      </div>
-	    </xsl:if>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
-	      <div id="headingimage">
-		<xsl:call-template name="coverImage"/> 
-	      </div>
-	    </xsl:if>
-	    
-	    <ul id="docbuttons" >
-	      <xsl:call-template name="documentButtons">
-		<xsl:with-param name="collName" select="$collName"/>
-	      </xsl:call-template>
-	    </ul>
-	  </xsl:otherwise>
-	</xsl:choose>     
-      </div>
-      <!--<div><xsl:call-template name="enrichServices">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template></div>-->
-      <xsl:if test="$bookswitch = 'off'">
-	<xsl:if test="string($doTOC) != 'false'">
-	  <div id="toc">
-	    <xsl:call-template name="TOC">
-	      <xsl:with-param name="collName" select="$collName"/>
-	    </xsl:call-template>
-	  </div>
-	</xsl:if>
-      </xsl:if>  
-    </div>
-  </xsl:template>
-
-  <xsl:template name="coverImage">
-    <xsl:choose>
-      <xsl:when test="$bookswitch = 'on'">
-	<script type="text/javascript">
-	  <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
-	</script>
-      </xsl:when>
-      <xsl:otherwise>
-	<img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="documentButtons">
-    <xsl:param name="collName"/>
-    <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
-    <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
-    <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
-    <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
-    
-    
-    <!-- expand document -->
-    <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
-      <li>
-        <xsl:choose><xsl:when test="string($ed)='1'">
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
-	    </a>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
-	    </a>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </li>
-    </xsl:if> 
-    
-    <!-- expand contents -->
-    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
-      <li>
-	<xsl:choose><xsl:when test="string($ec)='1'">
-	    <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
-	      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
-	    </a>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </li>
-    </xsl:if>
-
-    <!-- detach page -->
-    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
-    <li>
-      <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
-	<xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
-      </a></li>
-  </xsl:template>
-
-  <xsl:template name="TOC">
-    <xsl:param name="collName"/>
-    <xsl:choose>
-      <xsl:when test="@docType='hierarchy'">
-	<xsl:call-template name="hierarchicalContents">
-	  <xsl:with-param name="collName" select="$collName"/>
-	</xsl:call-template>
-      </xsl:when>
-      <xsl:when test="@docType='paged'">
-	<xsl:call-template name="pagedContents">
-	  <xsl:with-param name="collName" select="$collName"/>
-	</xsl:call-template>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template name="hierarchicalContents">
-    <xsl:param name="collName"/>
-    <xsl:variable name="oc" select="/page/pageRequest/paramList/param[@name='oc']/@value"/>
-    <xsl:variable name="d" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
-    <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
-    <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
-    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
-    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
-    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
-    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
-    <xsl:if test="documentNode[@nodeID]">
-      <ul id="tocnodes">
-	<li>
-	  <xsl:choose><xsl:when test="string($oc)='0'">
-	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
-	    </xsl:when>
-	    <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
-	  <xsl:if test="string($oc)!='0'">
-	    <ul class="tocnode">
-	      <xsl:for-each select="documentNode/documentNode[@nodeID]">
-		<xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates>
-	      </xsl:for-each>
-            </ul>
-	  </xsl:if>
-        </li> 
-      </ul>
-    </xsl:if>
-  </xsl:template>
-  
-  <!-- each icon-title pair is a row in a table. children go in a table in another row -->
-  <xsl:template match="documentNode">
-    <xsl:param name="collName"/>
-    <xsl:param name="ec"/>
-    <xsl:param name="p.a"/>
-    <xsl:param name="p.s"/>
-    <xsl:param name="p.sa"/>
-    <xsl:param name="p.c"/>
-    <!-- Display the appropriate image, depending on the node type -->
-    <li>
-      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
-	<xsl:apply-templates select="." mode="displayNodeIcon"/>
-      </a>
-      
-      <!-- Display associated title, bolded if the node has content -->
-      <xsl:choose>
-	<xsl:when test="nodeContent">
-	  <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
-	</xsl:when>
-	<xsl:otherwise>
-	  <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
-	</xsl:otherwise>
-      </xsl:choose>
-      <!-- Apply recursively to the children of this node -->
-      <xsl:if test="documentNode[@nodeID]">
-	<ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
-	    <xsl:with-param name="collName" select="$collName"/>
-	    <xsl:with-param name="ec" select="$ec"/>
-	    <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
-	    <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
-	  </xsl:apply-templates>
-	</ul>
-      </xsl:if>
-    </li>
-  </xsl:template>
-  
-  <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
-  <xsl:template name="documentContent">
-    <div class="documenttext"> 
-      <xsl:choose>
-	<xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
-	<xsl:otherwise>
-	  <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
-	</xsl:otherwise>
-      </xsl:choose>
-    </div>
-  </xsl:template>
-  
-  <xsl:template match="documentNode" mode="content">
-    <xsl:if test="nodeContent">
-      <xsl:if test="metadataList/metadata[@name='Title']">
-	<h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
-      </xsl:if>
-      <xsl:apply-templates select="nodeContent"/>
-    </xsl:if>
-  </xsl:template>
-
-  <!-- the actual text/content -->
-  <xsl:template match="nodeContent">
-    <p/>
-    <xsl:for-each select="node()">
-      <xsl:choose>
-	<xsl:when test="not(name())">
-	  <xsl:value-of select="." disable-output-escaping="yes"/>
-	</xsl:when>
-	<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-  </xsl:template>
-  
-  <xsl:template name="xmldocumentContentPeeling">
-    <xsl:choose>
-      <xsl:when test="@docType='simple'">
-	<xsl:apply-templates select="nodeContent"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:call-template name="xmlpeelingContents" />
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template name="xmlpeelingContents">
-    <xsl:if test="documentNode">
-      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template match="documentNode" mode="xmlpeeling">
-    <!-- get title -->
-    <xsl:choose>
-      <xsl:when test="nodeContent">
-	<xsl:text disable-output-escaping="yes">
-	  &lt;Section&gt;
-	  &lt;Description&gt;
-	  &lt;Metadata name="Title"&gt;
-	</xsl:text>
-	<xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
-	<xsl:text disable-output-escaping="yes">
-	  &lt;/Metadata&gt;
-	  &lt;/Description&gt;
-	</xsl:text>
-	<xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
-	<xsl:text disable-output-escaping="yes">&lt;/Sec&gt;</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-
-    <!-- recurse to the children -->
-    <xsl:if test="documentNode">
-      <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
-    </xsl:if>
-
-    <!-- end the section -->
-    <xsl:text disable-output-escaping="yes">
-      &lt;/Section&gt;
-    </xsl:text>
-  </xsl:template>
-  
-  <!-- match any file nodes -->
-  <xsl:template match="file">
-    <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
-    <xsl:choose>
-      <xsl:when test="util:isImage(@mimeType)">
-	<img src="{$httpPath}/{@href}"/>
-      </xsl:when>
-      <xsl:otherwise>
-	<a href="{$httpPath}/{@href}"><xsl:value-of select="@href"/></a>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  <!-- match any link nodes -->
-  <xsl:template match="link">
-    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 
-    <xsl:variable name="actionargs">
-      <xsl:choose>
-	<xsl:when test="@type='document'">a=d</xsl:when>
-	<xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
-	<xsl:otherwise>
-	p
-	</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="serviceargs">
-      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
-    </xsl:variable>
-    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
-  </xsl:template>
-
-  <!-- match any annotations and make them span elements -->
-  <xsl:template match="annotation">
-    <span class="{@type}"><xsl:value-of disable-output-escaping="yes" select="."/></span>
-  </xsl:template>
-  
-  <!-- paged naviagtion : INCOMPLETE!!-->
-  <xsl:template name="pagedContents">
-    <xsl:param name="collName"/>
-    <xsl:variable name="pos" select="nodeStructureInfo/info[@name='siblingPosition']/@value"/>
-    <xsl:variable name="length" select="nodeStructureInfo/info[@name='numSiblings']/@value"/>
-    <xsl:variable name="children" select="nodeStructureInfo/info[@name='numChildren']/@value"/>
-    <table>
-      <xsl:choose>
-	<xsl:when test="$pos=-1"><!-- a doc -->
-	  <tr valign="top">
-	    <td align="left">
-	    </td>
-	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
-	      </center></td>
-	    <td align="right">
-	      <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
-	    </td>
-	  </tr>
-	</xsl:when>
-	
-	<xsl:otherwise> <!-- an internal node -->	  
-	  <tr valign="top">
-	    <td align="left">
-	      <xsl:if test=" not ( $pos = 1 )">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
-	      </xsl:if>
-	    </td>
-	    <td align="center"><center>
-		<b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
-	      </center></td>
-	    <td align="right">
-	      <xsl:if test=" not($pos = $length)">
-		<a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
-	      </xsl:if>
-	    </td>
-	  </tr>
-	</xsl:otherwise>
-      </xsl:choose>
-      <tr valign="middle">
-	<td align='center' valign='top' colspan='3'>
-	  <form name="GotoForm" method="get" action="{$library_name}">
-	    <input type='hidden' name='a' value='d'/>
-	    <input type='hidden' name='c' value='{$collName}'/>
-	    <input type='hidden' name='d' value='{@selectedNode}'/>
-	    <input type="text" name="gp" size="3" maxlength="4"/>
-	    <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
-	  </form>
-	</td>
-      </tr>
-    </table>
-  </xsl:template>
-  
-  <xsl:template name="enrichServices">
-    <xsl:param name="collName"/>
-    <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
-    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
-    <xsl:for-each select="../serviceList/service">
-      <table border='1' cellspacing='0'>
-	<tr><td>
-	    <p /><xsl:value-of select="displayItem[@name='name']"/><p/>
-	    <form name="EnrichForm" method="get" action="{$library_name}">
-	      <xsl:apply-templates select="paramList"/>
-	      <input type='hidden' name='a' value='d'/>
-	      <input type='hidden' name='d' value='{$docID}'/>
-	      <input type='hidden' name='c' value='{$collName}'/>
-	      <xsl:if test='$request-params/param[@name="sib"]'>
-		<input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
-	      <input type='hidden' name='s' value='{@name}'/>
-	      <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
-	      <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
-	      <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
-	      <input type='hidden' name='end' value='1'/>
-	      <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
-	    </form>
-	  </td></tr>
-      </table>
-    </xsl:for-each>
-  </xsl:template>
-
-  <xsl:template match="paramList" mode="hidden">
-    <xsl:for-each select="param">
-      <input type='hidden' name='{@name}' value='{@value}'/><xsl:text>
-      </xsl:text>
-    </xsl:for-each>
-  </xsl:template>
-  
-  <xsl:template name="documentArrows">
-    <xsl:param name="collName"/>
-    <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
-    
-    <div class="documentarrows">
-      <xsl:if test="not(string($ed)='1')">
-	<xsl:call-template name="documentArrow">
-	  <xsl:with-param name="collName" select="$collName"/>
-	  <xsl:with-param name="direction">back</xsl:with-param>
-	</xsl:call-template>
-	<xsl:call-template name="documentArrow">
-	  <xsl:with-param name="collName" select="$collName"/>
-	  <xsl:with-param name="direction">forward</xsl:with-param>
-	</xsl:call-template>
-      </xsl:if>
-    </div>
-    
-  </xsl:template>
-  
-  <xsl:template name="documentArrow">
-    <xsl:param name="collName"/>
-    <xsl:param name="direction"/>
-    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
-    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>  
-      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
-    </xsl:if> 
-  </xsl:template>
-
-  <xsl:template name="externalPage">
-    <xsl:param name="external"/>
-    <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
-    <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
-    <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
-    </p>
-  </xsl:template>
-
-</xsl:stylesheet>
-
-
-
-
Index: greenstone3/trunk/web/interfaces/oran/transform/gli4gs3.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/gli4gs3.xsl	(revision 19855)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?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"/>  
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="pageResponse/service/applet"/>
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-    <xsl:call-template name="standardPageBanner">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>
-    
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-    <div >
-      <xsl:copy-of select="Applet"/>
-    </div>
-  </xsl:template>
-
-</xsl:stylesheet>  
-
Index: greenstone3/trunk/web/interfaces/oran/transform/help.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/help.xsl	(revision 19855)
+++ 	(revision )
@@ -1,56 +1,0 @@
-<?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"/>  
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-  
-  <xsl:template name="pageTitle">
-    <xsl:choose><xsl:when test="/page/pageResponse/*/displayItem[@name='name']"><xsl:value-of select="/page/pageResponse/*/displayItem[@name='name']"/></xsl:when><xsl:otherwise><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:otherwise></xsl:choose>: <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_t')"/>
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
-    <xsl:call-template name="standardPageBanner">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="pageType">help</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-    
-    some help text goes here
-  </xsl:template>
-  
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/home.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/home.xsl	(revision 19855)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<?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"
-	xmlns:gslib="http://www.greenstone.org/skinning"
-	extension-element-prefixes="java util"
-	exclude-result-prefixes="util java util">
-
-	<xsl:template match="page/pageResponse">
-
-		<!-- the main page layout template is here -->
-		<html>
-
-			<head>
-				<title><gslib:homePageTitle/></title>
-				<link rel="stylesheet" href="interfaces/oran/style/core.css" type="text/css"/>
-			</head>
-			
-			<body><gslib:textDirectionAttribute/>
-
-				<div id="container">
-					<gslib:displayErrorsIfAny/>
-
-					<div id="banner">
-						<h1>My Greenstone Library /</h1>
-						<h2>Home</h2>
-						<div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
-						<div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
-					</div>
-
-					<div id="content">
-
-						<div id="quickSearch">
-							<gslib:crossCollectionQuickSearchForm/>
-						</div>
-
-						<h2><gslib:selectACollectionTextBar/></h2>
-
-						<div id="collectionLinks">
-							<xsl:for-each select="collectionList/collection">
-								<gslib:collectionLinkWithImage/>
-							</xsl:for-each>
-							<br class="clear"/>
-						</div>
-
-
-						<gslib:serviceClusterList/>
-
-						<xsl:for-each select="serviceList/service[@type='query']">
-							<gslib:serviceLink/><br/>
-						</xsl:for-each>
-
-					</div>
-
-					<div id="footer">
-						<gslib:poweredByGS3TextBar/>
-						<div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
-						<div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
-					</div>
-
-				</div>
-
-			</body>
-		</html>
-	</xsl:template>
-
-</xsl:stylesheet>
-
-
Index: greenstone3/trunk/web/interfaces/oran/transform/html.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/html.xsl	(revision 19855)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<?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">
-  
-  <xsl:output method="html"/>  
-
-  <xsl:template match="page">
-    <html>
-      <head></head>
-      <frameset rows="68,*" noresize="" border="0">
-	<frame frameborder="0"><xsl:attribute name="src">?a=p&amp;sa=nav&amp;c=<xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value" /></xsl:attribute></frame>
-	<frame frameborder="0"><xsl:attribute name="src"><xsl:value-of select="/page/pageRequest/paramList/param[@name='url']/@value"/></xsl:attribute></frame>
-	<noframes>
-	  <p><xsl:value-of select="util:getInterfaceText('default', /page/@lang, 'textframebrowser')"/></p>
-	</noframes>
-      </frameset>
-    </html>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/icons.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/icons.xsl	(revision 19855)
+++ 	(revision )
@@ -1,122 +1,0 @@
-<?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">
- 
-  <!-- some global parameters - these are set by whoever is invoking the transformation -->
-  <xsl:param name="interface_name"/>
-
-  <!-- Display the appropriate image, depending on the node type -->
-  <xsl:template match="documentNode" mode="displayNodeIcon">
-    
-    <!-- Root node: book icon (open or closed) -->
-    <xsl:choose>
-      <xsl:when test="@nodeType='root'">
-	<xsl:choose>
-	  <xsl:when test="documentNode">
-	    <xsl:call-template name="openbookimg">
-	      <xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
-	    </xsl:call-template>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:call-template name="closedbookimg">
-	      <xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'open_book')"/></xsl:with-param>
-	    </xsl:call-template>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </xsl:when>
-      
-      <!-- Internal node: folder icon (open or closed) -->
-      <xsl:when test="@nodeType='internal'">
-	<xsl:choose>
-	  <xsl:when test="documentNode">
-	    <xsl:call-template name="openfolderimg">
-	      <xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_folder')"/></xsl:with-param>
-	    </xsl:call-template>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:call-template name="closedfolderimg">
-	      <xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'open_folder')"/></xsl:with-param>
-	    </xsl:call-template>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </xsl:when>
-      
-      <!-- Leaf node: page icon, and this is the default -->
-      <xsl:otherwise>
-	<xsl:call-template name="textpageimg">
-	  <xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'view_document')"/></xsl:with-param>
-	</xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="openbookimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img  border="0" width="28" height="23"
-      src="interfaces/default/images/openbook.gif"
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="closedbookimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img border="0" width="18" height="11"
-      src="interfaces/default/images/book.gif"
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="openfolderimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img border="0" width="23" height="15"
-      src="interfaces/default/images/openfldr.gif"
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="closedfolderimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img  border="0" width="23" height="15"
-      src="interfaces/default/images/clsdfldr.gif"
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="textpageimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img  border="0" width="16" height="21"
-      src="interfaces/default/images/itext.gif"
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="bookshelfimg">
-    <xsl:param name="alt"/>
-    <xsl:param name="title"/>
-    <img  border="0" width="20" height="16"
-      src="interfaces/default/images/bshelf.gif"  
-      alt="{$alt}" title="{$title}"/>
-  </xsl:template>
-
-  <xsl:template name="iconpdf">
-    <xsl:param name="alt">PDF</xsl:param>
-    <xsl:param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'texticonpdf')"/></xsl:param>
-    <img border="0" width='26' height='26' 
-      src='interfaces/default/images/ipdf.gif' 
-      alt='{$alt}' title='{$title}'/>
-  </xsl:template>
-  
-  <xsl:template name="icondoc">
-    <xsl:param name="alt">Word</xsl:param>
-    <xsl:param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'texticonmsword')"/></xsl:param>
-    <img border="0" width='26' height='26' 
-      src='interfaces/default/images/imsword.gif' 
-      alt='{$alt}' title='{$title}'/>
-  </xsl:template>
-
-</xsl:stylesheet>
-
Index: greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl	(revision 19856)
@@ -0,0 +1,107 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="util java util">
+
+	<!-- the name of the site -->
+	<xsl:template name="site-title">My Greenstone Library</xsl:template>
+	<xsl:template name="site-linked-title"><a href="./">My Greenstone Library</a></xsl:template>
+
+	<!-- the output format for this layout is html -->
+	<xsl:output method="html"/>  
+
+	<!-- the main layout is defined here -->
+	<xsl:template match="/">
+
+		<html>
+
+			<head>
+				<title><xsl:call-template name="title"/> :: <xsl:call-template name="site-title"/></title>
+				<link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
+				<script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
+				<xsl:call-template name="berryBasketHeadTags"/>
+			</head>
+			
+			<body><xsl:call-template name="textDirectionAttribute"/>
+
+				<div id="container"><div id="container2"><div id="container3"><div id="container4">
+					<xsl:call-template name="displayErrorsIfAny"/>
+
+					<div id="banner">
+
+						<!-- show the title -->
+						<h1><xsl:call-template name="site-linked-title"/> /</h1>
+						<h2><xsl:call-template name="linked-title"/></h2>
+
+						<!-- show home, help, preferences links -->
+						<ul id="bannerLinks">
+
+							<!-- preferences -->
+							<li>
+								<a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
+									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
+							    	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
+								</a>
+							</li>
+
+							<!-- help
+							<li>
+								<a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
+									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
+								    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
+								</a>
+							</li>
+							 -->
+
+							<!-- home
+							<li>
+								<a href="{$library_name}?a=p&amp;amp;sa=home">
+									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
+								    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
+								</a>
+							</li>
+							 -->
+
+						</ul>			
+
+						<!-- show the available 'services' (browse, search, etc.) -->
+						<xsl:if test="/page/pageResponse/collection/serviceList/service">
+							<ul id="nav">
+								<xsl:for-each select="/page/pageResponse/collection/serviceList/service">
+									<xsl:call-template name="navigationTab"/>
+								</xsl:for-each>
+							</ul>
+						</xsl:if>
+
+					</div>
+
+					<div id="content">
+						<!--
+							show the content of the page.
+							to customise this part, edit the xsl file for the page you want to edit
+						-->
+						<xsl:apply-templates select="/page"/>
+					</div>
+
+					<div id="footer">
+						<xsl:call-template name="poweredByGS3TextBar"/>
+					</div>
+
+					<div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
+					<div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
+					<div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
+					<div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
+
+				</div></div></div></div>
+
+			</body>
+		</html>
+	</xsl:template>
+
+</xsl:stylesheet>
+
+
Index: greenstone3/trunk/web/interfaces/oran/transform/nav.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/nav.xsl	(revision 19855)
+++ 	(revision )
@@ -1,46 +1,0 @@
-<?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 match="page">
-    <html>
-      <head>
-	<title>
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<base target="_top"/>
-      </head>
-      <body style="background-image: none;">
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<xsl:apply-templates select="pageResponse"/>
-      </body>
-    </html>
-  </xsl:template>
-
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="/page/pageResponse/*/displayItem[@name='name']"/>
-  </xsl:template>
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
-    <div align="right">
-      <xsl:call-template name="top-buttons">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
-    </div>
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-  </xsl:template>
-
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/about.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/about.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/about.xsl	(revision 19856)
@@ -0,0 +1,28 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+
+	<!-- set to the oran layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
+	<xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
+
+	<!-- <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template> -->
+
+	<xsl:template match="/page">
+  
+		<!--Display the description text of the current collection,
+		and if some services are available then create a list
+		of links for each service within a <ul id="servicelist"> element.-->
+		<gslib:collectionDescriptionTextAndServicesLinks/>
+	</xsl:template>
+
+
+</xsl:stylesheet>  
+
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/berry.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/berry.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/berry.xsl	(revision 19856)
@@ -0,0 +1,49 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</xsl:template>
+	<xsl:template name="linked-title"><a href=""><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</a></xsl:template>
+
+	<!-- the main page layout template is here -->
+	<xsl:template match="/page">
+		<xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
+		<script type="text/javascript" src="/interfaces/oran/js/berrycheckout.js"><xsl:text> </xsl:text></script>
+		<script type="text/javascript">
+			<xsl:for-each select="/page/pageResponse/collection/item">
+				<xsl:text disable-output-escaping="yes">var doc = new Array();
+				</xsl:text>
+				<xsl:for-each select="@*">
+					<xsl:text disable-output-escaping="yes">doc["</xsl:text><xsl:value-of select="name()" /><xsl:text disable-output-escaping="yes">"]='</xsl:text><xsl:value-of select="." /><xsl:text disable-output-escaping="yes">';
+					</xsl:text>
+				</xsl:for-each>
+				<xsl:text disable-output-escaping="yes">docList[docList.length] = doc;
+				</xsl:text>
+			</xsl:for-each>
+		</script>
+
+		<div class="navList" id="berryCheckoutOptions">
+			<ul>
+				<li id="fullview" class="current"><span>Full View</span></li>
+				<li id="textview"><span>Text View</span></li>
+				<li id="email"><span>Email</span></li>
+			</ul>
+			<div class="clear"><xsl:text> </xsl:text></div>
+		</div>
+		<div id="berryBasketContent"><span><xsl:text> </xsl:text></span></div>
+
+	</xsl:template>
+
+
+
+</xsl:stylesheet>  
+
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/classifier.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/classifier.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/classifier.xsl	(revision 19856)
@@ -0,0 +1,96 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<xsl:include href=".old/berrytools.xsl"/>
+
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
+	<xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
+
+	<!-- the page content is here -->
+	<xsl:template match="/page/pageResponse">
+
+
+		<!-- show the classifiers (title, subject, etc.) -->
+		<div id="classifierList" class="navList">
+			<ul>
+				<xsl:for-each select="service/classifierList/classifier">
+					<li><gslib:classifierLink/></li>
+				</xsl:for-each>
+			</ul>
+			<div class="clear"><xsl:text> </xsl:text></div>
+		</div>
+
+		<!-- this right sidebar -->
+		<div id="rightSidebar">
+			<!-- show the berry basket if it's turned on -->
+			<gslib:berryBasket/>
+			<xsl:text> </xsl:text>
+		</div>
+	
+		<!--
+			show the clasifier results - 
+			you can change the appearance of the results by editing
+			the two templates at the bottom of this file
+		-->
+		<ul id="classifierResults">
+			<xsl:apply-templates select="classifier/*"/>
+		</ul>
+		<div class="clear"><xsl:text> </xsl:text></div>
+
+	</xsl:template>
+
+
+	<!--
+	TEMPLATE FOR DOCUMENTS
+	-->
+	<xsl:template match="documentNode" priority="3">
+
+		<!-- show the document details -->
+		<li class="document">
+
+			<a>
+				<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
+				<xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
+			</a>
+			<xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
+
+		</li>
+
+	</xsl:template>
+
+
+	<!--
+	TEMPLATE FOR GROUPS OF DOCUMENTS
+	-->
+	<xsl:template match="classifierNode" priority="3">
+
+		<li class="shelf">
+
+			<a>
+				<xsl:attribute name="href">
+					<xsl:value-of select="$library_name"/>?a=b&amp;rt=r&amp;s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute>
+				<xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
+			</a>
+
+			<!-- show any documents or sub-groups in this group -->
+			<xsl:if test="documentNode|classifierNode">
+				<ul>
+					<xsl:apply-templates select="documentNode|classifierNode"/>
+				</ul>
+			</xsl:if>
+		</li>
+
+	</xsl:template>
+
+</xsl:stylesheet>
+
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/document.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/document.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/document.xsl	(revision 19856)
@@ -0,0 +1,138 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util gsf">
+
+	<!-- style includes global params interface_name, library_name -->
+	<xsl:include href=".old/berrytools.xsl"/>
+
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><gslib:collectionName/></xsl:template>
+	<xsl:template name="linked-title"><a><xsl:attribute name="href">/<xsl:value-of select="collection/@name"/></xsl:attribute><gslib:collectionName/></a></xsl:template>
+
+	<xsl:template match="/page/pageResponse/document">
+
+		<!-- show the little berries for this document -->
+		<xsl:call-template name="documentBerryForDocumentPage"/>
+
+		<!-- the sidebar -->
+		<div id="rightSidebar">
+
+			<!-- show the berry basket if it's turned on -->
+			<gslib:berryBasket/>
+
+			<!-- the book's cover image -->
+			<div id="coverImage"><gslib:coverImage/></div>
+			<br/>
+
+			<!-- the contents -->
+			<ul id="tableOfContents">
+				<xsl:apply-templates select="documentNode/documentNode"/>
+			</ul>
+
+		</div>
+
+		<!-- display the document -->
+		<xsl:choose>
+
+			<xsl:when test="@external != ''">
+				<xsl:call-template name="externalPage">
+					<xsl:with-param name="external" select="@external"/>
+				</xsl:call-template>
+			</xsl:when>
+
+			<xsl:otherwise>
+				<!-- document heading -->
+				<xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
+				<xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
+				<xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
+				<xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
+				<xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
+				<xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
+
+				<div id="documentheading">
+
+					<!--<a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>-->
+
+					<xsl:choose>
+						<xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when>
+						<xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise>
+					</xsl:choose>
+
+				</div>
+
+				<div class="documenttext"> 
+					<xsl:for-each select="descendant-or-self::node()/nodeContent">
+						<h3><xsl:value-of disable-output-escaping="yes" select="../metadataList/metadata[@name='Title']"/></h3>
+						<xsl:for-each select="node()">
+							<xsl:choose>
+								<xsl:when test="not(name())">
+									<xsl:value-of select="." disable-output-escaping="yes"/>
+								</xsl:when>
+								<xsl:otherwise>
+									<xsl:apply-templates select="."/>
+								</xsl:otherwise>
+							</xsl:choose>
+						</xsl:for-each>
+					</xsl:for-each>
+				</div>
+
+				<gslib:previousNextButtons/>
+
+			</xsl:otherwise>
+		</xsl:choose>
+
+		<div class="clear"><xsl:text> </xsl:text></div>
+
+	</xsl:template>
+
+	<xsl:template match="documentNode">
+
+		<!-- check if this is the currently selected table of contents item -->
+		<xsl:variable name="isCurrent" select="nodeContent"/>
+
+		<!-- formulate the link -->
+		<xsl:variable name="contentsLink">
+			<xsl:value-of select='$library_name'/>?
+			a=d&amp;
+			c=<gslib:collectionShortName/>&amp;
+			d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;
+			sib=1&amp;
+			<!--<xsl:if test="string($ec) = '1'">ec=1&amp;</xsl:if>
+			p.a=<xsl:value-of select="$p.a"/>&amp;
+			p.sa=<xsl:value-of select="$p.sa"/>&amp;
+			p.s=<xsl:value-of select="$p.s"/>&amp;
+			p.c=<xsl:value-of select="$p.c"/>-->
+		</xsl:variable>
+
+		<li>
+			<!-- display this item from the table of contents -->
+			<xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
+			<a>
+				<xsl:attribute name="href"><xsl:value-of select="translate( $contentsLink , ' ', '' )"/></xsl:attribute>
+				<xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
+			</a>
+
+			<!-- display any child items -->			
+			<xsl:if test="documentNode">
+				<ul>
+					<xsl:apply-templates select="documentNode"/>
+				</ul>
+			</xsl:if>
+
+		</li>
+
+	</xsl:template>
+
+	<xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
+
+</xsl:stylesheet>
+
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/help.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/help.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/help.xsl	(revision 19856)
@@ -0,0 +1,22 @@
+<?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">
+  
+	<!-- choose the main layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- title -->
+	<xsl:template name="title">Help</xsl:template>
+	<xsl:template name="linked-title">Help</xsl:template>
+
+	<!-- the main page layout template is here -->
+	<xsl:template match="page">
+		Help text goes here
+	</xsl:template>
+ 
+  
+</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/home.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/home.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/home.xsl	(revision 19856)
@@ -0,0 +1,44 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="util java util">
+
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template>
+	<xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template>
+
+	<!-- the page content is here -->
+	<xsl:template match="/page/pageResponse">
+
+		<div id="quickSearch">
+			<gslib:crossCollectionQuickSearchForm/>
+		</div>
+
+		<h2><gslib:selectACollectionTextBar/></h2>
+
+		<div id="collectionLinks">
+			<xsl:for-each select="collectionList/collection">
+				<gslib:collectionLinkWithImage/>
+			</xsl:for-each>
+			<br class="clear"/>
+		</div>
+
+
+		<gslib:serviceClusterList/>
+
+		<xsl:for-each select="serviceList/service[@type='query']">
+			<gslib:serviceLink/><br/>
+		</xsl:for-each>
+
+	</xsl:template>
+
+</xsl:stylesheet>
+
+
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/pref.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/pref.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/pref.xsl	(revision 19856)
@@ -0,0 +1,92 @@
+<?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=".old/style.xsl"/>
+
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template>
+	<xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template>
+
+	<!-- the page content is here -->
+	<xsl:template match="/page">
+
+		<xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
+		<xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
+
+		<div id="queryform">
+			<form name="PrefForm" method="get" action="{$library_name}">
+
+				<input type='hidden' name='a' value='p'/>
+				<input type='hidden' name='sa' value='pref'/>
+				<input type='hidden' name='c' value="{$collName}"/>
+
+				<!-- presentation preferences -->
+				<h3 class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></h3>
+				<ul id="presprefs">
+					<li>
+						<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/>
+						<select name="l">
+							<xsl:for-each select="/page/pageResponse/languageList/language">
+								<option value="{@name}"><xsl:if test="@name=/page/@lang"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
+							</xsl:for-each>
+						</select>
+
+					</li>
+					<li>
+						<span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>
+					</li>
+				</ul>
+
+				<!-- berry baskets -->
+				<ul id="berrybasketprefs">
+					<xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+					<li>
+						<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/>
+						<select name="berrybasket">
+							<option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
+							<option value="off"><xsl:if test="$berrybasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
+						</select>
+					</li>
+				</ul>
+
+				<!-- tidy (?) -->
+				<xsl:if test="$tidyoption='tidy'">
+					<xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
+					<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book">
+						<option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
+						<option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
+					</select>
+				</xsl:if>
+
+				<!-- search preferences -->
+				<h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3>
+				<ul id="searchprefs">
+					<xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 
+					<li>
+						<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 
+						<select name="hitsPerPage">
+							<option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 
+							<option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
+							<option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
+							<option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
+						</select>
+					</li>
+				</ul>
+
+				<input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
+
+			</form>
+		</div>
+
+	</xsl:template>
+
+</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/pages/query.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pages/query.xsl	(revision 19856)
+++ greenstone3/trunk/web/interfaces/oran/transform/pages/query.xsl	(revision 19856)
@@ -0,0 +1,205 @@
+<?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"
+	xmlns:gslib="http://www.greenstone.org/skinning"
+	extension-element-prefixes="java util"
+	exclude-result-prefixes="java util">
+	
+	<!-- make this page use the 'main' layout -->
+	<xsl:include href="layouts/main.xsl"/>
+
+	<!-- set page title and subtitle-->
+	<xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
+	<xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
+
+	<!-- the main page layout template is here -->
+	<xsl:template match="/page/pageResponse/service">
+
+		<form name="QueryForm" method="get" action="{$library_name}">
+			<div>
+				<input type="hidden" name="a" value="q"/>
+				<input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input>
+				<input type="hidden" name="rt" value="rd"/>
+				<input type="hidden" name="s" value="{@name}"/>
+				<input type="hidden" name="c" value="{$collName}"/>
+				<xsl:if test="not(paramList/param[@name='startPage'])">
+					<input type="hidden" name="startPage" value="1"/>
+				</xsl:if>
+
+				<xsl:apply-templates select="paramList"/>
+
+				<input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
+			
+			</div>
+		</form>
+
+		<xsl:if test="contains(/page/pageRequest/paramList/param[@name='rt']/@value, 'r')">
+			<xsl:call-template name="query-response">
+				<xsl:with-param name="collName" select="$collName"/>
+			</xsl:call-template>
+		</xsl:if>
+
+	</xsl:template>
+
+	<xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/service"/></xsl:template>
+
+
+  <!-- the default param list handling -->
+  <xsl:template match="paramList">
+    <xsl:param name="ns">s1.</xsl:param>
+    <ul id="queryitemlist">
+      <xsl:for-each select="param">
+	<xsl:choose>
+	  <xsl:when test="@type='multi'">
+	    <li><xsl:apply-templates select='.'><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
+	    <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+  
+  <!-- puts all the params into a=p&p=h type form - need to change this if use 
+  multi params  -->
+  <xsl:template match="paramList" mode="cgi">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:for-each select="param">
+      <xsl:variable name='pname' select="@name"/>
+      <xsl:text>&amp;</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates>
+    </xsl:for-each>
+  </xsl:template>
+
+  <xsl:template match="param" mode="calculate-default">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable>
+    <xsl:choose>
+      <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]">
+	<xsl:choose>
+	  <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text>
+	    <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]">
+	      <xsl:value-of select="@value"/>,
+	    </xsl:for-each>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="@default"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
+  <xsl:template match="param[@type='invisible']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <input type='hidden' name='{$ns}{@name}' value='{@default}'/>
+  </xsl:template>
+  <!-- boolean params -->
+  <xsl:template match="param[@type='boolean']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <select name='{$ns}{@name}'>
+      <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option>
+      <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option>
+    </select>
+  </xsl:template>
+  
+  <!-- integer params -->
+  <xsl:template match="param[@type='integer']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/>
+  </xsl:template>
+
+  <!-- single selection enum params -->
+  <xsl:template match="param[@type='enum_single']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <xsl:choose>
+      <xsl:when test="count(option) = 1">
+	<xsl:value-of select="option/displayItem[@name='name']"/>
+	<input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input>
+      </xsl:when>
+      <xsl:otherwise>
+	<select name="{$ns}{@name}">
+	  <xsl:for-each select="option">
+	    <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
+	  </xsl:for-each>
+	</select>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+
+  <!-- multiple selection enum params -->
+  <!-- how to do defaults for this?? -->
+  <xsl:template match="param[@type='enum_multi']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <select name="{$ns}{@name}" size='2'><xsl:attribute name="multiple"></xsl:attribute>
+      <xsl:for-each select="option">
+	<option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
+      </xsl:for-each>
+    </select>
+  </xsl:template>
+  
+  <!-- string params -->
+  <xsl:template match="param[@type='string']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <input type="text" name="{$ns}{@name}" size="50" value="{$default}"/>
+  </xsl:template>
+  
+  <!-- large string  params -->
+  <xsl:template match="param[@type='text']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="default"/>
+    <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea>
+  </xsl:template>
+
+  <!-- multi params - params that are combinations of other params -->
+  <xsl:template match="param[@type='multi']">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:variable name="parent" select="@name"/>
+    <table>
+      <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
+      	<xsl:for-each select="param">
+	  <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
+	</xsl:for-each>
+      </tr>
+      
+      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="param[@type='multi']" mode="contents">
+    <xsl:param name="ns">s1.</xsl:param>
+    <xsl:param name="occurs">1</xsl:param>
+    <xsl:variable name="pos" select="@occurs - $occurs"/>	
+    <tr class="queryfieldrow"><xsl:for-each select="param">
+	<xsl:variable name="pname" select="@name"/>
+	<xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
+	<td class="queryfieldcell"><xsl:choose>
+	    <xsl:when test="not(@ignore) or  @ignore != $pos">      
+	      <xsl:apply-templates select='.'><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
+	    </xsl:when>
+	    <xsl:otherwise><!-- put in a hidden placeholder -->
+	      <input type="hidden" name='{$ns}{@name}' value=''/>
+	    </xsl:otherwise>
+	  </xsl:choose></td>
+      </xsl:for-each></tr>
+    <!-- recursively call this template to get multiple entries -->
+    <xsl:if test="$occurs &gt; 1">
+      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
+    </xsl:if>
+  </xsl:template>
+
+
+</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/pref.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/pref.xsl	(revision 19855)
+++ 	(revision )
@@ -1,121 +1,0 @@
-<?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"/>  
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-  
-  <xsl:template name="pageTitle">
-    <xsl:choose><xsl:when test="/page/pageResponse/*/displayItem[@name='name']"><xsl:value-of select="/page/pageResponse/*/displayItem[@name='name']"/></xsl:when><xsl:otherwise><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:otherwise></xsl:choose>: <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_t')"/>
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
-    
-    <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>
-    
-    <xsl:call-template name="standardPageBanner">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="pageType">pref</xsl:with-param>
-    </xsl:call-template>
-
-    <xsl:call-template name="navigationBar">
-      <xsl:with-param name="collName" select="$collName"/>
-    </xsl:call-template>      
-    <div id="qureyform">
-      <form name="PrefForm" method="get" action="{$library_name}">
-	<input type='hidden' name='a' value='p'/>
-	<input type='hidden' name='sa' value='pref'/>
-	<input type='hidden' name='c' value="{$collName}"/>
-	<div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div>
-	<ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul>
-	<ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul>
-	
-	<xsl:if test="$tidyoption='tidy'">
-	  <ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul>
-	</xsl:if>
-	
-	<div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div>
-	<ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul>
-	<input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
-      </form>
-    </div>
-  </xsl:template>
-  
-  <xsl:template name="pres-prefs">
-    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li>
-    <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li>
-  </xsl:template>
-  
-  <xsl:template name="lang-list">
-    <xsl:variable name="current" select="/page/@lang"/>
-    <select name="l">
-      <xsl:for-each select="/page/pageResponse/languageList/language">
-	<option value="{@name}"><xsl:if test="@name=$current"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
-      </xsl:for-each>
-    </select>
-  </xsl:template>
-  
-  <xsl:template name="search-prefs">
-    <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 
-    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 
-      <select name="hitsPerPage">
-	<option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 
-	<option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
-	<option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
-	<option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
-      </select>
-    </li>
-  </xsl:template>
-
-  <xsl:template name="berrybasket-prefs">
-    <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
-    
-    <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/> <select name="berrybasket">
-        <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
-	<option value="off"><xsl:if test="$berrybasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
-      </select>
-    </li>
-  </xsl:template>
-
-  <xsl:template name="book-prefs">
-    <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
-    
-    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book">
-      <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 
-      <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
-    </select>
-    
-  </xsl:template>
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/process.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/process.xsl	(revision 19855)
+++ 	(revision )
@@ -1,93 +1,0 @@
-<?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:include href="service-params.xsl"/>
-
-  <xsl:output method="html"/>  
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/>
-  </xsl:template>
-
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-
-
-  <xsl:template match="pageResponse">
-    <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
-    <center>
-      <xsl:call-template name="standardPageBanner">
-	<xsl:with-param name="collName" select="$clusterName"/>
-      </xsl:call-template>
-      <xsl:call-template name="navigationBar">
-	<xsl:with-param name="collName" select="$clusterName"/>
-      </xsl:call-template>      
-      <xsl:apply-templates select="service">
-	<xsl:with-param name="clusterName" select="$clusterName"/>
-      </xsl:apply-templates>
-      <xsl:apply-templates select="status">
-	<xsl:with-param name="clusterName" select="$clusterName"/>
-      </xsl:apply-templates>
-    </center>
-  </xsl:template>
-
-  <xsl:template match="service">
-    <xsl:param name="clusterName"/>
-    <xsl:variable name='subaction' select="/page/pageRequest/@subaction"/>
-    <xsl:variable name='action' select="/page/pageRequest/@action"/>
-    <xsl:variable name='lang' select="/page/@lang"/>
-    <p/>
-    <form name="BuildForm" method="get" action="{$library_name}">
-      <xsl:apply-templates select="paramList"/>
-      <input type="hidden" name="a" value="{$action}"/>
-      <input type="hidden" name="c" value="{$clusterName}"/>
-      <input type="hidden" name="sa" value="p"/>
-      <input type="hidden" name='l' value='{$lang}'/>
-      <input type="hidden" name="s" value="{@name}"/>
-      <input type="hidden" name="rt" value="r"/>
-      <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
-    </form>
-    <xsl:call-template name="dividerBar"/>
-  </xsl:template>
-  
-  <xsl:template match="status">
-    <xsl:param name="clusterName"/>
-    <center/>
-    <applet code="org.greenstone.gsdl3.build.StatusDisplay.class" codebase='lib' archive='gsdl3.jar, xercesImpl.jar, xml-apis.jar' width='600' height='150'>The status display applet.
-      <param name='library'><xsl:attribute name="value"><xsl:value-of select='$library_name'/>?a=pr&amp;rt=s&amp;c=<xsl:value-of select='$clusterName'/>&amp;s=<xsl:value-of select='/page/pageResponse/service/@name'/>&amp;o=xml&amp;ro=1&amp;l=<xsl:value-of select='/page/@lang'/>&amp;pid=<xsl:value-of select="@pid"/><xsl:apply-templates select="/page/pageResponse/service/paramList" mode="cgi"/></xsl:attribute></param>
-      <param name='initial_text'><xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute></param>
-      <param name='initial_code'><xsl:attribute name="value"><xsl:value-of  select="@code"/></xsl:attribute></param></applet>
-    <xsl:call-template name="dividerBar"/>
-  </xsl:template>
-
-  
-</xsl:stylesheet>  
-
Index: greenstone3/trunk/web/interfaces/oran/transform/query.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/query.xsl	(revision 19855)
+++ 	(revision )
@@ -1,138 +1,0 @@
-<?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"
-	xmlns:gslib="http://www.greenstone.org/skinning"
-	extension-element-prefixes="java util"
-	exclude-result-prefixes="java util">
-	
-	<xsl:output method="html"/>
-
-	<!-- the main page layout template is here -->
-	<xsl:template match="/page/pageResponse">
-		<xsl:for-each select="/">
-			
-		</xsl:for-each>
-
-		<html>
-			<head>
-
-				<!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-				<title><xsl:call-template name="pageTitle"/><xsl:text> </xsl:text></title>
-
-				<link rel="stylesheet" href="interfaces/oran/style/core.css" type="text/css"/>
-
-				<!-- todo: add berry basket stylesheets and javascript -->
-			</head>
-
-			<body><gslib:textDirectionAttribute/>
-
-				<div id="container">
-				    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable> 
-				    <xsl:variable name="requesttype"><xsl:value-of select="/page/pageRequest/paramList/param[@name='rt']/@value"/></xsl:variable> 
-					<xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
-					<div id="banner">
-						<p>
-							<a href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={$collName}">
-								<xsl:choose>
-									<xsl:when test="$this-element/displayItem[@name='icon']">
-										<img>
-											<xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/></xsl:attribute>
-											<xsl:attribute name="alt"><xsl:value-of select="$this-element/displayItem[@name='name']"/></xsl:attribute>
-											<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/></xsl:attribute>
-										</img>
-									</xsl:when>
-									<xsl:otherwise>
-										<xsl:value-of select="$this-element/displayItem[@name='name']"/>
-									</xsl:otherwise>
-								</xsl:choose>
-							</a>
-						</p>
-
-						<ul id="bannerlist"> 
-
-							<!-- home -->
-							<li>
-								<a href="{$library_name}?a=p&amp;amp;sa=home">
-									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
-									<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
-							    </a>
-							</li>
-
-							<!-- help -->
-							<li>
-								<a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
-									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
-								    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
-								</a>
-							</li>
-
-							<!-- preferences -->
-							<li>
-								<a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
-									<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
-							    	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
-								</a>
-							</li>
-
-						</ul>
-
-					</div>
-
-<!--
-				    <xsl:call-template name="navigationBar">
-				      <xsl:with-param name="collName" select="$collName"/>
-				    </xsl:call-template>
--->
-
-					    <div id="content">
-
-					    	<xsl:apply-templates select="/page/pageResponse/service"/>
-
-							<xsl:if test="contains($requesttype, 'r')">
-								<xsl:call-template name="query-response">
-									<xsl:with-param name="collName" select="$collName"/>
-								</xsl:call-template>
-							</xsl:if>
-					    </div>
-
-				    <xsl:if test="descendant::error">
-				      <script language="Javascript">
-					<xsl:text disable-output-escaping="yes">
-					  function removeAllChildren(node) {
-					    while (node.hasChildNodes()) {
-					      node.removeChild(node.firstChild);
-					    }
-					  }
-
-					  function toggleHideError(obj) {
-					    if (obj.style.display == "none") {
-					      obj.style.display = "";
-					      hide_link = document.getElementById("hide");
-					      removeAllChildren(hide_link);
-					      hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">"));
-					    } else {
-					      obj.style.display = "none";
-					      hide_link = document.getElementById("hide");
-					      removeAllChildren(hide_link);
-					      hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">"));
-					    } 
-					  }
-					</xsl:text>
-				      </script>
-				      <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p>
-				      <div id="error" style="display: none;">
-					<xsl:apply-templates select="descendant::error"/>
-				      </div>
-				    </xsl:if>
-
-
-					<xsl:call-template name="greenstoneFooter"/>
-				</div>
-			</body>
-
-		</html>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/querytools.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/querytools.xsl	(revision 19855)
+++ 	(revision )
@@ -1,157 +1,0 @@
-<?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">
-
-  <!-- have changed this so it uses service hitsPerPage and startPage if the service description has a param called hitsPerPage,  otherwise uses interface ones -->
-  <xsl:template name="resultNavigation">
-    <xsl:param name="collName"/>
-    <div class="resultnavigation">  
-      <!-- hits type -->
-      <xsl:variable name='ht'>
-	<xsl:choose>
-	  <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when>
-	  <xsl:otherwise>i</xsl:otherwise>
-	</xsl:choose>
-      </xsl:variable>
-      
-      <xsl:variable name="param-list" select="/page/pageRequest/paramList"/>
-      <!-- hits per page -->
-      <xsl:variable name="hpp">
-	<xsl:choose>
-	  <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when>
-	  <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when>
-	  <xsl:otherwise>20</xsl:otherwise>
-	</xsl:choose>
-      </xsl:variable>
-      <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata -->
-      <xsl:variable name="td">
-	<xsl:choose>
-	  <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']">
-	    <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/>
-	  </xsl:when>
-	  <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']">
-	    <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/>
-	  </xsl:when>
-	  <xsl:otherwise> <!-- this is just a fall back - should always have the metadata -->
-	    <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/>
-	  </xsl:otherwise>	
-	</xsl:choose>
-      </xsl:variable>
-
-      <!-- only continue if hpp != -1 and td > hpp -->
-      <xsl:if test="not($hpp=-1) and $td &gt; $hpp">
-	<!-- start page -->
-	<xsl:variable name="here">
-	  <xsl:choose>
-	    <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when>
-	    <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when>
-	    <xsl:otherwise>1</xsl:otherwise>
-	  </xsl:choose>
-	</xsl:variable>
-	<xsl:variable name="sa" select="/page/pageRequest/@subaction"/>
-	<xsl:variable name="service" select="$param-list/param[@name='s']/@value"/>
-	<xsl:variable name="prev" select="$here - 1"/>
-	<xsl:variable name="next" select="$here + 1"/>
-	<xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable>
-	
-	<div>   
-	  <div>
-	    <xsl:if test="$here &gt; 1"><a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if>
-	    
-	    
-	    <xsl:if test="(($here * $hpp) + 1)  &lt; $td">
-	      <xsl:variable name='m' select="number($next * $hpp)"/>
-	      <xsl:variable name='mm'><xsl:choose><xsl:when test="$m &lt; $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable>
-	      <a href="{$library_name}?a=q&amp;sa={$sa}&amp;c={$collName}&amp;s={$service}&amp;rt=rd&amp;{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div>
-	</div>
-      </xsl:if>
-    </div>
-  </xsl:template>
-  
-  <xsl:template name="matchDocs">
-    <!-- If the number of matching documents is known, display it -->
-    <div id="matchdocs">
-      <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>
-      <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>
-      <xsl:choose>
-	<xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'">
-	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>
-	</xsl:when>
-	<xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'">
-	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>
-	</xsl:when>
-	<xsl:when test="$numDocsMatched">
-	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>
-	  <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>
-	</xsl:when>
-	<xsl:when test="$numDocsReturned">
-	  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>
-	</xsl:when>
-      </xsl:choose>
-    </div>
-  </xsl:template>
-
-  <!-- paging is now done by the query action, so here we just print out all the docs that we have -->
-  <xsl:template name="resultList">
-    <xsl:param name="collName"/>
-    <ul id="resultlist"> 
-      <xsl:for-each select="documentNodeList/documentNode">
-	<li><table>
-	    <xsl:call-template name="documentNodeWrapper">
-	      <xsl:with-param name="collName" select="$collName"/>
-	      <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>
-	    </xsl:call-template>
-	  </table>
-	</li>	    
-      </xsl:for-each>  
-    </ul>
-  </xsl:template>
-  
-  <!-- this is a wrapper node, which the interface can use to add stuff into the query results that isn't part of and doesn't depend on the documentNode template which may come from the collection -->
-  <xsl:template name="documentNodeWrapper">
-    <xsl:param name="collName"/>
-    <xsl:param name="serviceName"/>
-    <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
-    <!--<xsl:if test="$berryBaskets = 'true'">-->
-    <xsl:if test="$berrybasketswitch = 'on'">
-      <xsl:call-template name="addBerry">
-	<xsl:with-param name="collName" select="$collName"/>
-      </xsl:call-template>
-    </xsl:if>
-    <xsl:apply-templates select=".">
-      <xsl:with-param name="collName" select="$collName"/>
-      <xsl:with-param name="serviceName" select="$serviceName"/>
-    </xsl:apply-templates>
-  </xsl:template>
-
-  
-  <!-- the default doc node template for the query results -->
-  <!-- eventually shouldn't need sib arg here -->
-  <xsl:template match="documentNode">
-    <xsl:param name="collName"/>
-    <xsl:param name="serviceName"/>
-    <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if>&amp;dt=<xsl:value-of select='@docType'/>&amp;p.a=q&amp;&amp;p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&amp;p.s=<xsl:value-of select="$serviceName"/></xsl:attribute>
-      <xsl:apply-templates select="." mode="displayNodeIcon"/>
-    </a>
-    <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
-  </xsl:template>
-
-  <xsl:template name="termInfo">
-    <div class="terminfo">
-      <xsl:if test="count(termList/term) > 0">
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/>
-	<xsl:for-each select="termList/term">
-	  <xsl:if test="position() > 1">, </xsl:if>
-	  <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/> 
-	</xsl:for-each>
-      </xsl:if>
-    </div>
-  </xsl:template>
-
-</xsl:stylesheet>
-
-
Index: greenstone3/trunk/web/interfaces/oran/transform/service-params.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/service-params.xsl	(revision 19855)
+++ 	(revision )
@@ -1,188 +1,0 @@
-<?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"
-  extension-element-prefixes="java">
-
-  <!-- handling of the different types of params on a service form 
-  - these now only output the selection box/text box etc, not the name -->
-
-  <!-- the default param list handling -->
-  <xsl:template match="paramList">
-    <xsl:param name="ns">s1.</xsl:param>
-    <ul id="queryitemlist">
-      <xsl:for-each select="param">
-	<xsl:choose>
-	  <xsl:when test="@type='multi'">
-	    <li><xsl:apply-templates select='.'><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
-	    <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </xsl:for-each>
-    </ul>
-  </xsl:template>
-  
-  <!-- puts all the params into a=p&p=h type form - need to change this if use 
-  multi params  -->
-  <xsl:template match="paramList" mode="cgi">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:for-each select="param">
-      <xsl:variable name='pname' select="@name"/>
-      <xsl:text>&amp;</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates>
-    </xsl:for-each>
-  </xsl:template>
-
-  <xsl:template match="param" mode="calculate-default">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable>
-    <xsl:choose>
-      <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]">
-	<xsl:choose>
-	  <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text>
-	    <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]">
-	      <xsl:value-of select="@value"/>,
-	    </xsl:for-each>
-	  </xsl:when>
-	  <xsl:otherwise>
-	    <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
-	  </xsl:otherwise>
-	</xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-	<xsl:value-of select="@default"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
-  <xsl:template match="param[@type='invisible']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <input type='hidden' name='{$ns}{@name}' value='{@default}'/>
-  </xsl:template>
-  <!-- boolean params -->
-  <xsl:template match="param[@type='boolean']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <select name='{$ns}{@name}'>
-      <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option>
-      <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option>
-    </select>
-  </xsl:template>
-  
-  <!-- integer params -->
-  <xsl:template match="param[@type='integer']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/>
-  </xsl:template>
-
-  <!-- single selection enum params -->
-  <xsl:template match="param[@type='enum_single']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <xsl:choose>
-      <xsl:when test="count(option) = 1">
-	<xsl:value-of select="option/displayItem[@name='name']"/>
-	<input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input>
-      </xsl:when>
-      <xsl:otherwise>
-	<select name="{$ns}{@name}">
-	  <xsl:for-each select="option">
-	    <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
-	  </xsl:for-each>
-	</select>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-  <!-- multiple selection enum params -->
-  <!-- how to do defaults for this?? -->
-  <xsl:template match="param[@type='enum_multi']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <select name="{$ns}{@name}" size='2'><xsl:attribute name="multiple"></xsl:attribute>
-      <xsl:for-each select="option">
-	<option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
-      </xsl:for-each>
-    </select>
-  </xsl:template>
-  
-  <!-- string params -->
-  <xsl:template match="param[@type='string']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <input type="text" name="{$ns}{@name}" size="50" value="{$default}"/>
-  </xsl:template>
-  
-  <!-- large string  params -->
-  <xsl:template match="param[@type='text']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="default"/>
-    <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea>
-  </xsl:template>
-
-  <!-- multi params - params that are combinations of other params -->
-  <xsl:template match="param[@type='multi']">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:variable name="parent" select="@name"/>
-    <table>
-      <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
-      	<xsl:for-each select="param">
-	  <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
-	</xsl:for-each>
-      </tr>
-      
-      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
-    </table>
-  </xsl:template>
-
-  <xsl:template match="param[@type='multi']" mode="contents">
-    <xsl:param name="ns">s1.</xsl:param>
-    <xsl:param name="occurs">1</xsl:param>
-    <xsl:variable name="pos" select="@occurs - $occurs"/>	
-    <tr class="queryfieldrow"><xsl:for-each select="param">
-	<xsl:variable name="pname" select="@name"/>
-	<xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
-	<td class="queryfieldcell"><xsl:choose>
-	    <xsl:when test="not(@ignore) or  @ignore != $pos">      
-	      <xsl:apply-templates select='.'><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
-	    </xsl:when>
-	    <xsl:otherwise><!-- put in a hidden placeholder -->
-	      <input type="hidden" name='{$ns}{@name}' value=''/>
-	    </xsl:otherwise>
-	  </xsl:choose></td>
-      </xsl:for-each></tr>
-    <!-- recursively call this template to get multiple entries -->
-    <xsl:if test="$occurs &gt; 1">
-      <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
-    </xsl:if>
-  </xsl:template>
-
-  
-</xsl:stylesheet>  
-
-  <!-- a param list that puts params in pairs- wont work as is with new
-  param handling stuff -->
-  <!--
-  <xsl:template match="paramList">
-    <p/><table width="537">
-      <xsl:choose>
-        <xsl:when test='count(param)>4'>
-          <xsl:for-each select="param[position() mod 2 = 1]"> 
-            <tr><xsl:apply-templates select="."/>
-              <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>
-          </xsl:for-each>
-        </xsl:when>
-	<xsl:otherwise>
-	  <xsl:for-each select="param">
-	    <tr><xsl:apply-templates select='.'/></tr>
-	  </xsl:for-each>
-	</xsl:otherwise>
-      </xsl:choose>
-    </table>
-  </xsl:template>
-  -->
Index: greenstone3/trunk/web/interfaces/oran/transform/style.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/style.xsl	(revision 19855)
+++ 	(revision )
@@ -1,186 +1,0 @@
-<?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">
-
-  <xsl:include href="icons.xsl"/>
-
-  <!-- some global parameters - these are set by whoever is invoking the transformation -->
-  <xsl:param name="interface_name"/>
-  <xsl:param name="library_name"/>
-
-  <!-- global style info goes here  -->
-  <xsl:template name="globalStyle">
-    <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
-  </xsl:template>
-
-  <xsl:template name="response">
-    <xsl:apply-templates select="pageResponse"/>
-    <xsl:if test="descendant::error">
-      <script language="Javascript">
-	<xsl:text disable-output-escaping="yes">
-	  function removeAllChildren(node) {
-	    while (node.hasChildNodes()) {
-	      node.removeChild(node.firstChild);
-	    }
-	  }
-
-	  function toggleHideError(obj) {
-	    if (obj.style.display == "none") {
-	      obj.style.display = "";
-	      hide_link = document.getElementById("hide");
-	      removeAllChildren(hide_link);
-	      hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">"));
-	    } else {
-	      obj.style.display = "none";
-	      hide_link = document.getElementById("hide");
-	      removeAllChildren(hide_link);
-	      hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">"));
-	    } 
-	  }
-	</xsl:text>
-      </script>
-      <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p>
-      <div id="error" style="display: none;">
-	<xsl:apply-templates select="descendant::error"/>
-      </div>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template name="greenstoneFooter">
-    <div id="footer">
-      <xsl:call-template name="dividerBar">
-	<xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 
-      </xsl:call-template>
-    </div>
-  </xsl:template>
-  
-  <xsl:template match="error">
-    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'error')"/> <xsl:value-of select="."/>
-  </xsl:template>
-
-  <xsl:template name="standardPageBanner">
-    <xsl:param name="collName"/>
-    <xsl:param name="pageType"/>
-    <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
-    <div  id="banner">    
-      <p>
-	<a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
-	  <xsl:choose>
-	    <xsl:when test="$this-element/displayItem[@name='icon']">
-	      <img border="0">
-		<xsl:attribute name="src">
-		  <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
-		</xsl:attribute>	
-		<xsl:attribute name="alt">
-		  <xsl:value-of select="$this-element/displayItem[@name='name']"/>
-		</xsl:attribute>
-		<xsl:attribute name="title">
-		  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
-		</xsl:attribute>
-	      </img>
-	    </xsl:when>
-	    <xsl:otherwise>
-	      <xsl:value-of select="$this-element/displayItem[@name='name']"/>
-	    </xsl:otherwise>
-	  </xsl:choose>
-	</a>
-      </p>
-      <ul id="bannerlist"> 
-	<xsl:call-template name="top-buttons">
-	  <xsl:with-param name="collName" select="$collName"/>
-	  <xsl:with-param name="pageType" select="$pageType"/>
-	</xsl:call-template>
-      </ul>
-    </div>
-  </xsl:template>
-  
-  <xsl:template name="top-buttons">
-    <xsl:param name="collName"/>
-    <xsl:param name="pageType"/>
-    <li><a  href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
-	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
-      </a></li>
-    <xsl:choose>
-      <xsl:when test="$pageType='help'">
-	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
-      </xsl:when>
-      <xsl:otherwise>
-	<li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
-	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
-	  </a></li>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="$pageType='pref'">
-	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
-      </xsl:when>
-      <xsl:otherwise>
-	<li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
-	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
-	  </a></li>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="navigationBar">
-    <xsl:param name="collName"/>
-    <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
-    <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
-    <xsl:choose>
-      <xsl:when test="$this-element/serviceList/service">
-	<div id="navbar">
-	  <ul id="navbarlist">
-	    <xsl:for-each select="$this-element/serviceList/service">
-	      <xsl:variable name="action"><xsl:choose>
-		  <xsl:when test="@name=$this-service">CURRENT</xsl:when>
-		  <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:choose>
-		<xsl:when test="$action='CURRENT'">
-		  <li><a ><xsl:value-of select="displayItem[@name='name']"/></a></li>
-		</xsl:when>
-		<xsl:when test="$action !='DO_NOT_DISPLAY'">
-		  <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li>
-		</xsl:when>
-	      </xsl:choose>
-	    </xsl:for-each>
-	  </ul>
-	</div> 
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:call-template name="dividerBar">
-	  <xsl:with-param name="text" select="'&#160;'"/> 
-        </xsl:call-template>            
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  
-  <xsl:template name="dividerBar">
-    <xsl:param name='text'/>
-    <xsl:choose>
-      <xsl:when test="$text">
-	<div class="divbar"><xsl:value-of select="$text"/></div>
-      </xsl:when>
-      <xsl:otherwise>
-	<div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
-      </xsl:otherwise>
-    </xsl:choose> 
-  </xsl:template>
-
-
-  <xsl:template name="direction">
-    <xsl:if test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:if>
-  </xsl:template>
-
-</xsl:stylesheet>  
-
-
Index: greenstone3/trunk/web/interfaces/oran/transform/system.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/system.xsl	(revision 19855)
+++ 	(revision )
@@ -1,42 +1,0 @@
-<?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"
-  extension-element-prefixes="java">
-  
-  <!-- style includes global params interface_name, library_name -->
-  <xsl:include href="style.xsl"/>
-  
-  <!-- the main page layout template is here -->
-  <xsl:template match="page">
-    <html>
-      <head>
-	<title>
-	  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
-	  <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
-	</title>
-	<xsl:call-template name="globalStyle"/>
-	<xsl:call-template name="pageStyle"/>
-      </head>
-      <body>
-	<xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
-	<div id="page-wrapper">
-	  <xsl:call-template name="response" />
-	  <xsl:call-template name="greenstoneFooter"/>
-	</div>
-      </body>
-    </html>
-  </xsl:template>
-  
-  <xsl:template name="pageTitle">
-    <xsl:value-of select="java:org.greenstone.gsdl3.util.XSLTUtil.getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
-  </xsl:template>
-  
-  <!-- page specific style goes here -->
-  <xsl:template name="pageStyle"/>
-  
-  <xsl:template match="pageResponse">
-    <xsl:value-of select="status"/>
-  </xsl:template>
-  
-</xsl:stylesheet>
Index: greenstone3/trunk/web/interfaces/oran/transform/util.xsl
===================================================================
--- greenstone3/trunk/web/interfaces/oran/transform/util.xsl	(revision 19855)
+++ greenstone3/trunk/web/interfaces/oran/transform/util.xsl	(revision 19856)
@@ -14,10 +14,17 @@
   	<xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>		</xsl:variable>
 	<xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
-	
+
+	<xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
+	<xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
+
 	
 	<xsl:template name="textDirectionAttribute">
-	<xsl:attribute name="dir"><xsl:if test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:if></xsl:attribute>
-	</xsl:template>
-  
+		<xsl:attribute name="dir">
+			<xsl:choose>
+				<xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when>
+				<xsl:otherwise>ltr</xsl:otherwise>
+			</xsl:choose> 
+		</xsl:attribute>
+	</xsl:template>  
   
     <xsl:template name="defaultDividerBar">
@@ -78,11 +85,11 @@
 	
 	<xsl:template name="poweredByGS3TextBar">
-            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 
-  </xsl:template>
+		<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 
+	</xsl:template>
   
   
 	<!-- site home ....................................................................... -->
 
-<xsl:template name="homePageTitle">
+<xsl:template name="siteHomePageTitle">
  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>
@@ -160,4 +167,139 @@
 
 <!-- about page - collection home ....................................................................... -->
+<xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
+<xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
+<xsl:param name="pageType"/>
+<xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
+<xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
+
+
+<xsl:template name="aboutCollectionPageTitle">
+ <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
+<xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/><xsl:text> </xsl:text>
+</xsl:template>
+
+	
+<xsl:template name="collectionHomeLinkWithLogoIfAvailable">
+<a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
+	  <xsl:choose>
+	    <xsl:when test="$this-element/displayItem[@name='icon']">
+	      <img border="0">
+		<xsl:attribute name="src">
+		  <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
+		</xsl:attribute>	
+		<xsl:attribute name="alt">
+		  <xsl:value-of select="$this-element/displayItem[@name='name']"/>
+		</xsl:attribute>
+		<xsl:attribute name="title">
+		  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
+		</xsl:attribute>
+	      </img>
+	    </xsl:when>
+	    <xsl:otherwise>
+	      <xsl:value-of select="$this-element/displayItem[@name='name']"/>
+	    </xsl:otherwise>
+	  </xsl:choose>
+	</a>
+</xsl:template>
+
+
+<xsl:template name="homeButtonTop">
+<a href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
+<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></a>
+</xsl:template>
+
+
+<xsl:template name="helpButtonTop">
+    <xsl:choose>
+      <xsl:when test="$pageType='help'">
+	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
+      </xsl:when>
+      <xsl:otherwise>
+	<li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
+	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
+	  </a></li>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="preferencesButtonTop">
+    <xsl:choose>
+      <xsl:when test="$pageType='pref'">
+	<li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
+      </xsl:when>
+      <xsl:otherwise>
+	<li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
+	    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
+	  </a></li>
+      </xsl:otherwise>
+    </xsl:choose>
+</xsl:template>
+
+<xsl:template name="servicesNavigationBar">
+	    <xsl:for-each select="$this-element/serviceList/service">
+	      <xsl:variable name="action"><xsl:choose>
+		  <xsl:when test="@name=$this-service">CURRENT</xsl:when>
+		  <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:choose>
+		<xsl:when test="$action='CURRENT'">
+		  <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li>
+		</xsl:when>
+		<xsl:when test="$action !='DO_NOT_DISPLAY'">
+		  <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li>
+		</xsl:when>
+	      </xsl:choose>
+	    </xsl:for-each>
+</xsl:template>
+
+
+<xsl:template name="collectionDescriptionTextAndServicesLinks">
+	<xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
+</xsl:template>
+
+<xsl:template match="collection|serviceCluster">
+      <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
+      
+	  <xsl:apply-templates select="serviceList">
+	<xsl:with-param name="collName" select="$collName"/>
+      </xsl:apply-templates>
+</xsl:template>
+
+
+ <xsl:template match="serviceList">
+    <xsl:param name="collName"/>
+    <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
+    <xsl:choose>
+      <xsl:when test="service">
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    
+	
+    <xsl:if test="service">
+      <ul id="servicelist">  	
+	<xsl:for-each select="service">
+	  <xsl:variable name="action"><xsl:choose>
+	      <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:if test="$action !='DO_NOT_DISPLAY'">
+	    <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
+	  </xsl:if>
+  	</xsl:for-each>
+      </ul> 
+    </xsl:if> 
+  </xsl:template>
 
 
@@ -166,4 +308,8 @@
 <xsl:template name="collectionName">
 	<xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
+</xsl:template>
+
+<xsl:template name="collectionShortName">
+	<xsl:value-of select="/page/pageResponse/collection/@name"/>
 </xsl:template>
 
@@ -205,10 +351,98 @@
 </xsl:template>
 
+<!--
+BERRY BASKET TEMPLATES
+These get used on many different pages to add the
+berry basket function to the site
+-->
+
+<!-- put the drag&drop berry basket on the page -->
 <xsl:template name="berryBasket">
-	<div id="berrybasket" class="hide" >
-		<div id="baskethandle"><span></span></div>
-		<div id ="berries"><span></span></div>
-	</div>
-</xsl:template>
+	<xsl:if test="$berryBasketOn">
+		<div id="berrybasket" class="hide">
+			<span>Berry Basket</span>
+			<span id="berryBasketExpandCollapseLinks" style="display: none;">
+				<a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
+				<a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
+			</span>
+			<div id="baskethandle"><span><xsl:text> </xsl:text></span></div>
+			<div id ="berries"><span><xsl:text> </xsl:text></span></div>
+		</div>
+	</xsl:if>
+</xsl:template>
+
+<!-- include the required javascript and css for berry baskets -->
+<xsl:template name="berryBasketHeadTags">
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script>
+	<script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script>
+	<link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>  
+</xsl:template>
+
+<!--
+create a little berry which can be drag&dropped onto the berry basket
+used on classifier and search result pages
+-->
+<xsl:template name="documentBerryForClassifierOrSearchPage">
+	<xsl:if test="$berryBasketOn">
+		<img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
+			<xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
+		</img>
+	</xsl:if>
+</xsl:template>
+
+<!--
+create little berrys which can be drag&dropped onto the berry basket
+used on the document page
+-->
+<xsl:template name="documentBerryForDocumentPage">
+    <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageResponse/document/@selectedNode"/></xsl:variable>
+    <xsl:variable name="rootNode"><xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/></xsl:variable>
+
+	<xsl:if test="$berryBasketOn">	
+		<div id="documentberries">
+			<img class='pick' id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
+			<span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
+
+			<xsl:if test="$selectedNode != $rootNode">
+				<img class='pick'  id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
+				<span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
+			</xsl:if>
+		</div>
+	</xsl:if>
+</xsl:template>
+
+
+<!-- document page -->
+<xsl:template name="documentTitle">
+	<xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
+</xsl:template>
+
+
+<xsl:template name="coverImage">
+	<img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
+</xsl:template>
+
+<xsl:template name="previousNextButtons">
+	<!-- prev -->
+	<a>
+		<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@selectedNode"/>.pp&amp;sib=1&amp;p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute>
+		<img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
+	</a>
+
+	<!-- next -->
+	<a>
+		<xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@selectedNode"/>.np&amp;sib=1&amp;p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute>
+		<img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
+	</a>
+
+</xsl:template>
+
+
 
 </xsl:stylesheet>
