Index: /trunk/gsdl3/interfaces/default/transform/about.xsl
===================================================================
--- /trunk/gsdl3/interfaces/default/transform/about.xsl	(revision 3359)
+++ /trunk/gsdl3/interfaces/default/transform/about.xsl	(revision 3360)
@@ -9,8 +9,5 @@
 <xsl:output method="html"/>  
 
-<xsl:variable name="translate" select="document('en.xml')"/>
-
-<xsl:template match="message">
-
+<xsl:template match="page">
 <html>
 <xsl:call-template name="greenstoneHead"/>
@@ -59,12 +56,12 @@
 <xsl:if test="contains($serviceName, 'Query')">
 <xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable>
-<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.Util.toLower($orig-type)"/>
-<td><xsl:value-of select="$translate/text/about/search"/></td>
+<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
+<td><xsl:call-template name="text"><xsl:with-param name="key">common/search</xsl:with-param></xsl:call-template></td>
 <td><a><xsl:attribute name="href">library?a=q&amp;sa=<xsl:value-of select="$lower-type"/>&amp;c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="substring-before($serviceName, 'Query')"/></a></td>
 </xsl:if>
 <xsl:if test="contains($serviceName, 'Browse')">
 <xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>
-<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.Util.toLower($orig-type)"/>
-<td><xsl:value-of select="$translate/text/about/browse"/></td>
+<xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/>
+<td><xsl:call-template name="text"><xsl:with-param name="key">common/browse</xsl:with-param></xsl:call-template></td>
 <td><a><xsl:attribute name="href">library?a=b&amp;sa=<xsl:value-of select="$lower-type"/>&amp;c=<xsl:value-of select="$collName"/></xsl:attribute><xsl:value-of select="substring-before($serviceName, 'Browse')"/></a></td>
 </xsl:if>
Index: /trunk/gsdl3/interfaces/default/transform/home.xsl
===================================================================
--- /trunk/gsdl3/interfaces/default/transform/home.xsl	(revision 3359)
+++ /trunk/gsdl3/interfaces/default/transform/home.xsl	(revision 3360)
@@ -7,5 +7,5 @@
 <xsl:output method="html"/>  
 
-<xsl:template match="message">
+<xsl:template match="page">
 <html>
 <xsl:call-template name="greenstoneHead"/>
@@ -25,31 +25,9 @@
 <xsl:template match="collectionList">
 <xsl:for-each select="collection"> 
-<p><a href="library?a=p&amp;sa=about&amp;c={@name}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::message/system/@sitename"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="metadataList/metadata[@name='iconCollection']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="metadataList/metadata[@name='colName']"/></xsl:attribute></img></a></p>
+<p><a href="library?a=p&amp;sa=about&amp;c={@name}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="metadataList/metadata[@name='iconCollection']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="metadataList/metadata[@name='colName']"/></xsl:attribute></img></a></p>
 </xsl:for-each>
 <xsl:call-template name="greenBar"/>
 </xsl:template> 
 
-
-<xsl:template match="serviceList">
-Services available are:
-
-Transforms:
-<xsl:for-each select="service[@type='transform']"> 
-<xsl:value-of select="@name"/>.
-</xsl:for-each>
-
-Enrichs:
-<xsl:for-each select="service[@type='enrich']"> 
-<xsl:value-of select="@name"/>.
-</xsl:for-each>
-
-Querys:
-<xsl:for-each select="service[@type='query']"> 
-<xsl:value-of select="@name"/>.
-</xsl:for-each>
-
-</xsl:template> 
-
-
 </xsl:stylesheet>  
 
Index: /trunk/gsdl3/interfaces/default/transform/resource.xsl
===================================================================
--- /trunk/gsdl3/interfaces/default/transform/resource.xsl	(revision 3359)
+++ /trunk/gsdl3/interfaces/default/transform/resource.xsl	(revision 3360)
@@ -9,12 +9,12 @@
 <xsl:output method="html"/>  
 
-<xsl:template match="message">
+<xsl:template match="page">
+
+<xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable>
+
 <html>
 <xsl:call-template name="greenstoneHead"/>
 <body xsl:use-attribute-sets="body-style">
-
-<xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable>
 <center>
-
 <xsl:call-template name="collectionPageBanner">
 <xsl:with-param name="collName" select="$collName"/>
