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

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

changed main div id from globalwrapper to page-wrapper and added dir attribute for rtl languages

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 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 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
29 <div id="page-wrapper">
30 <xsl:call-template name="response" />
31 <xsl:call-template name="greenstoneFooter"/>
32 </div>
33 </body>
34 </html>
35 </xsl:template>
36
37 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
38
39 <xsl:template name="pageTitle">
40 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
41 </xsl:template>
42
43 <!-- page specific style goes here -->
44 <xsl:template name="pageStyle">
45 <xsl:if test="$berrybasketswitch = 'on'">
46 <xsl:call-template name="berryStyleSheet"/>
47 <xsl:call-template name="js-library"/>
48 </xsl:if>
49 </xsl:template>
50
51
52 <xsl:template match="pageResponse">
53 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
54 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
55 <xsl:call-template name="standardPageBanner">
56 <xsl:with-param name="collName" select="$collName"/>
57 </xsl:call-template>
58
59 <xsl:call-template name="navigationBar">
60 <xsl:with-param name="collName" select="$collName"/>
61 </xsl:call-template>
62
63 <div id="content">
64 <xsl:apply-templates select="service/classifierList">
65 <xsl:with-param name="collName" select="$collName"/>
66 <xsl:with-param name="serviceName" select="$serviceName"/>
67 </xsl:apply-templates>
68
69 <xsl:if test="$berrybasketswitch = 'on'">
70 <xsl:call-template name="berrybasket" />
71 </xsl:if>
72 <xsl:apply-templates select="classifier">
73 <xsl:with-param name="collName" select="$collName"/>
74 <xsl:with-param name="serviceName" select="$serviceName"/>
75 </xsl:apply-templates>
76 </div>
77 </xsl:template>
78
79 <xsl:template match="classifierList">
80 <xsl:param name="collName"/>
81 <xsl:param name="serviceName"/>
82 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
83 <ul id="classifierlist">
84 <xsl:for-each select="classifier">
85 <xsl:choose>
86 <xsl:when test="@name=$selected">
87 <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
88 </xsl:when>
89 <xsl:otherwise>
90 <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>
91
92 </xsl:for-each>
93 </ul>
94 </xsl:template>
95
96</xsl:stylesheet>
97
98
99
100
101
102
Note: See TracBrowser for help on using the repository browser.