Changeset 3564
- Timestamp:
- 2002-11-26T13:42:55+13:00 (21 years ago)
- Location:
- trunk/gsdl3/interfaces/default/transform
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/interfaces/default/transform/about.xsl
r3474 r3564 52 52 <xsl:template match="metadataList"> 53 53 <xsl:param name="collName">coll-name</xsl:param> 54 <h2> Description</h2>54 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.description</xsl:with-param></xsl:call-template></h2> 55 55 <p/> 56 56 <table> … … 64 64 <xsl:param name="collName">coll-name</xsl:param> 65 65 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 66 <h2> Services available</h2>66 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2> 67 67 <table> 68 68 <xsl:for-each select="service[@type='query']"> … … 72 72 <xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable> 73 73 <xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/> 74 <td><xsl:call-template name="text"><xsl:with-param name="key">common/search</xsl:with-param></xsl:call-template></td> 75 <td><a href="{$library}?a=q&sa={$lower-type}&c={$collName}"><xsl:value-of select="$orig-type"/></a></td> 74 <td><a href="{$library}?a=q&sa={$lower-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td> 76 75 </xsl:if> 77 76 <xsl:if test="contains($serviceName, 'Browse')"> 78 77 <xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable> 79 78 <xsl:variable name="lower-type" select="java:org.greenstone.gsdl3.util.XSLTUtil.toLower($orig-type)"/> 80 <td><xsl:call-template name="text"><xsl:with-param name="key">common/browse</xsl:with-param></xsl:call-template></td> 81 <td><a href="{$library}?a=b&sa={$lower-type}&c={$collName}"><xsl:value-of select="$orig-type"/></a></td> 79 <td><a href="{$library}?a=b&sa={$lower-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td> 82 80 </xsl:if> 83 81 <xsl:if test="contains($serviceName, 'Applet')"> 84 82 <xsl:variable name="orig-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable> 85 <td><xsl:call-template name="text"><xsl:with-param name="key">common/applet</xsl:with-param></xsl:call-template></td> 86 <td><a href="{$library}?a=a&sa=d&sn={$orig-type}&c={$collName}"><xsl:value-of select="$orig-type"/></a></td> 83 <td><a href="{$library}?a=a&sa=d&sn={$orig-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td> 87 84 </xsl:if> 88 85 </tr> … … 96 93 <xsl:param name="collName">coll-name</xsl:param> 97 94 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 98 <h2> Services available</h2>95 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2> 99 96 <table> 100 97 <xsl:for-each select="service"> -
trunk/gsdl3/interfaces/default/transform/applet.xsl
r3436 r3564 9 9 <xsl:template match="page"> 10 10 11 <xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c ']/@value"/></xsl:variable>11 <xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='collection']/@value"/></xsl:variable> 12 12 <html> 13 13 <xsl:call-template name="greenstoneHead"/> -
trunk/gsdl3/interfaces/default/transform/build.xsl
r3511 r3564 4 4 5 5 <xsl:include href="style.xsl"/> 6 <xsl:include href="service-params.xsl"/> 6 7 7 8 <xsl:output method="html"/> … … 9 10 <xsl:template match="page"> 10 11 11 <xsl:variable name="clusterName"><xsl:value-of select="request/paramList/param[@name='action']/@value"/></xsl:variable> 12 12 <xsl:variable name="clusterName"><xsl:value-of select="request/@action"/></xsl:variable> 13 13 <html> 14 14 <xsl:call-template name="greenstoneHead"/> … … 18 18 <xsl:with-param name="clusterName" select="$clusterName"/> 19 19 </xsl:call-template> 20 <xsl:apply-templates select=" request">20 <xsl:apply-templates select="service"> 21 21 <xsl:with-param name="clusterName" select="$clusterName"/> 22 22 </xsl:apply-templates> … … 30 30 </xsl:template> 31 31 32 <xsl:template match=" request">32 <xsl:template match="service"> 33 33 <xsl:param name="clusterName">cluster-name</xsl:param> 34 <xsl:variable name='library' select='ancestor::page/config/library_name'/> 35 <xsl:variable name='subaction' select="paramList/param[@name='subaction']/@value"/> 36 <h3><xsl:value-of select="$subaction"/></h3><p/> 34 <xsl:variable name='library' select='../config/library_name'/> 35 <xsl:variable name='subaction' select="../request/@subaction"/> 36 <xsl:variable name='lang' select="../request/@lang"/> 37 <h3><xsl:value-of select="display/name"/></h3><p/> 37 38 <form name="BuildForm" method="get" action="/gsdl3/{$library}"> 38 <xsl:apply-templates select=" description/paramList"/>39 <xsl:apply-templates select="paramList"/> 39 40 <input type="hidden" name="a" value="{$clusterName}"/> 40 41 <input type="hidden" name="sa" value="{$subaction}"/> 41 <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> 42 <input type="hidden" name='l' value='{$lang}'/> 43 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input> 42 44 </form> 43 45 <xsl:call-template name="greenBar"/> 44 46 </xsl:template> 45 47 46 <!-- need to look at generalising params between services --> 47 <xsl:template match="description/paramList"> 48 <xsl:param name="cluster">build</xsl:param> 48 <xsl:template match="paramList"> 49 49 <p/><table width="537"> 50 50 <xsl:for-each select="param"> 51 <xsl:choose> 52 <!-- boolean params --> 53 <xsl:when test="@type= 'boolean'"> 54 <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}"> 55 <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> 56 <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> 57 </select></td></tr> 58 </xsl:when> 59 <!-- integer params --> 60 <xsl:when test="@type= 'integer'"> 61 <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> 62 </xsl:when> 63 <!-- enum params --> 64 <xsl:when test="@type= 'enum'"> 65 <xsl:variable name="param" select="@name"/> 66 <xsl:variable name="current"><xsl:value-of select="@default"/></xsl:variable> 67 <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> 68 </td><td><select name="{@shortname}"> 69 <xsl:for-each select="option"> 70 71 <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> 72 </xsl:for-each> 73 </select></td></tr> 74 </xsl:when> 75 <!-- input params --> 76 <xsl:when test="@type= 'input'"> 77 <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> 78 </xsl:when> 79 </xsl:choose> 51 <tr><xsl:apply-templates select='.'/></tr> 80 52 </xsl:for-each> 81 53 </table> -
trunk/gsdl3/interfaces/default/transform/classifier.xsl
r3473 r3564 10 10 11 11 <xsl:template match="page"> 12 <xsl:variable name="collName"><xsl:value-of select=" request/paramList/param[@name='collection']/@value"/></xsl:variable>12 <xsl:variable name="collName"><xsl:value-of select="service/request/paramList/param[@name='collection']/@value"/></xsl:variable> 13 13 <html> 14 14 <xsl:call-template name="greenstoneHead"/> … … 18 18 <xsl:with-param name="collName" select="$collName"/> 19 19 </xsl:call-template> 20 <xsl:apply-templates select=" request/description/classifierList">20 <xsl:apply-templates select="service/classifierList"> 21 21 <xsl:with-param name="collName" select="$collName"/> 22 22 </xsl:apply-templates> -
trunk/gsdl3/interfaces/default/transform/resource.xsl
r3473 r3564 7 7 <xsl:include href="style.xsl"/> 8 8 9 <xsl:output method="html"/> 10 9 <!-- 10 <xsl:output method="xml"/> 11 --> 11 12 <xsl:template match="page"> 12 13 … … 29 30 <xsl:template match="response"> 30 31 <table width="537"><tr><td> 31 <xsl:value-of disable-output-escaping=" yes" select="content/resource"/>32 <xsl:value-of disable-output-escaping="no" select="content/resource"/> 32 33 </td></tr></table> 33 34 <xsl:call-template name="greenBar"/> -
trunk/gsdl3/interfaces/default/transform/style.xsl
r3474 r3564 5 5 extension-element-prefixes="java"> 6 6 7 7 <!-- 8 8 <xsl:output method="html"/> 9 9 --> 10 10 11 11 <xsl:attribute-set name="body-style"> … … 21 21 <xsl:template name="greenstoneHead"> 22 22 <head> 23 <title><xsl:call-template name="text"><xsl:with-param name="key"> common/nzdl</xsl:with-param></xsl:call-template></title>23 <title><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></title> 24 24 25 25 </head> … … 31 31 <table width="537" cellspacing="0" cellpadding="0"> 32 32 <tr valign="top"> 33 <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>33 <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">nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td> 34 34 <td align="right"></td> 35 35 </tr> … … 64 64 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 65 65 <table width="537"> 66 <tr><td align="left"><a href="{$library}?a=p&sa=about&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&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">common/home</xsl:with-param></xsl:call-template></a></td></tr></table>66 <tr><td align="left"><a href="{$library}?a=p&sa=about&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">aboutpage</xsl:with-param></xsl:call-template></xsl:attribute></img></a></td><td align="right"><a href="{$library}?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table> 67 67 68 68 <xsl:call-template name="greenBar"/> … … 74 74 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 75 75 <table width="537"> 76 <tr><td align="left"><a href="{$library}?a=p&sa=about&sc={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key"> common/home</xsl:with-param></xsl:call-template></a></td></tr></table>76 <tr><td align="left"><a href="{$library}?a=p&sa=about&sc={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table> 77 77 78 78 <xsl:call-template name="greenBar"/> … … 99 99 100 100 <xsl:template name="text" match="text"> 101 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> 102 <xsl:variable name="path">ancestor::page/display/<xsl:value-of select='$key'/></xsl:variable> 103 <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path)"/></xsl:variable> 104 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 105 <xsl:otherwise> 106 107 <!-- no match found, output the name of the text string --> 108 _<xsl:value-of select="$key"/>_</xsl:otherwise> 109 </xsl:choose> 110 </xsl:template> 111 112 113 <!-- may not have to use this anymore--> 114 <xsl:template name="text-old" match="text-old"> 101 115 102 116 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> -
trunk/gsdl3/interfaces/default/transform/textquery.xsl
r3511 r3564 4 4 5 5 <xsl:include href="style.xsl"/> 6 <xsl:include href="service-params.xsl"/> 6 7 7 <xsl:output method=" html"/>8 <xsl:output method="xml"/> 8 9 9 10 <xsl:template match="page"> … … 18 19 <xsl:with-param name="collName" select="$collName"/> 19 20 </xsl:call-template> 20 <xsl:apply-templates select=" request">21 <xsl:apply-templates select="service"> 21 22 <xsl:with-param name="collName" select="$collName"/> 22 23 </xsl:apply-templates> … … 30 31 </xsl:template> 31 32 32 <xsl:template match="request"> 33 <xsl:template match="service"> 34 <xsl:param name="collName">coll-name</xsl:param> 35 <xsl:variable name="queryString"><xsl:value-of select="../request/paramList/param[@name='query']/@value"/></xsl:variable> 36 <xsl:variable name='library' select='ancestor::page/config/library_name'/> 37 <h3><xsl:value-of select="display/name"/></h3><p/> 38 <form name="QueryForm" method="get" action="/gsdl3/{$library}"> 33 39 34 <xsl:param name="collName">coll-name</xsl:param> 35 <xsl:variable name="queryString"><xsl:value-of select="paramList/param[@name='q']/@value"/></xsl:variable> 36 <xsl:variable name='library' select='ancestor::page/config/library_name'/> 37 38 <form name="QueryForm" method="get" action="/gsdl3/{$library}"> 39 <xsl:apply-templates select="description/paramList"/> 40 <xsl:apply-templates select="paramList"/> 40 41 <input type="hidden" name="a" value="q"/> 41 42 <input type="hidden" name="sa" value="text"/> 42 43 <input type="hidden" name="c" value="{$collName}"/> 43 44 <nobr><input type="text" name="q" value="{$queryString}" size="50"/> 44 <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>45 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input></nobr> 45 46 </form> 46 47 <xsl:call-template name="greenBar"/> … … 48 49 49 50 50 <xsl:template match="description/paramList"> 51 <p/> 52 <xsl:call-template name="text"><xsl:with-param name="key">query/queryoptions</xsl:with-param></xsl:call-template> 51 <xsl:template match="paramList"> 53 52 <p/><table width="537"> 53 <xsl:choose> 54 <xsl:when test='count(param)>4'> 55 <xsl:for-each select="param[position() mod 2 = 1]"> <!-- select the odd numbers--> 56 <tr><xsl:apply-templates select="."/> 57 <xsl:if test="position() != last()"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr> 58 </xsl:for-each> 59 </xsl:when> 60 <xsl:otherwise> 54 61 <xsl:for-each select="param"> 55 <!-- boolean params --> 56 <xsl:choose> 57 <xsl:when test="@type= 'boolean'"> 58 <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}"> 59 <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> 60 <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> 61 </select></td></tr> 62 </xsl:when> 63 <!-- integer params --> 64 <xsl:when test="@type= 'integer'"> 65 <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> 66 </xsl:when> 67 <!-- enum params --> 68 <xsl:when test="@type= 'enum'"> 69 <xsl:variable name="param" select="@name"/> 70 <xsl:variable name="current"><xsl:value-of select="@default"/></xsl:variable> 71 <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> 72 </td><td><select name="{@shortname}"> 73 <xsl:for-each select="option"> 74 75 <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> 76 </xsl:for-each> 77 </select></td></tr> 78 </xsl:when> 62 <tr><xsl:apply-templates select='.'/></tr> 63 </xsl:for-each> 64 </xsl:otherwise> 79 65 </xsl:choose> 80 </xsl:for-each>81 66 </table> 82 67 </xsl:template> 68 83 69 84 70 <xsl:template match="response"> … … 96 82 </xsl:stylesheet> 97 83 84 85 86 87
Note:
See TracChangeset
for help on using the changeset viewer.