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 | extension-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&sa=about&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&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&sa=about&c={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&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 | <!-- Display the appropriate image, depending on the node type -->
|
---|
88 | <xsl:template match="documentNode" mode="displayNodeIcon">
|
---|
89 |
|
---|
90 | <!-- Root node: book icon (open or closed) -->
|
---|
91 | <xsl:if test="@nodeType='root'">
|
---|
92 | <xsl:choose>
|
---|
93 | <xsl:when test="documentNode">
|
---|
94 | <img border="0" width="28" height="23"
|
---|
95 | src="interfaces/default/images/openbook.gif"
|
---|
96 | alt="Close this book"/>
|
---|
97 | </xsl:when>
|
---|
98 | <xsl:otherwise>
|
---|
99 | <img border="0" width="18" height="11"
|
---|
100 | src="interfaces/default/images/book.gif"
|
---|
101 | alt="Open this document and view contents"/>
|
---|
102 | </xsl:otherwise>
|
---|
103 | </xsl:choose>
|
---|
104 | </xsl:if>
|
---|
105 |
|
---|
106 | <!-- Interior node: folder icon (open or closed) -->
|
---|
107 | <xsl:if test="@nodeType='interior'">
|
---|
108 | <xsl:choose>
|
---|
109 | <xsl:when test="documentNode">
|
---|
110 | <img border="0" width="23" height="15"
|
---|
111 | src="interfaces/default/images/openfldr.gif"
|
---|
112 | alt="Close this folder"/>
|
---|
113 | </xsl:when>
|
---|
114 | <xsl:otherwise>
|
---|
115 | <img border="0" width="23" height="15"
|
---|
116 | src="interfaces/default/images/clsdfldr.gif"
|
---|
117 | alt="Open this folder and view contents"/>
|
---|
118 | </xsl:otherwise>
|
---|
119 | </xsl:choose>
|
---|
120 | </xsl:if>
|
---|
121 |
|
---|
122 | <!-- Leaf node: page icon -->
|
---|
123 | <xsl:if test="@nodeType='leaf'">
|
---|
124 | <img border="0" width="16" height="21"
|
---|
125 | src="interfaces/default/images/itext.gif"
|
---|
126 | alt="View the document"/>
|
---|
127 | </xsl:if>
|
---|
128 | </xsl:template>
|
---|
129 |
|
---|
130 |
|
---|
131 |
|
---|
132 |
|
---|
133 | <!-- text stuff. can be called via xsl:call-template:
|
---|
134 |
|
---|
135 | <xsl:call-template name="text"><xsl:with-param name="key">your text name here</xsl:with-param></xsl:call-template>
|
---|
136 |
|
---|
137 | otherwise can be selected by :
|
---|
138 |
|
---|
139 | <xsl:apply-templates select="text"/>
|
---|
140 |
|
---|
141 | the text elem to be processed must be in the form
|
---|
142 | <text name="query/about"/>
|
---|
143 |
|
---|
144 | -->
|
---|
145 |
|
---|
146 | <xsl:template name="text" match="text">
|
---|
147 | <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param>
|
---|
148 | <xsl:variable name="path">ancestor::page/display/<xsl:value-of select='$key'/></xsl:variable>
|
---|
149 | <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path)"/></xsl:variable>
|
---|
150 | <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
|
---|
151 | <xsl:otherwise>
|
---|
152 |
|
---|
153 | <!-- no match found, output the name of the text string -->
|
---|
154 | _<xsl:value-of select="$key"/>_</xsl:otherwise>
|
---|
155 | </xsl:choose>
|
---|
156 | </xsl:template>
|
---|
157 |
|
---|
158 |
|
---|
159 | <!-- may not have to use this anymore-->
|
---|
160 | <xsl:template name="text-old" match="text-old">
|
---|
161 |
|
---|
162 | <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param>
|
---|
163 |
|
---|
164 | <!-- try the current language -->
|
---|
165 |
|
---|
166 | <xsl:variable name="path1">ancestor::page/translate/current/text/<xsl:value-of select="$key"/></xsl:variable>
|
---|
167 | <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path1)"/></xsl:variable>
|
---|
168 | <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
|
---|
169 | <xsl:otherwise>
|
---|
170 |
|
---|
171 | <!-- try the default language -->
|
---|
172 | <xsl:variable name="path2">ancestor::page/translate/default/text/<xsl:value-of select="$key"/></xsl:variable>
|
---|
173 | <xsl:variable name="string2"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path2)"/></xsl:variable>
|
---|
174 | <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when>
|
---|
175 | <xsl:otherwise>
|
---|
176 |
|
---|
177 | <!-- no match found, output the name of the text string -->
|
---|
178 | _<xsl:value-of select="$key"/>_</xsl:otherwise>
|
---|
179 | </xsl:choose>
|
---|
180 | </xsl:otherwise>
|
---|
181 | </xsl:choose>
|
---|
182 | </xsl:template>
|
---|
183 |
|
---|
184 | </xsl:stylesheet>
|
---|