Changeset 3686
- Timestamp:
- 2003-01-17T11:04:39+13:00 (21 years ago)
- Location:
- trunk/gsdl3/interfaces/default/transform
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/interfaces/default/transform/about.xsl
r3655 r3686 15 15 <body xsl:use-attribute-sets="body-style"> 16 16 <center> 17 <table width='537'> 18 <tr><td> 17 19 <xsl:apply-templates select="response/collection|response/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates> 20 </td></tr></table> 18 21 </center> 19 22 <xsl:call-template name="greenstoneFooter"/> … … 22 25 </xsl:template> 23 26 24 <xsl:template match="collection"> 25 <xsl:param name="collName">x</xsl:param> 27 <xsl:template match="collection|serviceCluster"> 28 <xsl:param name="collName">coll-name</xsl:param> 29 <xsl:if test='name()="collection"'> 26 30 <xsl:call-template name="collectionPageBanner"> 27 31 <xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param> 28 <xsl:with-param name="collIcon"><xsl:value-of select="metadataList/metadata[@name=' iconCollection']"/></xsl:with-param>32 <xsl:with-param name="collIcon"><xsl:value-of select="metadataList/metadata[@name='colIcon']"/></xsl:with-param> 29 33 </xsl:call-template> 34 </xsl:if> 35 <xsl:if test='name()="serviceCluster"'> 36 <xsl:call-template name="clusterPageBanner"> 37 <xsl:with-param name="clusterName"><xsl:value-of select="$collName"/></xsl:with-param></xsl:call-template> 38 </xsl:if> 30 39 <p/><xsl:apply-templates select="metadataList"> 31 40 <xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param> 32 41 </xsl:apply-templates> 33 <p/><xsl:apply-templates select="serviceList" mode="collection">42 <p/><xsl:apply-templates select="serviceList"> 34 43 <xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param> 35 44 </xsl:apply-templates> 36 45 </xsl:template> 37 38 <xsl:template match="serviceCluster">39 <xsl:param name="collName">x</xsl:param>40 <xsl:call-template name="clusterPageBanner">41 <xsl:with-param name="clusterName"><xsl:value-of select="$collName"/></xsl:with-param></xsl:call-template>42 <p/><xsl:apply-templates select="metadataList">43 <xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>44 </xsl:apply-templates>45 <p/><xsl:apply-templates select="serviceList" mode="cluster">46 <xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>47 </xsl:apply-templates>48 </xsl:template>49 50 46 51 47 … … 54 50 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.description</xsl:with-param></xsl:call-template></h2> 55 51 <p/> 56 <table >52 <table width='537'> 57 53 <xsl:for-each select="metadata"> 58 <tr ><td><b><xsl:value-of select="@name"/></b></td><td><xsl:value-of select="."/></td></tr>54 <tr valign='top'><td><b><xsl:value-of select="@name"/></b></td><td><xsl:value-of select="."/></td></tr> 59 55 </xsl:for-each> 60 56 </table> 61 57 </xsl:template> 62 58 63 <xsl:template match="serviceList" mode="collection">59 <xsl:template match="serviceList"> 64 60 <xsl:param name="collName">coll-name</xsl:param> 65 61 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 66 62 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2> 67 63 <table> 68 <xsl:for-each select="service[@type='query']"> 69 <xsl:variable name="serviceName"><xsl:value-of select="@name"/></xsl:variable> 70 <tr> 71 <xsl:if test="contains($serviceName, 'Query')"> 72 <xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Query')"/></xsl:variable> 73 <td><a href="{$library}?a=q&sa={$s-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td> 64 <xsl:for-each select="service"> 65 <xsl:variable name="action"><xsl:choose> 66 <xsl:when test="@type='query'">q</xsl:when> 67 <xsl:when test="@type='browse'">b</xsl:when> 68 <xsl:when test="@type='process'">pr</xsl:when> 69 <xsl:when test="@type='applet'">a</xsl:when> 70 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 71 </xsl:choose></xsl:variable> 72 <xsl:if test="$action !='DO_NOT_DISPLAY'"> 73 <tr><td><a href="{$library}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="@name"/></a></td></tr> 74 74 </xsl:if> 75 <xsl:if test="contains($serviceName, 'Browse')">76 <xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Browse')"/></xsl:variable>77 <td><a href="{$library}?a=b&sa={$s-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td>78 </xsl:if>79 <xsl:if test="contains($serviceName, 'Applet')">80 <xsl:variable name="s-type"><xsl:value-of select="substring-before($serviceName, 'Applet')"/></xsl:variable>81 <td><a href="{$library}?a=a&sa=d&s={$s-type}&c={$collName}"><xsl:value-of select="$serviceName"/></a></td>82 </xsl:if>83 </tr>84 75 </xsl:for-each> 85 76 </table> … … 88 79 89 80 90 <xsl:template match="serviceList" mode="cluster">91 <xsl:param name="collName">coll-name</xsl:param>92 <xsl:variable name="library" select="ancestor::page/config/library_name"/>93 <h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2>94 <table>95 <xsl:for-each select="service">96 <tr><td><a href="{$library}?a=pr&sa=d&c={$collName}&s={@name}"><xsl:value-of select="@name"/></a></td></tr>97 </xsl:for-each>98 </table>99 <xsl:call-template name="greenBar"/>100 </xsl:template>101 81 102 82 </xsl:stylesheet> -
trunk/gsdl3/interfaces/default/transform/basicquery.xsl
r3655 r3686 40 40 <input type="hidden" name="a" value="q"/> 41 41 <input type="hidden" name="sa" value="{$subaction}"/> 42 <input type="hidden" name="rt" value="r"/> 43 <input type="hidden" name="s" value="{@name}"/> 42 44 <input type="hidden" name="c" value="{$collName}"/> 43 45 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input> … … 88 90 <xsl:template match="response"> 89 91 <xsl:param name="collName">coll-name</xsl:param> 90 <xsl:variable name="library" select="ancestor::page/config/library_name"/>91 92 <table width="537"> 92 93 <xsl:for-each select="content/documentList/document"> 93 <tr>< td><a href="{$library}?a=d&c={$collName}&d={@name}">link</a></td><td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td></tr>94 <tr><xsl:apply-templates select="."><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates></tr> 94 95 </xsl:for-each> 95 96 </table> … … 97 98 </xsl:template> 98 99 100 <xsl:template match="document"> 101 <xsl:param name="collName">coll-name</xsl:param> 102 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 103 <td><a href="{$library}?a=d&c={$collName}&d={@name}">link</a></td><td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td> 104 </xsl:template> 99 105 100 106 </xsl:stylesheet> -
trunk/gsdl3/interfaces/default/transform/classifier.xsl
r3655 r3686 11 11 <xsl:template match="page"> 12 12 <xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable> 13 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable> 13 14 <html> 14 15 <xsl:call-template name="greenstoneHead"/> … … 20 21 <xsl:apply-templates select="service/classifierList"> 21 22 <xsl:with-param name="collName" select="$collName"/> 23 <xsl:with-param name="serviceName" select="$serviceName"/> 22 24 </xsl:apply-templates> 23 25 <p/> 24 26 <xsl:apply-templates select="response/content/classifier"> 25 27 <xsl:with-param name="collName" select="$collName"/> 28 <xsl:with-param name="serviceName" select="$serviceName"/> 26 29 </xsl:apply-templates> 27 30 </center> … … 33 36 <xsl:template match="classifierList"> 34 37 <xsl:param name="collName">coll-name</xsl:param> 38 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 35 39 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 36 40 <xsl:variable name="selected" select="ancestor::page/response/content/classifier/@name"/> … … 42 46 </xsl:when> 43 47 <xsl:otherwise> 44 <td align='center'><a href="{$library}?a=b&s a=Classifier&c={$collName}&cl={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></td></xsl:otherwise></xsl:choose>48 <td align='center'><a href="{$library}?a=b&s={$serviceName}&c={$collName}&cl={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></td></xsl:otherwise></xsl:choose> 45 49 </xsl:for-each> 46 50 </tr></table> … … 52 56 <xsl:template match="classifier[@type='vertical' and @interleave='true']"> 53 57 <xsl:param name="collName">coll-name</xsl:param> 58 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 54 59 <xsl:variable name='link' select='@link'/> 55 60 <table width='537'><xsl:for-each select='node|document'> 56 <xsl:choose><xsl:when test='name()="node"'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr>61 <xsl:choose><xsl:when test='name()="node"'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr> 57 62 </xsl:when> 58 63 <xsl:otherwise><tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates></tr> … … 65 70 <xsl:template match="classifier[@type='vertical' and @interleave='false']"> 66 71 <xsl:param name="collName">coll-name</xsl:param> 72 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 67 73 <xsl:variable name='link' select='@link'/> 68 74 <!-- process the nodes and documents separately--> … … 81 87 <xsl:template match="classifier[@type='horizontal' and @interleave='false']"> 82 88 <xsl:param name="collName">coll-name</xsl:param> 89 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 83 90 <xsl:variable name='link' select='@link'/> 84 91 <!-- process the nodes and documents separately--> … … 86 93 <table width='537'><tr valign='top'> 87 94 <xsl:for-each select='node'> 88 <xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates>95 <xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates> 89 96 </xsl:for-each></tr> 90 97 <tr valign='top'> 91 98 <xsl:for-each select='node'> 92 <xsl:apply-templates select='.' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name=' link' select='$link'/></xsl:apply-templates></xsl:for-each></tr>99 <xsl:apply-templates select='.' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></xsl:for-each></tr> 93 100 </table> 94 101 <table width='537'> … … 102 109 <xsl:template match="classifier[@type='horizontal' and @interleave='true']"> 103 110 <xsl:param name="collName">coll-name</xsl:param> 111 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 104 112 <xsl:variable name='link' select='@link'/> 105 113 <!-- process the nodes and documents together --> … … 107 115 <table><tr valign='top'> 108 116 <xsl:for-each select='node|document'> 109 <xsl:choose><xsl:when test='name()="node"'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates>117 <xsl:choose><xsl:when test='name()="node"'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates> 110 118 </xsl:when> 111 119 <xsl:otherwise><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates> … … 115 123 <tr valign='top'> 116 124 <xsl:for-each select='node|document'> 117 <xsl:choose><xsl:when test='name()="node" and node|document'><xsl:if test="$link='icon'"><td></td></xsl:if><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name=' link' select='$link'/></xsl:apply-templates></xsl:when>125 <xsl:choose><xsl:when test='name()="node" and node|document'><xsl:if test="$link='icon'"><td></td></xsl:if><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/><xsl:with-param name='serviceName' select='$serviceName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></xsl:when> 118 126 <xsl:otherwise><td></td><xsl:if test="$link='icon'"><td></td></xsl:if> 119 127 </xsl:otherwise> … … 149 157 <xsl:template match="node" mode="current-node"> 150 158 <xsl:param name="collName">coll-name</xsl:param> 159 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 151 160 <xsl:param name="link">icon</xsl:param> 152 161 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 153 162 <xsl:choose><xsl:when test="$link='icon'"> 154 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&s a=Classifier&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@name'/><xsl:if test="node|document">.pr</xsl:if></xsl:attribute><img src='interfaces/default/images/bshelf.gif' border='0' width='20' height='16' /></a></td><td align='left'><xsl:value-of select="metadataList/metadata[@name='Title']"/></td>163 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&s=<xsl:value-of select='$serviceName'/>&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@name'/><xsl:if test="node|document">.pr</xsl:if></xsl:attribute><img src='interfaces/default/images/bshelf.gif' border='0' width='20' height='16' /></a></td><td align='left'><xsl:value-of select="metadataList/metadata[@name='Title']"/></td> 155 164 </xsl:when><xsl:otherwise> 156 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&s a=Classifier&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@name'/><xsl:if test="node|document">.pr</xsl:if></xsl:attribute><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></td>165 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&s=<xsl:value-of select='$serviceName'/>&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@name'/><xsl:if test="node|document">.pr</xsl:if></xsl:attribute><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></td> 157 166 </xsl:otherwise></xsl:choose> 158 167 </xsl:template> … … 164 173 <xsl:template match="node" mode="process-all-children"> 165 174 <xsl:param name="collName">coll-name</xsl:param> 175 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 166 176 <xsl:param name="link">icon</xsl:param> 167 177 <td><p/> 168 178 <xsl:choose><xsl:when test='@type="vertical"'> 169 179 <table><xsl:for-each select='node|document'> 170 <xsl:choose><xsl:when test='name()="node"'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr>180 <xsl:choose><xsl:when test='name()="node"'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr> 171 181 </xsl:when> 172 182 <xsl:otherwise><tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates></tr> … … 176 186 <xsl:otherwise> 177 187 <table><tr valign='top'><xsl:for-each select='node|document'> 178 <xsl:choose><xsl:when test='name()="node"'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates>188 <xsl:choose><xsl:when test='name()="node"'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates><xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates> 179 189 </xsl:when> 180 190 <xsl:otherwise><xsl:apply-templates select='.'/> … … 189 199 <xsl:template match="node" mode="process-node-children"> 190 200 <xsl:param name="collName">coll-name</xsl:param> 201 <xsl:param name="serviceName">ClassifierBrowse</xsl:param> 191 202 <xsl:param name="link">icon</xsl:param> 192 203 <td><p/> 193 204 <xsl:if test='node'><!-- only do this if there are child nodes - netscape craps out at an empty table like <table /> --> 194 205 <xsl:choose><xsl:when test='@type="vertical"'> 195 <table><xsl:for-each select='node'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr></xsl:for-each></table>206 <table><xsl:for-each select='node'><tr valign='top'><xsl:apply-templates select='.' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates></tr><tr valign='top'><td></td><xsl:apply-templates select='.' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr></xsl:for-each></table> 196 207 </xsl:when> 197 208 <xsl:otherwise> 198 <table><tr valign='top'><xsl:apply-templates select='node' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/>< /xsl:apply-templates><xsl:apply-templates select='node' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr></table>209 <table><tr valign='top'><xsl:apply-templates select='node' mode='current-node'><xsl:with-param name='link' select='$link'/><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates><xsl:apply-templates select='node' mode='process-node-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='link' select='$link'/></xsl:apply-templates></tr></table> 199 210 </xsl:otherwise></xsl:choose> 200 211 </xsl:if> -
trunk/gsdl3/interfaces/default/transform/process.xsl
r3654 r3686 60 60 <xsl:otherwise> 61 61 <xsl:variable name="pname" select="@name"/> 62 <tr ><td><xsl:value-of select='ancestor::service/display/param[@name=$pname]/name'/></td><td align="right"><xsl:apply-templates select="."/></td></tr>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 63 </xsl:otherwise> 64 64 </xsl:choose> -
trunk/gsdl3/interfaces/default/transform/service-params.xsl
r3655 r3686 60 60 </xsl:template> 61 61 62 <!-- large string params --> 63 <xsl:template match="param[@type='text']"> 64 <xsl:param name="default" select="@default"/> 65 <xsl:variable name="pname" select='@name'/> 66 <textarea name="{@shortname}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea> 67 </xsl:template> 62 68 <!-- multi params - params that are combinations of other params --> 63 69 <xsl:template match="param[@type='multi']">
Note:
See TracChangeset
for help on using the changeset viewer.