Index: trunk/gsdl3/interfaces/default/transform/build.xsl
===================================================================
--- trunk/gsdl3/interfaces/default/transform/build.xsl	(revision 3475)
+++ trunk/gsdl3/interfaces/default/transform/build.xsl	(revision 3475)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:include href="style.xsl"/>
+
+<xsl:output method="html"/>  
+
+<xsl:template match="page">
+
+<xsl:variable name="clusterName"><xsl:value-of select="request/paramList/param[@name='action']/@value"/></xsl:variable>
+
+<html>
+<xsl:call-template name="greenstoneHead"/>
+<body xsl:use-attribute-sets="body-style">
+<center>
+<xsl:call-template name="clusterPageBanner">
+<xsl:with-param name="clusterName" select="$clusterName"/>
+</xsl:call-template>
+<xsl:apply-templates select="request">
+<xsl:with-param name="clusterName" select="$clusterName"/>
+</xsl:apply-templates>
+<xsl:apply-templates select="response">
+<xsl:with-param name="clusterName" select="$clusterName"/>
+</xsl:apply-templates>
+</center>
+<xsl:call-template name="greenstoneFooter"/>
+</body>
+</html>
+</xsl:template>
+
+<xsl:template match="request">
+<xsl:param name="clusterName">cluster-name</xsl:param>
+<xsl:variable name='library' select='ancestor::page/config/library_name'/>
+<xsl:variable name='subaction' select="paramList/param[@name='subaction']/@value"/>
+<h3><xsl:value-of select="$subaction"/></h3><p/>
+<form name="BuildForm" method="get" action="/gsdl3/{$library}">
+<xsl:apply-templates select="description/paramList"/>
+<input type="hidden" name="a" value="{$clusterName}"/>
+<input type="hidden" name="sa" value="{$subaction}"/>
+<input type="submit"><xsl:attribute name="value"><xsl:call-template name="text"><xsl:with-param name="key">service/go</xsl:with-param></xsl:call-template></xsl:attribute></input>
+</form>
+<xsl:call-template name="greenBar"/>
+</xsl:template>
+
+<!-- need to look at generalising params between services -->
+<xsl:template match="description/paramList">
+<xsl:param name="cluster">build</xsl:param>
+<p/><table width="537">
+<xsl:for-each select="param">
+<xsl:choose>
+<!-- boolean params -->
+<xsl:when test="@type= 'boolean'">
+<tr><td><xsl:call-template name="text"><xsl:with-param name="key"><xsl:value-of select="$cluster"/>/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"><xsl:value-of select="$cluster"/>/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"><xsl:value-of select="$cluster"/>/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"><xsl:value-of select="$cluster"/>/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"><xsl:value-of select="$cluster"/>/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"><xsl:value-of select="$cluster"/>/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>
+<!-- input params -->
+<xsl:when test="@type= 'input'">
+<tr><td><xsl:call-template name="text"><xsl:with-param name="key"><xsl:value-of select="$cluster"/>/params/<xsl:value-of select="@name"/>/name</xsl:with-param></xsl:call-template></td><td><input type="text" name="{@shortname}" size="50" value="{@default}"/></td></tr>
+</xsl:when>
+</xsl:choose>
+</xsl:for-each>
+</table>
+</xsl:template>
+
+<xsl:template match="response">
+<xsl:param name="clusterName">cluster-name</xsl:param>
+<p/><xsl:value-of select="status"/>
+<xsl:call-template name="greenBar"/>
+</xsl:template>
+
+
+</xsl:stylesheet>  
