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 match="page">
|
---|
11 |
|
---|
12 | <xsl:variable name="clusterName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
13 | <html>
|
---|
14 | <xsl:call-template name="greenstoneHead"/>
|
---|
15 | <body xsl:use-attribute-sets="body-style">
|
---|
16 | <center>
|
---|
17 | <xsl:call-template name="clusterPageBanner">
|
---|
18 | <xsl:with-param name="clusterName" select="$clusterName"/>
|
---|
19 | </xsl:call-template>
|
---|
20 | <xsl:apply-templates select="service">
|
---|
21 | <xsl:with-param name="clusterName" select="$clusterName"/>
|
---|
22 | </xsl:apply-templates>
|
---|
23 | <xsl:apply-templates select="response">
|
---|
24 | <xsl:with-param name="clusterName" select="$clusterName"/>
|
---|
25 | </xsl:apply-templates>
|
---|
26 | </center>
|
---|
27 | <xsl:call-template name="greenstoneFooter"/>
|
---|
28 | </body>
|
---|
29 | </html>
|
---|
30 | </xsl:template>
|
---|
31 |
|
---|
32 | <xsl:template match="service">
|
---|
33 | <xsl:param name="clusterName">cluster-name</xsl:param>
|
---|
34 | <xsl:variable name='library' select='../config/library_name'/>
|
---|
35 | <xsl:variable name='subaction' select="../request/@subaction"/>
|
---|
36 | <xsl:variable name='action' select="../request/@action"/>
|
---|
37 | <xsl:variable name='lang' select="../request/@lang"/>
|
---|
38 | <h3><xsl:value-of select="display/name"/></h3><p/>
|
---|
39 | <form name="BuildForm" method="get" action="/gsdl3/{$library}">
|
---|
40 | <xsl:apply-templates select="paramList"/>
|
---|
41 | <input type="hidden" name="a" value="{$action}"/>
|
---|
42 | <input type="hidden" name="c" value="{$clusterName}"/>
|
---|
43 | <input type="hidden" name="sa" value="p"/>
|
---|
44 | <input type="hidden" name='l' value='{$lang}'/>
|
---|
45 | <input type="hidden" name="s" value="{@name}"/>
|
---|
46 | <input type="hidden" name="rt" value="r"/>
|
---|
47 | <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input>
|
---|
48 | </form>
|
---|
49 | <xsl:call-template name="greenBar"/>
|
---|
50 | </xsl:template>
|
---|
51 |
|
---|
52 |
|
---|
53 | <xsl:template match="paramList">
|
---|
54 | <p/><table width="537">
|
---|
55 | <xsl:for-each select="param">
|
---|
56 | <xsl:choose>
|
---|
57 | <xsl:when test="@type='multi'">
|
---|
58 | <tr><td colspan='2'>
|
---|
59 | <xsl:apply-templates select='.'/></td></tr>
|
---|
60 | </xsl:when>
|
---|
61 | <xsl:otherwise>
|
---|
62 | <xsl:variable name="pname" select="@name"/>
|
---|
63 | <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>
|
---|
64 | </xsl:otherwise>
|
---|
65 | </xsl:choose>
|
---|
66 | </xsl:for-each>
|
---|
67 | </table>
|
---|
68 | </xsl:template>
|
---|
69 |
|
---|
70 | <xsl:template match="response">
|
---|
71 | <xsl:param name="clusterName">cluster-name</xsl:param>
|
---|
72 | <center/>
|
---|
73 | <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='../config/library_name'/>?a=pr&rt=s&c=<xsl:value-of select='$clusterName'/>&s=<xsl:value-of select='../service/@name'/>&o=xml&ro=1&l=<xsl:value-of select='../request/@lang'/>&id=<xsl:value-of select="status/@handle"/><xsl:apply-templates select="../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="status/@code"/></xsl:attribute></param></applet>
|
---|
74 | <xsl:call-template name="greenBar"/>
|
---|
75 | </xsl:template>
|
---|
76 |
|
---|
77 | <!-- puts all the params into a=p&p=h type form - need to change this if use
|
---|
78 | multi params in a process type service -->
|
---|
79 | <xsl:template match="paramList" mode="cgi">
|
---|
80 | <xsl:for-each select="param">&<xsl:value-of select="@shortname"/>=<xsl:value-of select="@default"/></xsl:for-each>
|
---|
81 | </xsl:template>
|
---|
82 |
|
---|
83 | </xsl:stylesheet>
|
---|
84 |
|
---|