Index: /trunk/gsdl3/interfaces/default/transform/style.xsl
===================================================================
--- /trunk/gsdl3/interfaces/default/transform/style.xsl	(revision 3359)
+++ /trunk/gsdl3/interfaces/default/transform/style.xsl	(revision 3360)
@@ -1,7 +1,11 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:java="http://xml.apache.org/xslt/java"
+extension-element-prefixes="java">
+
 
 <xsl:output method="html"/>  
+
 
 <xsl:attribute-set name="body-style">
@@ -11,5 +15,5 @@
   <xsl:attribute name="alink">#cc9900</xsl:attribute>
   <xsl:attribute name="vlink">#666633</xsl:attribute>
-  <xsl:attribute name="background">/gsdl3/interfaces/default/images/chalk.gif</xsl:attribute>
+  <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute>
 </xsl:attribute-set>
 
@@ -17,5 +21,5 @@
 <xsl:template name="greenstoneHead">
 <head>
-<title>New Zealand Digital Library</title>
+<title><xsl:call-template name="text"><xsl:with-param name="key">common/nzdl</xsl:with-param></xsl:call-template></title>
 
 </head>
@@ -24,9 +28,8 @@
 <xsl:template name="greenstonePageBanner">
 
-<!-- page banner (_style:pagebanner_) -->
 <center>
 <table width="537" cellspacing="0" cellpadding="0">
   <tr valign="top">
-    <td rowspan="2" align="left"><center><img src="/gsdl3/interfaces/default/images/nzdl2gr.gif" width="457" height="181" alt="The New Zealand Digital Library"/></center></td>
+    <td rowspan="2" align="left"><center><img src="interfaces/default/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">common/nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td>
     <td align="right"></td>
   </tr>
@@ -60,5 +63,6 @@
 <xsl:param name="collIcon"><xsl:value-of select="$collName"/>.gif</xsl:param>
 <table width="537">
-<tr><td align="left"><a href="library?a=p&amp;sa=about&amp;c={$collName}"><img width="150" border="1"><xsl:attribute name="src">/gsdl3/sites/localsite/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt">about page</xsl:attribute></img></a></td><td align="right"><a href="library?a=p&amp;sa=home">HOME</a></td></tr></table>
+<tr><td align="left"><a href="library?a=p&amp;sa=about&amp;c={$collName}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">common/aboutpage</xsl:with-param></xsl:call-template></xsl:attribute></img></a></td><td align="right"><a href="library?a=p&amp;sa=home"><xsl:call-template name="text"><xsl:with-param name="key">common/home</xsl:with-param></xsl:call-template></a></td></tr></table>
+
 <xsl:call-template name="greenBar"/>
 </xsl:template>
@@ -66,5 +70,39 @@
 
 <xsl:template name="greenBar">
-<p/><img src="/gsdl3/interfaces/default/images/divb.gif" width="537" height="17"/>
+<p/><img src="interfaces/default/images/divb.gif" width="537" height="17"/>
 </xsl:template>
+
+
+
+<!-- text stuff. can be called via xsl:call-template:  
+
+<xsl:call-template name="text"><xsl:with-param name="key">your text name here</xsl:with-param></xsl:call-template>
+
+otherwise can be selected by :
+
+<xsl:apply-templates select="text"/>  
+
+the text elem to be processed must be in the form
+<text name="query/about"/>
+
+-->
+
+<xsl:template name="text" match="text">
+
+<xsl:param name="key"><xsl:value-of select="@name"/></xsl:param>
+
+<!-- try the current language -->
+
+<xsl:variable name="path1">ancestor::page/translate/current/text/<xsl:value-of select="$key"/></xsl:variable>
+<xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path1)"/></xsl:variable>
+<xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
+<xsl:otherwise>
+
+<!-- try the default language -->
+<xsl:variable name="path2">ancestor::page/translate/default/text/<xsl:value-of select="$key"/></xsl:variable>
+<xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path2)"/>
+</xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>  
Index: /trunk/gsdl3/interfaces/default/transform/textquery.xsl
===================================================================
--- /trunk/gsdl3/interfaces/default/transform/textquery.xsl	(revision 3359)
+++ /trunk/gsdl3/interfaces/default/transform/textquery.xsl	(revision 3360)
@@ -7,12 +7,12 @@
 <xsl:output method="html"/>  
 
