source: trunk/gsdl3/web/interfaces/default/transform/classifier.xsl@ 4883

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

moved a lot of the classifier stuff into classifiertools.xsl so that it can be shared between interfaces

  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 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="classifiertools.xsl"/>
11
12 <xsl:output method="html"/>
13
14 <xsl:template name="pageHead">
15 <head>
16 <title><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></title>
17 </head>
18 </xsl:template>
19
20 <xsl:template match="pageResponse">
21 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
22 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
23 <center>
24 <xsl:call-template name="collectionPageBanner">
25 <xsl:with-param name="collName" select="$collName"/>
26 </xsl:call-template>
27 <xsl:apply-templates select="service/classifierList">
28 <xsl:with-param name="collName" select="$collName"/>
29 <xsl:with-param name="serviceName" select="$serviceName"/>
30 </xsl:apply-templates>
31 <p/>
32 <xsl:apply-templates select="classifier">
33 <xsl:with-param name="collName" select="$collName"/>
34 <xsl:with-param name="serviceName" select="$serviceName"/>
35 </xsl:apply-templates>
36 </center>
37 </xsl:template>
38
39 <xsl:template match="classifierList">
40 <xsl:param name="collName"/>
41 <xsl:param name="serviceName"/>
42 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
43 <table width='537'><tr>
44 <xsl:for-each select="classifier">
45 <xsl:variable name="cname" select="@name"/>
46 <xsl:choose>
47 <xsl:when test="@name=$selected">
48 <td align='center'><xsl:value-of select="ancestor::service/display/classifier[@name=$cname]/name"/></td>
49 </xsl:when>
50 <xsl:otherwise>
51 <td align='center'><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="ancestor::service/display/classifier[@name=$cname]/name"/></a></td></xsl:otherwise></xsl:choose>
52 </xsl:for-each>
53 </tr></table>
54 <xsl:call-template name="greenBar"/>
55 </xsl:template>
56
57</xsl:stylesheet>
58
59
60
61
62
63
Note: See TracBrowser for help on using the repository browser.