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

tidy up, cgi args changes, other stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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>
Note: See TracChangeset for help on using the changeset viewer.