source: greenstone3/trunk/web/interfaces/default/transform/classifier.xsl@ 18316

Last change on this file since 18316 was 18316, checked in by kjdon, 15 years ago

indented the xml nicely.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 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 <!-- style includes global params interface_name, library_name -->
10 <xsl:include href="style.xsl"/>
11 <xsl:include href="classifiertools.xsl"/>
12 <xsl:include href="berrytools.xsl"/>
13
14 <xsl:output method="html"/>
15
16 <!-- the main page layout template is here -->
17 <xsl:template match="page">
18 <html>
19 <head>
20 <title>
21 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
22 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
23 </title>
24 <xsl:call-template name="globalStyle"/>
25 <xsl:call-template name="pageStyle"/>
26 </head>
27 <body>
28 <div id="globalwrapper">
29 <xsl:call-template name="response" />
30 <xsl:call-template name="greenstoneFooter"/>
31 </div>
32 </body>
33 </html>
34 </xsl:template>
35
36 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
37
38 <xsl:template name="pageTitle">
39 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
40 </xsl:template>
41
42 <!-- page specific style goes here -->
43 <xsl:template name="pageStyle">
44 <xsl:if test="$berrybasketswitch = 'on'">
45 <xsl:call-template name="berryStyleSheet"/>
46 <xsl:call-template name="js-library"/>
47 </xsl:if>
48 </xsl:template>
49
50
51 <xsl:template match="pageResponse">
52 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
53 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
54 <xsl:call-template name="standardPageBanner">
55 <xsl:with-param name="collName" select="$collName"/>
56 </xsl:call-template>
57
58 <xsl:call-template name="navigationBar">
59 <xsl:with-param name="collName" select="$collName"/>
60 </xsl:call-template>
61
62 <div id="content">
63 <xsl:apply-templates select="service/classifierList">
64 <xsl:with-param name="collName" select="$collName"/>
65 <xsl:with-param name="serviceName" select="$serviceName"/>
66 </xsl:apply-templates>
67
68 <xsl:if test="$berrybasketswitch = 'on'">
69 <xsl:call-template name="berrybasket" />
70 </xsl:if>
71 <xsl:apply-templates select="classifier">
72 <xsl:with-param name="collName" select="$collName"/>
73 <xsl:with-param name="serviceName" select="$serviceName"/>
74 </xsl:apply-templates>
75 </div>
76 </xsl:template>
77
78 <xsl:template match="classifierList">
79 <xsl:param name="collName"/>
80 <xsl:param name="serviceName"/>
81 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
82 <ul id="classifierlist">
83 <xsl:for-each select="classifier">
84 <xsl:choose>
85 <xsl:when test="@name=$selected">
86 <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
87 </xsl:when>
88 <xsl:otherwise>
89 <li><a href="{$library_name}?a=b&amp;rt=r&amp;s={$serviceName}&amp;c={$collName}&amp;cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
90
91 </xsl:for-each>
92 </ul>
93 </xsl:template>
94
95</xsl:stylesheet>
96
97
98
99
100
101
Note: See TracBrowser for help on using the repository browser.