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

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

Added the right-to-left direction display for Arabic etc. language.

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