Changeset 3686


Ignore:
Timestamp:
2003-01-17T11:04:39+13:00 (21 years ago)
Author:
kjdon
Message:

tidy up, cgi args changes, other stuff

Location:
trunk/gsdl3/interfaces/default/transform
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/interfaces/default/transform/about.xsl

    r3655 r3686  
    1515<body xsl:use-attribute-sets="body-style">
    1616<center>
     17<table width='537'>
     18<tr><td>
    1719<xsl:apply-templates select="response/collection|response/serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
     20</td></tr></table>
    1821</center>
    1922<xsl:call-template name="greenstoneFooter"/>
     
    2225</xsl:template>
    2326
    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"'>
    2630<xsl:call-template name="collectionPageBanner">
    2731<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>
    2933</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>
    3039<p/><xsl:apply-templates select="metadataList">
    3140<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
    3241</xsl:apply-templates>
    33 <p/><xsl:apply-templates select="serviceList" mode="collection">
     42<p/><xsl:apply-templates select="serviceList">
    3443<xsl:with-param name="collName"><xsl:value-of select="$collName"/></xsl:with-param>
    3544</xsl:apply-templates>
    3645</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 
    5046
    5147
     
    5450<h2><xsl:call-template name="text"><xsl:with-param name="key">about.description</xsl:with-param></xsl:call-template></h2>
    5551<p/>
    56 <table>
     52<table width='537'>
    5753<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>
    5955</xsl:for-each>
    6056</table>
    6157</xsl:template>
    6258
    63 <xsl:template match="serviceList" mode="collection">
     59<xsl:template match="serviceList">
    6460<xsl:param name="collName">coll-name</xsl:param>
    6561<xsl:variable name="library" select="ancestor::page/config/library_name"/>
    6662<h2><xsl:call-template name="text"><xsl:with-param name="key">about.services</xsl:with-param></xsl:call-template></h2>
    6763<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&amp;sa={$s-type}&amp;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}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="@name"/></a></td></tr>
    7474</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&amp;sa={$s-type}&amp;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&amp;sa=d&amp;s={$s-type}&amp;c={$collName}"><xsl:value-of select="$serviceName"/></a></td>
    82 </xsl:if>
    83 </tr>
    8475</xsl:for-each>
    8576</table>
     
    8879
    8980
    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&amp;sa=d&amp;c={$collName}&amp;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>
    10181
    10282</xsl:stylesheet> 
  • trunk/gsdl3/interfaces/default/transform/basicquery.xsl

    r3655 r3686  
    4040<input type="hidden" name="a" value="q"/>
    4141<input type="hidden" name="sa" value="{$subaction}"/>
     42<input type="hidden" name="rt" value="r"/>
     43<input type="hidden" name="s" value="{@name}"/>
    4244<input type="hidden" name="c" value="{$collName}"/>
    4345<input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input>
     
    8890<xsl:template match="response">
    8991<xsl:param name="collName">coll-name</xsl:param>
    90 <xsl:variable name="library" select="ancestor::page/config/library_name"/>
    9192<table width="537">
    9293<xsl:for-each select="content/documentList/document">
    93 <tr><td><a href="{$library}?a=d&amp;c={$collName}&amp;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>
    9495</xsl:for-each>
    9596</table>
     
    9798</xsl:template>
    9899
     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&amp;c={$collName}&amp;d={@name}">link</a></td><td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td>
     104</xsl:template>
    99105
    100106</xsl:stylesheet> 
  • trunk/gsdl3/interfaces/default/transform/classifier.xsl

    r3655 r3686  
    1111<xsl:template match="page">
    1212<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>
    1314<html>
    1415<xsl:call-template name="greenstoneHead"/>
     
    2021<xsl:apply-templates select="service/classifierList">
    2122<xsl:with-param name="collName" select="$collName"/>
     23<xsl:with-param name="serviceName" select="$serviceName"/>
    2224</xsl:apply-templates>
    2325<p/>
    2426<xsl:apply-templates select="response/content/classifier">
    2527<xsl:with-param name="collName" select="$collName"/>
     28<xsl:with-param name="serviceName" select="$serviceName"/>
    2629</xsl:apply-templates>
    2730</center>
     
    3336<xsl:template match="classifierList">
    3437<xsl:param name="collName">coll-name</xsl:param>
     38<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    3539<xsl:variable name="library" select="ancestor::page/config/library_name"/>
    3640<xsl:variable name="selected" select="ancestor::page/response/content/classifier/@name"/>
     
    4246</xsl:when>
    4347<xsl:otherwise>
    44 <td align='center'><a href="{$library}?a=b&amp;sa=Classifier&amp;c={$collName}&amp;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&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></td></xsl:otherwise></xsl:choose>
    4549</xsl:for-each>
    4650</tr></table>
     
    5256<xsl:template match="classifier[@type='vertical' and @interleave='true']">
    5357<xsl:param name="collName">coll-name</xsl:param>
     58<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    5459<xsl:variable name='link' select='@link'/>
    5560<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>
    5762</xsl:when>
    5863<xsl:otherwise><tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates></tr>
     
    6570<xsl:template match="classifier[@type='vertical' and @interleave='false']">
    6671<xsl:param name="collName">coll-name</xsl:param>
     72<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    6773<xsl:variable name='link' select='@link'/>
    6874<!-- process the nodes and documents separately-->
     
    8187<xsl:template match="classifier[@type='horizontal' and @interleave='false']">
    8288<xsl:param name="collName">coll-name</xsl:param>
     89<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    8390<xsl:variable name='link' select='@link'/>
    8491<!-- process the nodes and documents separately-->
     
    8693<table width='537'><tr valign='top'>
    8794<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>
    8996</xsl:for-each></tr>
    9097<tr valign='top'>
    9198<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>
    93100</table>
    94101<table width='537'>
     
    102109<xsl:template match="classifier[@type='horizontal' and @interleave='true']">
    103110<xsl:param name="collName">coll-name</xsl:param>
     111<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    104112<xsl:variable name='link' select='@link'/>
    105113<!-- process the nodes and documents together -->
     
    107115<table><tr valign='top'>
    108116<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>
    110118</xsl:when>
    111119<xsl:otherwise><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates>
     
    115123<tr valign='top'>
    116124<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>
    118126<xsl:otherwise><td></td><xsl:if test="$link='icon'"><td></td></xsl:if>
    119127</xsl:otherwise>
     
    149157<xsl:template match="node" mode="current-node">
    150158<xsl:param name="collName">coll-name</xsl:param>
     159<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    151160<xsl:param name="link">icon</xsl:param>
    152161<xsl:variable name="library" select="ancestor::page/config/library_name"/>
    153162<xsl:choose><xsl:when test="$link='icon'">
    154 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&amp;sa=Classifier&amp;c=<xsl:value-of select='$collName'/>&amp;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&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;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>
    155164</xsl:when><xsl:otherwise>
    156 <td><a><xsl:attribute name='href'><xsl:value-of select='$library'/>?a=b&amp;sa=Classifier&amp;c=<xsl:value-of select='$collName'/>&amp;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&amp;s=<xsl:value-of select='$serviceName'/>&amp;c=<xsl:value-of select='$collName'/>&amp;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>
    157166</xsl:otherwise></xsl:choose>
    158167</xsl:template>
     
    164173<xsl:template match="node" mode="process-all-children">
    165174<xsl:param name="collName">coll-name</xsl:param>
     175<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    166176<xsl:param name="link">icon</xsl:param>
    167177<td><p/>
    168178<xsl:choose><xsl:when test='@type="vertical"'>
    169179<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>
    171181</xsl:when>
    172182<xsl:otherwise><tr valign='top'><xsl:apply-templates select='.'><xsl:with-param name='collName' select='$collName'/></xsl:apply-templates></tr>
     
    176186<xsl:otherwise>
    177187<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>
    179189</xsl:when>
    180190<xsl:otherwise><xsl:apply-templates select='.'/>
     
    189199<xsl:template match="node" mode="process-node-children">
    190200<xsl:param name="collName">coll-name</xsl:param>
     201<xsl:param name="serviceName">ClassifierBrowse</xsl:param>
    191202<xsl:param name="link">icon</xsl:param>
    192203<td><p/>
    193204<xsl:if test='node'><!-- only do this if there are child nodes - netscape craps out at an empty table like <table  /> -->
    194205<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>
    196207</xsl:when>
    197208<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>
    199210</xsl:otherwise></xsl:choose>
    200211</xsl:if>
  • trunk/gsdl3/interfaces/default/transform/process.xsl

    r3654 r3686  
    6060<xsl:otherwise>
    6161<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>
    6363</xsl:otherwise>
    6464</xsl:choose>
  • trunk/gsdl3/interfaces/default/transform/service-params.xsl

    r3655 r3686  
    6060  </xsl:template>
    6161 
     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>
    6268  <!-- multi params - params that are combinations of other params -->
    6369  <xsl:template match="param[@type='multi']">
Note: See TracChangeset for help on using the changeset viewer.