source: other-projects/tipple-android/i-greenstone-server-files/greenstone/webapps/greenstone3/interfaces/gs2/transform/classifier.xsl@ 26899

Last change on this file since 26899 was 26899, checked in by davidb, 11 years ago

Tipple reborn after Chris's Summer of Code 2013

  • Property svn:mime-type set to application/xml
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 <!-- classifiertools needs this-->
13 <xsl:include href="berrytools.xsl"/>
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:apply-templates select="pageResponse"/>
31 <xsl:call-template name="greenstoneFooter"/>
32 </div>
33 </body>
34 </html>
35 </xsl:template>
36
37 <xsl:template name="pageTitle">
38 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
39 </xsl:template>
40
41 <!-- page specific style goes here -->
42 <xsl:template name="pageStyle"/>
43
44 <xsl:template match="pageResponse">
45 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
46 <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
47 <xsl:variable name="cl" select="/page/pageRequest/paramList/param[@name='cl']/@value"/>
48 <xsl:variable name="clTop">
49 <xsl:choose>
50 <xsl:when test="contains($cl, '.')"><xsl:value-of select="substring-before($cl, '.')"/></xsl:when>
51 <xsl:otherwise>
52 <xsl:value-of select="$cl"/>
53 </xsl:otherwise>
54 </xsl:choose>
55 </xsl:variable>
56 <xsl:call-template name="standardPageBanner">
57 <xsl:with-param name="collName" select="$collName"/>
58 <xsl:with-param name="pageType">browse</xsl:with-param>
59 <xsl:with-param name="clTop" select="$clTop"/>
60 </xsl:call-template>
61 <xsl:call-template name="navigationBar">
62 <xsl:with-param name="collName" select="$collName"/>
63 <xsl:with-param name="clTop" select="$clTop"/>
64 </xsl:call-template>
65 <div class="document">
66 <xsl:apply-templates select="classifier">
67 <xsl:with-param name="collName" select="$collName"/>
68 <xsl:with-param name="serviceName" select="$serviceName"/>
69 </xsl:apply-templates>
70 </div>
71 </xsl:template>
72
73 <xsl:template match="classifierList">
74 <xsl:param name="collName"/>
75 <xsl:param name="serviceName"/>
76 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
77 <ul id="classifierlist">
78 <xsl:for-each select="classifier">
79 <xsl:choose>
80 <xsl:when test="@name=$selected">
81 <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
82 </xsl:when>
83 <xsl:otherwise>
84 <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>
85
86 </xsl:for-each>
87 </ul>
88 </xsl:template>
89
90
91</xsl:stylesheet>
92
93
94
95
96
97
Note: See TracBrowser for help on using the repository browser.