source: trunk/gsdl3/web/interfaces/default/transform/process.xsl@ 4047

Last change on this file since 4047 was 4047, checked in by kjdon, 21 years ago

interfaces directory moved to inside web directory, this is a copy of the old default interface

  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <xsl:include href="style.xsl"/>
6 <xsl:include href="service-params.xsl"/>
7
8 <xsl:output method="html"/>
9
10 <xsl:template name="pageHead">
11 <head>
12 <title><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></title>
13 </head>
14 </xsl:template>
15
16 <xsl:template match="pageResponse">
17 <xsl:variable name="clusterName"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
18 <center>
19 <xsl:call-template name="clusterPageBanner">
20 <xsl:with-param name="clusterName" select="$clusterName"/>
21 </xsl:call-template>
22 <xsl:apply-templates select="service">
23 <xsl:with-param name="clusterName" select="$clusterName"/>
24 </xsl:apply-templates>
25 <xsl:apply-templates select="status">
26 <xsl:with-param name="clusterName" select="$clusterName"/>
27 </xsl:apply-templates>
28 </center>
29 </xsl:template>
30
31 <xsl:template match="service">
32 <xsl:param name="clusterName">cluster-name</xsl:param>
33 <xsl:variable name='library' select='ancestor::page/config/library_name'/>
34 <xsl:variable name='subaction' select="ancestor::page/pageRequest/@subaction"/>
35 <xsl:variable name='action' select="ancestor::page/pageRequest/@action"/>
36 <xsl:variable name='lang' select="ancestor::page/pageRequest/@lang"/>
37 <h3><xsl:value-of select="display/name"/></h3><p/>
38 <form name="BuildForm" method="get" action="/gsdl3/{$library}">
39 <xsl:apply-templates select="paramList"/>
40 <input type="hidden" name="a" value="{$action}"/>
41 <input type="hidden" name="c" value="{$clusterName}"/>
42 <input type="hidden" name="sa" value="p"/>
43 <input type="hidden" name='l' value='{$lang}'/>
44 <input type="hidden" name="s" value="{@name}"/>
45 <input type="hidden" name="rt" value="r"/>
46 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input>
47 </form>
48 <xsl:call-template name="greenBar"/>
49 </xsl:template>
50
51
52<xsl:template match="paramList">
53<p/><table width="537">
54<xsl:for-each select="param">
55<xsl:choose>
56<xsl:when test="@type='multi'">
57<tr><td colspan='2'>
58<xsl:apply-templates select='.'/></td></tr>
59</xsl:when>
60<xsl:otherwise>
61<xsl:variable name="pname" select="@name"/>
62<tr valign="top"><td><xsl:value-of select='ancestor::service/display/param[@name=$pname]/name'/></td><td align="right"><xsl:apply-templates select="."/></td></tr>
63</xsl:otherwise>
64</xsl:choose>
65</xsl:for-each>
66</table>
67</xsl:template>
68
69<xsl:template match="status">
70<xsl:param name="clusterName">cluster-name</xsl:param>
71<center/>
72<applet code="org.greenstone.gsdl3.build.StatusDisplay.class" codebase='lib/java' archive='gsdl3.jar, xercesImpl.jar, jaxp.jar, xml-apis.jar' width='537' height='100'>The status display applet.<param name='library'><xsl:attribute name="value"><xsl:value-of select='ancestor::page/config/library_name'/>?a=pr&amp;rt=s&amp;c=<xsl:value-of select='$clusterName'/>&amp;s=<xsl:value-of select='ancestor::page/pageResponse/service/@name'/>&amp;o=xml&amp;ro=1&amp;l=<xsl:value-of select='ancestor::page/pageRequest/@lang'/>&amp;pid=<xsl:value-of select="@pid"/><xsl:apply-templates select="ancestor::page/pageResponse/service/paramList" mode="cgi"/></xsl:attribute></param><param name='initial_text'><xsl:attribute name="value"><xsl:value-of select="status"/></xsl:attribute></param><param name='initial_code'><xsl:attribute name="value"><xsl:value-of select="@code"/></xsl:attribute></param></applet>
73<xsl:call-template name="greenBar"/>
74</xsl:template>
75
76<!-- puts all the params into a=p&p=h type form - need to change this if use
77 multi params in a process type service -->
78<xsl:template match="paramList" mode="cgi">
79<xsl:for-each select="param">&amp;<xsl:value-of select="@shortname"/>=<xsl:value-of select="@default"/></xsl:for-each>
80</xsl:template>
81
82</xsl:stylesheet>
83
Note: See TracBrowser for help on using the repository browser.