source: greenstone3/trunk/web/interfaces/gs2/transform/library.xsl@ 20019

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

indented the file nicely

File size: 3.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:gslib="http://www.greenstone.org/XSL/Library"
6 exclude-result-prefixes="xalan gslib gsf xslt gs3">
7
8
9 <xsl:output method="html"
10 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
11 doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
12
13 <!-- some global parameters - these are set by whoever is invoking the transformation -->
14 <xsl:param name="interface_name"/>
15 <xsl:param name="library_name"/>
16
17 <!-- every pages .............................................. -->
18
19 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable>
20 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
21
22 <xsl:template name="GS2LibDividerBar">
23 <xsl:param name='text'/>
24 <xsl:choose>
25 <xsl:when test="$text">
26 <div class="divbar"><xsl:value-of select="$text"/></div>
27 </xsl:when>
28 <xsl:otherwise>
29 <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
30 </xsl:otherwise>
31 </xsl:choose>
32 </xsl:template>
33
34 <xsl:template match="error">
35 Error: <xsl:value-of select="."/>
36 </xsl:template>
37
38 <!-- site home .................................................... -->
39
40
41 <xsl:template name="pageTitleLanguageDependant">
42 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
43 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>
44 </xsl:template>
45
46
47 <xsl:template name="greenstoneLogoAlternateText">
48 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
49 </xsl:template>
50
51
52 <xsl:template name="collectionLinkWithImage">
53 <xsl:choose>
54 <xsl:when test="displayItem[@name='icon']">
55 <a href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}">
56 <img>
57 <xsl:attribute name="src">
58 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
59 </xsl:attribute>
60 <xsl:attribute name="alt">
61 <xsl:value-of select="displayItem[@name='name']"/>
62 </xsl:attribute>
63 </img>
64 </a>
65 </xsl:when>
66 <xsl:otherwise>
67 <a class="noimage" href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}">
68 <xsl:value-of select="displayItem[@name='name']"/>
69 </a>
70 </xsl:otherwise>
71 </xsl:choose>
72 </xsl:template>
73
74
75 <xsl:template name="quickSearchForm">
76 <form name="QuickSearch" method="get" action="{$library_name}">
77 <input type="hidden" name="a" value="q"/>
78 <input type="hidden" name="rt" value="rd"/>
79 <input type="hidden" name="s" value="{/page/pageResponse/serviceList/service[@name='TextQuery']/@name}"/>
80 <input type="hidden" name="s1.collection" value="all"/>
81 <input type="text" name="s1.query" size="20"/>
82 <input type="submit" value="Quick Search"/>
83 </form>
84 </xsl:template>
85
86
87 <xsl:template match="serviceClusterList">
88 <xsl:for-each select="serviceCluster">
89 <a href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
90 </xsl:for-each>
91 </xsl:template>
92
93
94
95 <xsl:template name="poweredByGS3LanguageDependant">
96 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
97 </xsl:template>
98
99
100
101</xsl:stylesheet>
102
103
Note: See TracBrowser for help on using the repository browser.