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

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

now uses paramList from service-params.xsl

  • 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 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
8
9 <xsl:include href="style.xsl"/>
10 <xsl:include href="service-params.xsl"/>
11
12 <xsl:output method="html"/>
13
14 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
15 <xsl:template name="pageHead">
16 <head>
17 <title><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></title>
18 </head>
19 </xsl:template>
20
21 <xsl:template match="pageResponse">
22 <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
23 <center>
24 <xsl:call-template name="clusterPageBanner">
25 <xsl:with-param name="clusterName" select="$clusterName"/>
26 </xsl:call-template>
27 <xsl:apply-templates select="service">
28 <xsl:with-param name="clusterName" select="$clusterName"/>
29 </xsl:apply-templates>
30 <xsl:apply-templates select="status">
31 <xsl:with-param name="clusterName" select="$clusterName"/>
32 </xsl:apply-templates>
33 </center>
34 </xsl:template>
35
36 <xsl:template match="service">
37 <xsl:param name="clusterName"/>
38 <xsl:variable name='subaction' select="/page/pageRequest/@subaction"/>
39 <xsl:variable name='action' select="/page/pageRequest/@action"/>
40 <xsl:variable name='lang' select="/page/@lang"/>
41 <h3><xsl:value-of select="display/name"/></h3><p/>
42 <form name="BuildForm" method="get" action="/gsdl3/{$library_name}">
43 <xsl:apply-templates select="paramList"/>
44 <input type="hidden" name="a" value="{$action}"/>
45 <input type="hidden" name="c" value="{$clusterName}"/>
46 <input type="hidden" name="sa" value="p"/>
47 <input type="hidden" name='l' value='{$lang}'/>
48 <input type="hidden" name="s" value="{@name}"/>
49 <input type="hidden" name="rt" value="r"/>
50 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input>
51 </form>
52 <xsl:call-template name="greenBar"/>
53 </xsl:template>
54
55 <xsl:template match="status">
56 <xsl:param name="clusterName"/>
57 <center/>
58 <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.
59 <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>
60 <param name='initial_text'><xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute></param>
61 <param name='initial_code'><xsl:attribute name="value"><xsl:value-of select="@code"/></xsl:attribute></param></applet>
62 <xsl:call-template name="greenBar"/>
63 </xsl:template>
64
65 <!-- puts all the params into a=p&p=h type form - need to change this if use
66 multi params in a process type service -->
67 <xsl:template match="paramList" mode="cgi">
68 <xsl:for-each select="param">
69 <xsl:variable name='pname' select="@name"/>
70 <xsl:text>&amp;</xsl:text><xsl:value-of select="@shortname"/>=<xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name=$pname]"><xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="@default"/></xsl:otherwise></xsl:choose></xsl:for-each>
71 </xsl:template>
72
73</xsl:stylesheet>
74
Note: See TracBrowser for help on using the repository browser.