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

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

added a span tag to hightlight the selected section in toc

  • Property svn:keywords set to Author Date Id Revision
File size: 22.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 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="documentinfo">
101 <div id="headingimage">
102 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
103 <xsl:call-template name="coverImage"/>
104 </xsl:if>
105 </div>
106
107 <ul id="docbuttons" >
108 <xsl:call-template name="documentButtons">
109 <xsl:with-param name="collName" select="$collName"/>
110 </xsl:call-template>
111 </ul>
112 </div>
113 <!--<div><xsl:call-template name="enrichServices">
114 <xsl:with-param name="collName" select="$collName"/>
115 </xsl:call-template></div>-->
116 <xsl:if test="string($doTOC) != 'false'">
117 <div id="toc">
118 <xsl:call-template name="TOC">
119 <xsl:with-param name="collName" select="$collName"/>
120 </xsl:call-template>
121 </div>
122 </xsl:if>
123
124 </xsl:template>
125
126 <xsl:template name="coverImage">
127 <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>
128 </xsl:template>
129
130 <xsl:template name="documentButtons">
131 <xsl:param name="collName"/>
132 <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
133 <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
134 <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
135 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
136
137
138 <!-- expand document -->
139 <!-- this doesn't work with MG so comment it out for now -->
140
141 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
142 <li>
143 <xsl:choose><xsl:when test="string($ed)='1'">
144 <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>
145 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
146 </a>
147 </xsl:when>
148 <xsl:otherwise>
149 <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>
150 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
151 </a>
152 </xsl:otherwise>
153 </xsl:choose>
154 </li>
155 </xsl:if>
156
157 <!-- expand contents -->
158 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
159 <li>
160 <xsl:choose><xsl:when test="string($ec)='1'">
161 <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>
162 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/> </a>
163 </xsl:when>
164 <xsl:otherwise>
165 <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>
166 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
167 </a>
168 </xsl:otherwise>
169 </xsl:choose>
170 </li>
171 </xsl:if>
172
173 <!-- detach page -->
174 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
175 <li>
176 <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>
177 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
178 </a></li>
179 </xsl:template>
180
181 <xsl:template name="TOC">
182 <xsl:param name="collName"/>
183 <xsl:choose>
184 <xsl:when test="@docType='hierarchy'">
185 <xsl:call-template name="hierarchicalContents">
186 <xsl:with-param name="collName" select="$collName"/>
187 </xsl:call-template>
188 </xsl:when>
189 <xsl:when test="@docType='paged'">
190 <xsl:call-template name="pagedContents">
191 <xsl:with-param name="collName" select="$collName"/>
192 </xsl:call-template>
193 </xsl:when>
194 </xsl:choose>
195 </xsl:template>
196
197 <xsl:template name="hierarchicalContents">
198 <xsl:param name="collName"/>
199 <xsl:variable name="oc" select="/page/pageRequest/paramList/param[@name='oc']/@value"/>
200 <xsl:variable name="d" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
201 <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
202 <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
203 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
204 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
205 <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
206 <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>
207 <xsl:if test="documentNode[@nodeID]">
208 <ul id="tocnodes">
209 <li>
210 <xsl:choose><xsl:when test="string($oc)='0'">
211 <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>
212 </xsl:when>
213 <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
214 <xsl:if test="string($oc)!='0'">
215 <ul class="tocnode">
216 <xsl:for-each select="documentNode/documentNode[@nodeID]">
217 <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>
218 </xsl:for-each>
219 </ul>
220 </xsl:if>
221 </li>
222 </ul>
223 </xsl:if>
224 </xsl:template>
225
226 <!-- each icon-title pair is a row in a table. children go in a table in another row -->
227 <xsl:template match="documentNode">
228 <xsl:param name="collName"/>
229 <xsl:param name="ec"/>
230 <xsl:param name="p.a"/>
231 <xsl:param name="p.s"/>
232 <xsl:param name="p.sa"/>
233 <xsl:param name="p.c"/>
234 <!-- Display the appropriate image, depending on the node type -->
235 <li>
236 <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>
237 <xsl:apply-templates select="." mode="displayNodeIcon"/>
238 </a>
239
240 <!-- Display associated title, bolded if the node has content -->
241 <xsl:choose>
242 <xsl:when test="nodeContent">
243 <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
244 </xsl:when>
245 <xsl:otherwise>
246 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
247 </xsl:otherwise>
248 </xsl:choose>
249 <!-- Apply recursively to the children of this node -->
250 <xsl:if test="documentNode[@nodeID]">
251 <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
252 <xsl:with-param name="collName" select="$collName"/>
253 <xsl:with-param name="ec" select="$ec"/>
254 <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"/>
255 <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
256 </xsl:apply-templates>
257 </ul>
258 </xsl:if>
259 </li>
260 </xsl:template>
261
262 <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
263 <xsl:template name="documentContent">
264 <div class="documenttext">
265 <xsl:choose>
266 <xsl:when test="@docType='simple'">
267 <xsl:apply-templates select="nodeContent"/>
268 </xsl:when>
269 <xsl:otherwise>
270 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
271 </xsl:otherwise>
272 </xsl:choose>
273 </div>
274 </xsl:template>
275
276 <xsl:template match="documentNode" mode="content">
277 <xsl:if test="nodeContent">
278 <xsl:if test="metadataList/metadata[@name='Title']">
279 <h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
280 </xsl:if>
281 <xsl:apply-templates select="nodeContent"/>
282 </xsl:if>
283 </xsl:template>
284
285 <!-- the actual text/content -->
286 <xsl:template match="nodeContent">
287 <p/>
288 <xsl:for-each select="node()">
289 <xsl:choose>
290 <xsl:when test="not(name())"><xsl:value-of select="." disable-output-escaping="yes"/></xsl:when>
291 <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
292 </xsl:choose>
293 </xsl:for-each>
294 </xsl:template>
295
296 <!-- match any file nodes -->
297 <xsl:template match="file">
298 <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
299 <xsl:choose>
300 <xsl:when test="util:isImage(@mimeType)">
301 <img src="{$httpPath}/{@href}"/>
302 </xsl:when>
303 <xsl:otherwise>
304 <a href="{$httpPath}/{@href}"><xsl:value-of select="@href"/></a>
305 </xsl:otherwise>
306 </xsl:choose>
307 </xsl:template>
308
309 <!-- match any link nodes -->
310 <xsl:template match="link">
311 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
312 <xsl:variable name="actionargs">
313 <xsl:choose>
314 <xsl:when test="@type='document'">a=d</xsl:when>
315 <xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
316 <xsl:otherwise>
317 p
318 </xsl:otherwise>
319 </xsl:choose>
320 </xsl:variable>
321 <xsl:variable name="serviceargs">
322 <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
323 </xsl:variable>
324 <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
325 </xsl:template>
326
327 <!-- match any annotations and make them span elements -->
328 <xsl:template match="annotation">
329 <span class="{@type}"><xsl:value-of disable-output-escaping="yes" select="."/></span>
330 </xsl:template>
331
332 <!-- paged naviagtion : INCOMPLETE!!-->
333 <xsl:template name="pagedContents">
334 <xsl:param name="collName"/>
335 <xsl:variable name="pos" select="nodeStructureInfo/info[@name='siblingPosition']/@value"/>
336 <xsl:variable name="length" select="nodeStructureInfo/info[@name='numSiblings']/@value"/>
337 <xsl:variable name="children" select="nodeStructureInfo/info[@name='numChildren']/@value"/>
338 <table>
339 <xsl:choose>
340 <xsl:when test="$pos=-1"><!-- a doc -->
341 <tr valign="top">
342 <td align="left">
343 </td>
344 <td align="center"><center>
345 <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pages', $children)"/></b>
346 </center></td>
347 <td align="right">
348 <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>
349 </td>
350 </tr>
351 </xsl:when>
352
353 <xsl:otherwise> <!-- an internal node -->
354 <tr valign="top">
355 <td align="left">
356 <xsl:if test=" not ( $pos = 1 )">
357 <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>
358 </xsl:if>
359 </td>
360 <td align="center"><center>
361 <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pageof', concat($pos, ';', $length))"/></b>
362 </center></td>
363 <td align="right">
364 <xsl:if test=" not($pos = $length)">
365 <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>
366 </xsl:if>
367 </td>
368 </tr>
369 </xsl:otherwise>
370 </xsl:choose>
371 <tr valign="middle">
372 <td align='center' valign='top' colspan='3'>
373 <form name="GotoForm" method="get" action="{$library_name}">
374 <input type='hidden' name='a' value='d'/>
375 <input type='hidden' name='c' value='{$collName}'/>
376 <input type='hidden' name='d' value='{@selectedNode}'/>
377 <input type="text" name="gp" size="3" maxlength="4"/>
378 <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.gotopage')"/></xsl:attribute></input>
379 </form>
380 </td>
381 </tr>
382 </table>
383 </xsl:template>
384
385 <xsl:template name="enrichServices">
386 <xsl:param name="collName"/>
387 <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
388 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
389 <xsl:for-each select="../serviceList/service">
390 <table border='1' cellspacing='0'>
391 <tr><td>
392 <p /><xsl:value-of select="displayItem[@name='name']"/><p/>
393 <form name="EnrichForm" method="get" action="{$library_name}">
394 <xsl:apply-templates select="paramList"/>
395 <input type='hidden' name='a' value='d'/>
396 <input type='hidden' name='d' value='{$docID}'/>
397 <input type='hidden' name='c' value='{$collName}'/>
398 <xsl:if test='$request-params/param[@name="sib"]'>
399 <input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
400 <input type='hidden' name='s' value='{@name}'/>
401 <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
402 <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
403 <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
404 <input type='hidden' name='end' value='1'/>
405 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
406 </form>
407 </td></tr>
408 </table>
409 </xsl:for-each>
410 </xsl:template>
411
412 <xsl:template match="paramList" mode="hidden">
413 <xsl:for-each select="param">
414 <input type='hidden' name='{@name}' value='{@value}'/><xsl:text>
415 </xsl:text>
416 </xsl:for-each>
417 </xsl:template>
418
419 <xsl:template name="documentArrows">
420 <xsl:param name="collName"/>
421 <div class="documentarrows">
422 <xsl:call-template name="documentArrow">
423 <xsl:with-param name="collName" select="$collName"/>
424 <xsl:with-param name="direction">back</xsl:with-param>
425 </xsl:call-template>
426 <xsl:call-template name="documentArrow">
427 <xsl:with-param name="collName" select="$collName"/>
428 <xsl:with-param name="direction">forward</xsl:with-param>
429 </xsl:call-template>
430 </div>
431
432 </xsl:template>
433
434 <xsl:template name="documentArrow">
435 <xsl:param name="collName"/>
436 <xsl:param name="direction"/>
437 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
438 <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>
439 </xsl:template>
440</xsl:stylesheet>
441
442
443
444
Note: See TracBrowser for help on using the repository browser.