source: trunk/gsdl3/interfaces/default/transform/style.xsl@ 3790

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

tidy up

  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4xmlns:java="http://xml.apache.org/xslt/java"
5extension-element-prefixes="java">
6
7<!--
8<xsl:output method="html"/>
9-->
10
11<xsl:attribute-set name="body-style">
12 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
13 <xsl:attribute name="text">#000000</xsl:attribute>
14 <xsl:attribute name="link">#006666</xsl:attribute>
15 <xsl:attribute name="alink">#cc9900</xsl:attribute>
16 <xsl:attribute name="vlink">#666633</xsl:attribute>
17 <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute>
18</xsl:attribute-set>
19
20
21<xsl:template name="greenstoneHead">
22<head>
23<title><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></title>
24
25</head>
26</xsl:template>
27
28<xsl:template name="greenstonePageBanner">
29
30<center>
31<table width="537" cellspacing="0" cellpadding="0">
32 <tr valign="top">
33 <td rowspan="2" align="left"><center><img src="interfaces/default/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td>
34 <td align="right"></td>
35 </tr>
36
37 <tr>
38 <td align="right"></td>
39 </tr>
40
41 <tr>
42 <td colspan="2"></td>
43 </tr>
44</table>
45<xsl:call-template name="greenBar"/>
46
47</center>
48
49<!-- end of page banner -->
50
51</xsl:template>
52
53<xsl:template name="greenstoneFooter">
54<center>
55<p/>
56<small>powered by greenstone3</small>
57</center>
58</xsl:template>
59
60
61<xsl:template name="collectionPageBanner">
62<xsl:param name="collName">coll-name</xsl:param>
63<xsl:param name="collIcon"><xsl:value-of select="$collName"/>.gif</xsl:param>
64<xsl:variable name="library" select="ancestor::page/config/library_name"/>
65<table width="537">
66<tr><td align="left"><a href="{$library}?a=p&amp;sa=about&amp;c={$collName}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">aboutpage</xsl:with-param></xsl:call-template></xsl:attribute></img></a></td><td align="right"><a href="{$library}?a=p&amp;sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table>
67
68<xsl:call-template name="greenBar"/>
69</xsl:template>
70
71<!-- do we want different stuff for cluster or same as collection -->
72<xsl:template name="clusterPageBanner">
73<xsl:param name="clusterName">coll-name</xsl:param>
74<xsl:variable name="library" select="ancestor::page/config/library_name"/>
75<table width="537">
76<tr><td align="left"><a href="{$library}?a=p&amp;sa=about&amp;c={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&amp;sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table>
77
78<xsl:call-template name="greenBar"/>
79</xsl:template>
80
81<xsl:template name="greenBar">
82<p/><img src="interfaces/default/images/divb.gif" width="537" height="17"/>
83</xsl:template>
84
85
86
87<!-- text stuff. can be called via xsl:call-template:
88
89<xsl:call-template name="text"><xsl:with-param name="key">your text name here</xsl:with-param></xsl:call-template>
90
91otherwise can be selected by :
92
93<xsl:apply-templates select="text"/>
94
95the text elem to be processed must be in the form
96<text name="query/about"/>
97
98-->
99
100<xsl:template name="text" match="text">
101<xsl:param name="key"><xsl:value-of select="@name"/></xsl:param>
102<xsl:variable name="path">ancestor::page/display/<xsl:value-of select='$key'/></xsl:variable>
103<xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path)"/></xsl:variable>
104<xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
105<xsl:otherwise>
106
107<!-- no match found, output the name of the text string -->
108_<xsl:value-of select="$key"/>_</xsl:otherwise>
109</xsl:choose>
110</xsl:template>
111
112
113<!-- may not have to use this anymore-->
114<xsl:template name="text-old" match="text-old">
115
116<xsl:param name="key"><xsl:value-of select="@name"/></xsl:param>
117
118<!-- try the current language -->
119
120<xsl:variable name="path1">ancestor::page/translate/current/text/<xsl:value-of select="$key"/></xsl:variable>
121<xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path1)"/></xsl:variable>
122<xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
123<xsl:otherwise>
124
125<!-- try the default language -->
126<xsl:variable name="path2">ancestor::page/translate/default/text/<xsl:value-of select="$key"/></xsl:variable>
127<xsl:variable name="string2"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path2)"/></xsl:variable>
128<xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
129<xsl:otherwise>
130
131<!-- no match found, output the name of the text string -->
132_<xsl:value-of select="$key"/>_</xsl:otherwise>
133</xsl:choose>
134</xsl:otherwise>
135</xsl:choose>
136</xsl:template>
137
138</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.