source: greenstone3/trunk/web/interfaces/classic/transform/document.xsl@ 14391

Last change on this file since 14391 was 14391, checked in by anna, 17 years ago

Added next and previous page arrows on document page.

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