-<xsl:template match="message">
+<xsl:template match="page">
+
+<xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable>
+
 <html>
 <xsl:call-template name="greenstoneHead"/>
 <body xsl:use-attribute-sets="body-style">
-
-<xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable>
 <center>
-
 <xsl:call-template name="collectionPageBanner">
 <xsl:with-param name="collName" select="$collName"/>
@@ -31,22 +31,59 @@
 
 <xsl:template match="request">
+
 <xsl:param name="collName">coll-name</xsl:param>
 <xsl:variable name="queryString"><xsl:value-of select="paramList/param[@name='q']/@value"/></xsl:variable>
+
 <form name="QueryForm" method="get" action="/gsdl3/library">
-
+<xsl:apply-templates select="description/paramList"/>
 <input type="hidden" name="a" value="q"/>
 <input type="hidden" name="sa" value="text"/>
 <input type="hidden" name="c" value="{$collName}"/>
 <nobr><input type="text" name="q" value="{$queryString}" size="50"/>
-<input type="submit" value="Begin Search"/></nobr>
+<input type="submit"><xsl:attribute name="value"><xsl:call-template name="text"><xsl:with-param name="key">query/beginsearch</xsl:with-param></xsl:call-template></xsl:attribute></input></nobr>
 </form>
 <xsl:call-template name="greenBar"/>
 </xsl:template>
 
+
+<xsl:template match="description/paramList">
+<p/>
+<xsl:call-template name="text"><xsl:with-param name="key">query/queryoptions</xsl:with-param></xsl:call-template>
+<p/><table width="537">
+<xsl:for-each select="param">
+<!-- boolean params -->
+<xsl:choose>
+<xsl:when test="@type= 'boolean'">
+<tr><td><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="@name"/>/name</xsl:with-param></xsl:call-template></td><td><select name="{@shortname}">
+    <option value="0"><xsl:if test="@default='0'"><xsl:attribute name='selected'></xsl:attribute></xsl:if><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="@name"/>/off</xsl:with-param></xsl:call-template></option>
+   <option value="1"><xsl:if test="@default='1'"><xsl:attribute name='selected'></xsl:attribute></xsl:if><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="@name"/>/on</xsl:with-param></xsl:call-template></option>
+</select></td></tr>
+</xsl:when>
+<!-- integer params -->
+<xsl:when test="@type= 'integer'">
+<tr><td><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="@name"/>/name</xsl:with-param></xsl:call-template></td><td><input type="text" name="{@shortname}" size="3" value="{@default}"/></td></tr>
+</xsl:when>
+<!-- enum params -->
+<xsl:when test="@type= 'enum'">
+<xsl:variable name="param" select="@name"/>
+<xsl:variable name="current"><xsl:value-of select="@default"/></xsl:variable>
+<tr><td><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="@name"/>/name</xsl:with-param></xsl:call-template>
+</td><td><select name="{@shortname}">
+    <xsl:for-each select="element">
+
+      <option value="{@name}"><xsl:if test="@name=$current"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:call-template name="text"><xsl:with-param name="key">query/params/<xsl:value-of select="$param"/>/<xsl:value-of select="@name"/></xsl:with-param></xsl:call-template></option>
+    </xsl:for-each>
+ </select></td></tr>
+</xsl:when>
+</xsl:choose>
+</xsl:for-each>
+</table>
+</xsl:template>
+
 <xsl:template match="response">
 <xsl:param name="collName">coll-name</xsl:param>
-<table>
+<table width="537">
 <xsl:for-each select="content/resourceList/resource">
-<tr><td><a><xsl:attribute name="href">library?a=r&amp;c=<xsl:value-of select="$collName"/>&amp;r=<xsl:value-of select="@name"/></xsl:attribute>link</a></td><td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td></tr>
+<tr><td><a><xsl:attribute name="href">library?a=r&amp;c=<xsl:value-of select="$collName"/>&amp;r=<xsl:value-of select="@name"/></xsl:attribute>link</a></td><td><xsl:value-of  select="metadataList/metadata[@name='Title']"/></td></tr>
 </xsl:for-each>
 </table>
