source: trunk/gsdl3/web/interfaces/default/transform/document.xsl@ 13831

Last change on this file since 13831 was 13831, checked in by shaoqun, 15 years ago

made it display properly when there is no heading image or toc

  • Property svn:keywords set to Author Date Id Revision
File size: 22.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 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
7 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util gsf">
9
10 <xsl:include href="style.xsl"/>
11 <xsl:include href="service-params.xsl"/>
12 <xsl:include href="berrytools.xsl"/>
13
14 <xsl:output method="html"/>
15 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
16
17 <xsl:template name="pageTitle">
18 <xsl:variable name="docID" select="/page/pageResponse/document/@selectedNode"/>
19 <xsl:for-each select='/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode'><xsl:if test='position()!=1'>::</xsl:if><xsl:value-of select="metadataList/metadata[@name='Title']"/></xsl:for-each>
20 </xsl:template>
21
22 <!-- this is hard coded for GATE, should somehow do it dynamically-->
23 <xsl:template name="pageStyle">
24 <style type="text/css">
25 <xsl:text disable-output-escaping="yes">
26 span.Location { display:inline; color : red }
27 span.Person { display:inline; color : green }
28 span.Organization { display:inline; color : yellow }
29 span.Date { display:inline; color : blue }
30 span.query_term {display: inline; background-color : yellow }
31 </xsl:text>
32 </style>
33 <!--TODO: add berry basket switch-->
34 <!--<xsl:if test="$berryBaskets = 'true'">-->
35 <xsl:if test="$berrybasketswitch = 'on'">
36 <xsl:call-template name="berryStyleSheet"/>
37 <xsl:call-template name="js-library"/>
38 </xsl:if>
39 </xsl:template>
40
41 <xsl:template match="pageResponse">
42 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
43 <xsl:call-template name="standardPageBanner">
44 <xsl:with-param name="collName" select="$collName"/>
45 </xsl:call-template>
46 <xsl:call-template name="navigationBar">
47 <xsl:with-param name="collName" select="$collName"/>
48 </xsl:call-template>
49
50 <!--<xsl:if test="$berryBaskets = 'true'">-->
51 <xsl:if test="$berrybasketswitch = 'on'">
52 <xsl:call-template name="documentBerryBasket">
53 <xsl:with-param name="collName" select="$collName"/>
54 <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
55 <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
56 <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
57 </xsl:call-template>
58 </xsl:if>
59
60 <!-- display the document -->
61 <div id="content">
62 <xsl:apply-templates select="document">
63 <xsl:with-param name="collName" select="$collName"/>
64 </xsl:apply-templates>
65 </div>
66 </xsl:template>
67
68 <xsl:template match="document">
69 <xsl:param name="collName"/>
70
71 <xsl:call-template name="documentHeading">
72 <xsl:with-param name="collName" select="$collName"/>
73 </xsl:call-template>
74
75 <xsl:call-template name="documentArrows">
76 <xsl:with-param name="collName" select="$collName"/>
77 </xsl:call-template>
78 <xsl:call-template name="documentContent">
79 <xsl:with-param name="collName" select="$collName"/>
80 </xsl:call-template>
81 <xsl:call-template name="documentArrows">
82 <xsl:with-param name="collName" select="$collName"/>
83 </xsl:call-template>
84 </xsl:template>
85
86 <xsl:template name="documentHeading">
87 <xsl:param name="collName"/>
88 <xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
89 <xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
90 <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
91 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
92 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
93 <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
94 <div id="documentheading">
95 <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title">Close this book and return to search/browse</xsl:with-param>
96 </xsl:call-template></a>
97 <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
98 </div>
99
100 <div id="docheadwrapper">
101 <div id="documentinfo">
102 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
103 <div id="headingimage">
104 <xsl:call-template name="coverImage"/>
105 </div>
106 </xsl:if>
107
108 <ul id="docbuttons" >
109 <xsl:call-template name="documentButtons">
110 <xsl:with-param name="collName" select="$collName"/>
111 </xsl:call-template>
112 </ul>
113 </div>
114 <!--<div><xsl:call-template name="enrichServices">
115 <xsl:with-param name="collName" select="$collName"/>
116 </xsl:call-template></div>-->
117 <xsl:if test="string($doTOC) != 'false'">
118 <div id="toc">
119 <xsl:call-template name="TOC">
120 <xsl:with-param name="collName" select="$collName"/>
121 </xsl:call-template>
122 </div>
123 </xsl:if>
124
125 </div>
126 </xsl:template>
127
128 <xsl:template name="coverImage">
129 <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
130 </xsl:template>
131
132 <xsl:template name="documentButtons">
133 <xsl:param name="collName"/>
134 <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
135 <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
136 <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
137 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
138
139
140 <!-- expand document -->
141 <!-- this doesn't work with MG so comment it out for now -->
142
143 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
144 <li>
145 <xsl:choose><xsl:when test="string($ed)='1'">
146 <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
147 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
148 </a>
149 </xsl:when>
150 <xsl:otherwise>
151 <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
152 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
153 </a>
154 </xsl:otherwise>
155 </xsl:choose>
156 </li>
157 </xsl:if>
158
159 <!-- expand contents -->
160 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
161 <li>
162 <xsl:choose><xsl:when test="string($ec)='1'">
163 <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
164 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
165 </xsl:when>
166 <xsl:otherwise>
167 <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
168 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
169 </a>
170 </xsl:otherwise>
171 </xsl:choose>
172 </li>
173 </xsl:if>
174
175 <!-- detach page -->
176 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
177 <li>
178 <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
179 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
180 </a></li>
181 </xsl:template>
182
183 <xsl:template name="TOC">
184 <xsl:param name="collName"/>
185 <xsl:choose>
186 <xsl:when test="@docType='hierarchy'">
187 <xsl:call-template name="hierarchicalContents">
188 <xsl:with-param name="collName" select="$collName"/>
189 </xsl:call-template>
190 </xsl:when>
191 <xsl:when test="@docType='paged'">
192 <xsl:call-template name="pagedContents">
193 <xsl:with-param name="collName" select="$collName"/>
194 </xsl:call-template>
195 </xsl:when>
196 </xsl:choose>
197 </xsl:template>
198
199 <xsl:template name="hierarchicalContents">
200 <xsl:param name="collName"/>
201 <xsl:variable name="oc" select="/page/pageRequest/paramList/param[@name='oc']/@value"/>
202 <xsl:variable name="d" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
203 <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
204 <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
205 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
206 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
207 <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
208 <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
209 <xsl:if test="documentNode[@nodeID]">
210 <ul id="tocnodes">
211 <li>
212 <xsl:choose><xsl:when test="string($oc)='0'">
213 <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title">open the table of contents</xsl:with-param></xsl:call-template></a>
214 </xsl:when>
215 <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0"><xsl:call-template name="openfolderimg"><xsl:with-param name="title">close the table of contents</xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose>Table of Contents
216 <xsl:if test="string($oc)!='0'">
217 <ul class="tocnode">
218 <xsl:for-each select="documentNode/documentNode[@nodeID]">
219 <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates>
220 </xsl:for-each>
221 </ul>
222 </xsl:if>
223 </li>
224 </ul>
225 </xsl:if>
226 </xsl:template>
227
228 <!-- each icon-title pair is a row in a table. children go in a table in another row -->
229 <xsl:template match="documentNode">
230 <xsl:param name="collName"/>
231 <xsl:param name="ec"/>
232 <xsl:param name="p.a"/>
233 <xsl:param name="p.s"/>
234 <xsl:param name="p.sa"/>
235 <xsl:param name="p.c"/>
236 <!-- Display the appropriate image, depending on the node type -->
237 <li>
238 <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
239 <xsl:apply-templates select="." mode="displayNodeIcon"/>
240 </a>
241
242 <!-- Display associated title, bolded if the node has content -->
243 <xsl:choose>
244 <xsl:when test="nodeContent">
245 <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
246 </xsl:when>
247 <xsl:otherwise>
248 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
249 </xsl:otherwise>
250 </xsl:choose>
251 <!-- Apply recursively to the children of this node -->
252 <xsl:if test="documentNode[@nodeID]">
253 <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
254 <xsl:with-param name="collName" select="$collName"/>
255 <xsl:with-param name="ec" select="$ec"/>
256 <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
257 <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
258 </xsl:apply-templates>
259 </ul>
260 </xsl:if>
261 </li>
262 </xsl:template>
263
264 <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
265 <xsl:template name="documentContent">
266 <div class="documenttext">
267 <xsl:choose>
268 <xsl:when test="@docType='simple'">
269 <xsl:apply-templates select="nodeContent"/>
270 </xsl:when>
271 <xsl:otherwise>
272 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
273 </xsl:otherwise>
274 </xsl:choose>
275 </div>
276 </xsl:template>
277
278 <xsl:template match="documentNode" mode="content">
279 <xsl:if test="nodeContent">
280 <xsl:if test="metadataList/metadata[@name='Title']">
281 <h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
282 </xsl:if>
283 <xsl:apply-templates select="nodeContent"/>
284 </xsl:if>
285 </xsl:template>
286
287 <!-- the actual text/content -->
288 <xsl:template match="nodeContent">
289 <p/>
290 <xsl:for-each select="node()">
291 <xsl:choose>
292 <xsl:when test="not(name())"><xsl:value-of select="." disable-output-escaping="yes"/></xsl:when>
293 <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
294 </xsl:choose>
295 </xsl:for-each>
296 </xsl:template>
297
298 <!-- match any file nodes -->
299 <xsl:template match="file">
300 <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
301 <xsl:choose>
302 <xsl:when test="util:isImage(@mimeType)">
303 <img src="{$httpPath}/{@href}"/>
304 </xsl:when>
305 <xsl:otherwise>
306 <a href="{$httpPath}/{@href}"><xsl:value-of select="@href"/></a>
307 </xsl:otherwise>
308 </xsl:choose>
309 </xsl:template>
310
311 <!-- match any link nodes -->
312 <xsl:template match="link">
313 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
314 <xsl:variable name="actionargs">
315 <xsl:choose>
316 <xsl:when test="@type='document'">a=d</xsl:when>
317 <xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
318 <xsl:otherwise>
319 p
320 </xsl:otherwise>
321 </xsl:choose>
322 </xsl:variable>
323 <xsl:variable name="serviceargs">
324 <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
325 </xsl:variable>
326 <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
327 </xsl:template>
328
329 <!-- match any annotations and make them span elements -->
330 <xsl:template match="annotation">
331 <span class="{@type}"><xsl:value-of disable-output-escaping="yes" select="."/></span>
332 </xsl:template>
333
334 <!-- paged naviagtion : INCOMPLETE!!-->
335 <xsl:template name="pagedContents">
336 <xsl:param name="collName"/>
337 <xsl:variable name="pos" select="nodeStructureInfo/info[@name='siblingPosition']/@value"/>
338 <xsl:variable name="length" select="nodeStructureInfo/info[@name='numSiblings']/@value"/>
339 <xsl:variable name="children" select="nodeStructureInfo/info[@name='numChildren']/@value"/>
340 <table>
341 <xsl:choose>
342 <xsl:when test="$pos=-1"><!-- a doc -->
343 <tr valign="top">
344 <td align="left">
345 </td>
346 <td align="center"><center>
347 <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pages', $children)"/></b>
348 </center></td>
349 <td align="right">
350 <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
351 </td>
352 </tr>
353 </xsl:when>
354
355 <xsl:otherwise> <!-- an internal node -->
356 <tr valign="top">
357 <td align="left">
358 <xsl:if test=" not ( $pos = 1 )">
359 <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
360 </xsl:if>
361 </td>
362 <td align="center"><center>
363 <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pageof', concat($pos, ';', $length))"/></b>
364 </center></td>
365 <td align="right">
366 <xsl:if test=" not($pos = $length)">
367 <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
368 </xsl:if>
369 </td>
370 </tr>
371 </xsl:otherwise>
372 </xsl:choose>
373 <tr valign="middle">
374 <td align='center' valign='top' colspan='3'>
375 <form name="GotoForm" method="get" action="{$library_name}">
376 <input type='hidden' name='a' value='d'/>
377 <input type='hidden' name='c' value='{$collName}'/>
378 <input type='hidden' name='d' value='{@selectedNode}'/>
379 <input type="text" name="gp" size="3" maxlength="4"/>
380 <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.gotopage')"/></xsl:attribute></input>
381 </form>
382 </td>
383 </tr>
384 </table>
385 </xsl:template>
386
387 <xsl:template name="enrichServices">
388 <xsl:param name="collName"/>
389 <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
390 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
391 <xsl:for-each select="../serviceList/service">
392 <table border='1' cellspacing='0'>
393 <tr><td>
394 <p /><xsl:value-of select="displayItem[@name='name']"/><p/>
395 <form name="EnrichForm" method="get" action="{$library_name}">
396 <xsl:apply-templates select="paramList"/>
397 <input type='hidden' name='a' value='d'/>
398 <input type='hidden' name='d' value='{$docID}'/>
399 <input type='hidden' name='c' value='{$collName}'/>
400 <xsl:if test='$request-params/param[@name="sib"]'>
401 <input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
402 <input type='hidden' name='s' value='{@name}'/>
403 <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
404 <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
405 <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
406 <input type='hidden' name='end' value='1'/>
407 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
408 </form>
409 </td></tr>
410 </table>
411 </xsl:for-each>
412 </xsl:template>
413
414 <xsl:template match="paramList" mode="hidden">
415 <xsl:for-each select="param">
416 <input type='hidden' name='{@name}' value='{@value}'/><xsl:text>
417 </xsl:text>
418 </xsl:for-each>
419 </xsl:template>
420
421 <xsl:template name="documentArrows">
422 <xsl:param name="collName"/>
423 <div class="documentarrows">
424 <xsl:call-template name="documentArrow">
425 <xsl:with-param name="collName" select="$collName"/>
426 <xsl:with-param name="direction">back</xsl:with-param>
427 </xsl:call-template>
428 <xsl:call-template name="documentArrow">
429 <xsl:with-param name="collName" select="$collName"/>
430 <xsl:with-param name="direction">forward</xsl:with-param>
431 </xsl:call-template>
432 </div>
433
434 </xsl:template>
435
436 <xsl:template name="documentArrow">
437 <xsl:param name="collName"/>
438 <xsl:param name="direction"/>
439 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
440 <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>
441 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif" /></xsl:otherwise></xsl:choose></a>
442 </xsl:if>
443 </xsl:template>
444</xsl:stylesheet>
445
446
447
448
Note: See TracBrowser for help on using the repository browser.