Merge remote-tracking branch 'origin/new/bug_5327'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / xslt / MARC21slim2intranetDetail.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
4
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <xsl:stylesheet version="1.0"
7   xmlns:marc="http://www.loc.gov/MARC21/slim"
8   xmlns:items="http://www.koha-community.org/items"
9   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10   exclude-result-prefixes="marc items">
11     <xsl:import href="MARC21slimUtils.xsl"/>
12     <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
13     <xsl:template match="/">
14             <xsl:apply-templates/>
15     </xsl:template>
16
17     <xsl:template match="marc:record">
18
19         <!-- Option: Display Alternate Graphic Representation (MARC 880)  -->
20         <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
21         <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
22         <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
23         <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
24         <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
25         <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
26         <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
27
28         <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29         <xsl:variable name="leader" select="marc:leader"/>
30         <xsl:variable name="leader6" select="substring($leader,7,1)"/>
31         <xsl:variable name="leader7" select="substring($leader,8,1)"/>
32         <xsl:variable name="leader19" select="substring($leader,20,1)"/>
33         <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
34         <xsl:variable name="materialTypeCode">
35             <xsl:choose>
36                 <xsl:when test="$leader19='a'">ST</xsl:when>
37                 <xsl:when test="$leader6='a'">
38                     <xsl:choose>
39                         <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
40                         <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
41                         <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
42                     </xsl:choose>
43                 </xsl:when>
44                 <xsl:when test="$leader6='t'">BK</xsl:when>
45                 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
46                 <xsl:when test="$leader6='m'">CF</xsl:when>
47                 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
48                 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
49                 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
50                 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
51             </xsl:choose>
52         </xsl:variable>
53         <xsl:variable name="materialTypeLabel">
54             <xsl:choose>
55                 <xsl:when test="$leader19='a'">Set</xsl:when>
56                 <xsl:when test="$leader6='a'">
57                     <xsl:choose>
58                         <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
59                         <xsl:when test="$leader7='i' or $leader7='s'">
60                             <xsl:choose>
61                                 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
62                                 <xsl:otherwise>Series</xsl:otherwise>
63                             </xsl:choose>
64                         </xsl:when>
65                         <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
66                     </xsl:choose>
67                 </xsl:when>
68                 <xsl:when test="$leader6='t'">Book</xsl:when>
69                 <xsl:when test="$leader6='o'">Kit</xsl:when>                            
70                 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
71                 <xsl:when test="$leader6='m'">Computer File</xsl:when>
72                 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
73                 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
74                 <xsl:when test="$leader6='j'">Music</xsl:when>
75                 <xsl:when test="$leader6='i'">Sound</xsl:when>
76                 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
77             </xsl:choose>
78         </xsl:variable>
79
80         <!-- Title Statement -->
81         <!-- Alternate Graphic Representation (MARC 880) -->
82         <xsl:if test="$display880">
83             <h1 class="title">
84                 <xsl:call-template name="m880Select">
85                     <xsl:with-param name="basetags">245</xsl:with-param>
86                     <xsl:with-param name="codes">abhfgknps</xsl:with-param>
87                 </xsl:call-template>
88             </h1>
89         </xsl:if>
90
91         <xsl:if test="marc:datafield[@tag=245]">
92         <h1>
93             <xsl:for-each select="marc:datafield[@tag=245]">
94                     <xsl:call-template name="subfieldSelect">
95                         <xsl:with-param name="codes">a</xsl:with-param>
96                     </xsl:call-template>
97                     <xsl:if test="marc:subfield[@code='h']">
98                         <xsl:text> </xsl:text>
99                         <xsl:call-template name="subfieldSelect">
100                             <xsl:with-param name="codes">h</xsl:with-param>
101                         </xsl:call-template>
102                     </xsl:if>
103                     <xsl:if test="marc:subfield[@code='b']">
104                         <xsl:text> </xsl:text>
105                         <xsl:call-template name="subfieldSelect">
106                             <xsl:with-param name="codes">b</xsl:with-param>
107                         </xsl:call-template>
108                     </xsl:if>
109                     <xsl:text> </xsl:text>
110                     <xsl:call-template name="subfieldSelect">
111                         <xsl:with-param name="codes">fgknps</xsl:with-param>
112                     </xsl:call-template>
113             </xsl:for-each>
114         </h1>
115         </xsl:if>
116
117         <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
118         <xsl:if test="$display880">
119             <h5 class="author">
120                 <xsl:call-template name="m880Select">
121                     <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
122                     <xsl:with-param name="codes">abc</xsl:with-param>
123                     <xsl:with-param name="index">au</xsl:with-param>
124                     <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
125                     <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
126                 </xsl:call-template>
127             </h5>
128         </xsl:if>
129
130         <!-- Author Statement -->
131         <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
132         <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
133
134    <xsl:if test="$materialTypeCode!=''">
135         <span class="results_summary type"><span class="label">Type: </span>
136         <xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
137         <xsl:text> </xsl:text>
138         <xsl:value-of select="$materialTypeLabel"/>
139         </span>
140    </xsl:if>
141
142         <!--Series: Alternate Graphic Representation (MARC 880) -->
143         <xsl:if test="$display880">
144             <xsl:call-template name="m880Select">
145                 <xsl:with-param name="basetags">440,490</xsl:with-param>
146                 <xsl:with-param name="codes">av</xsl:with-param>
147                 <xsl:with-param name="class">results_summary series</xsl:with-param>
148                 <xsl:with-param name="label">Series: </xsl:with-param>
149                 <xsl:with-param name="index">se</xsl:with-param>
150             </xsl:call-template>
151         </xsl:if>
152         
153         <!-- Series -->
154         <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
155         <span class="results_summary series"><span class="label">Series: </span>
156         <!-- 440 -->
157         <xsl:for-each select="marc:datafield[@tag=440]">
158             <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
159             <xsl:call-template name="chopPunctuation">
160                             <xsl:with-param name="chopString">
161                                 <xsl:call-template name="subfieldSelect">
162                                     <xsl:with-param name="codes">av</xsl:with-param>
163                                 </xsl:call-template>
164                             </xsl:with-param>
165                         </xsl:call-template>
166                         </a>
167                     <xsl:text> </xsl:text><xsl:call-template name="part"/>
168             <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
169         </xsl:for-each>
170
171         <!-- 490 Series not traced, Ind1 = 0 -->
172         <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
173             <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
174                         <xsl:call-template name="chopPunctuation">
175                             <xsl:with-param name="chopString">
176                                 <xsl:call-template name="subfieldSelect">
177                                     <xsl:with-param name="codes">av</xsl:with-param>
178                                 </xsl:call-template>
179                             </xsl:with-param>
180                         </xsl:call-template>
181             </a>
182                     <xsl:call-template name="part"/>
183         <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
184         </xsl:for-each>
185         <!-- 490 Series traced, Ind1 = 1 -->
186         <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
187             <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
188                 <xsl:choose>
189                     <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
190                         <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
191                             <xsl:call-template name="chopPunctuation">
192                                 <xsl:with-param name="chopString">
193                                     <xsl:call-template name="subfieldSelect">
194                                         <xsl:with-param name="codes">a_t</xsl:with-param>
195                                     </xsl:call-template>
196                                 </xsl:with-param>
197                             </xsl:call-template>
198                         </a>
199                     </xsl:when>
200                     <xsl:otherwise>
201                         <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
202                             <xsl:call-template name="chopPunctuation">
203                                 <xsl:with-param name="chopString">
204                                     <xsl:call-template name="subfieldSelect">
205                                         <xsl:with-param name="codes">a_t</xsl:with-param>
206                                     </xsl:call-template>
207                                 </xsl:with-param>
208                             </xsl:call-template>
209                         </a>
210                         <xsl:call-template name="part"/>
211                     </xsl:otherwise>
212                 </xsl:choose>
213                 <xsl:text>: </xsl:text>
214                 <xsl:value-of  select="marc:subfield[@code='v']" />
215             <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
216             </xsl:for-each>
217         </xsl:if>
218
219         </span>
220         </xsl:if>
221
222         <!-- Analytics -->
223         <xsl:if test="$leader7='s'">
224         <span class="results_summary analytics"><span class="label">Analytics: </span>
225             <a>
226             <xsl:choose>
227             <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
228                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
229             </xsl:when>
230             <xsl:otherwise>
231                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
232             </xsl:otherwise>
233             </xsl:choose>
234             <xsl:text>Show analytics</xsl:text>
235             </a>
236         </span>
237         </xsl:if>
238
239         <!-- Volumes of sets and traced series -->
240         <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
241         <span class="results_summary volumes"><span class="label">Volumes: </span>
242             <a>
243             <xsl:choose>
244             <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
245                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
246             </xsl:when>
247             <xsl:otherwise>
248                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
249             </xsl:otherwise>
250             </xsl:choose>
251             <xsl:text>Show volumes</xsl:text>
252             </a>
253         </span>
254         </xsl:if>
255
256         <!-- Set -->
257         <xsl:if test="$leader19='c'">
258         <span class="results_summary set"><span class="label">Set: </span>
259         <xsl:for-each select="marc:datafield[@tag=773]">
260             <a>
261             <xsl:choose>
262             <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
263                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
264             </xsl:when>
265             <xsl:otherwise>
266                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
267             </xsl:otherwise>
268             </xsl:choose>
269             <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
270             </a>
271             <xsl:choose>
272                 <xsl:when test="position()=last()"></xsl:when>
273                 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
274             </xsl:choose>
275         </xsl:for-each>
276         </span>
277         </xsl:if>
278
279         <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
280         <xsl:if test="$display880">
281             <xsl:call-template name="m880Select">
282                 <xsl:with-param name="basetags">260</xsl:with-param>
283                 <xsl:with-param name="codes">abcg</xsl:with-param>
284                 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
285                 <xsl:with-param name="label">Publisher: </xsl:with-param>
286             </xsl:call-template>
287         </xsl:if>
288         
289         <xsl:if test="marc:datafield[@tag=260]">
290         <span class="results_summary publisher"><span class="label">Publisher: </span>
291             <xsl:for-each select="marc:datafield[@tag=260]">
292                 <xsl:if test="marc:subfield[@code='b']">
293                 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
294                     <xsl:call-template name="subfieldSelect">
295                         <xsl:with-param name="codes">b</xsl:with-param>
296                     </xsl:call-template>
297                </a>
298                </xsl:if>
299                <xsl:text> </xsl:text>
300                 <xsl:call-template name="chopPunctuation">
301                   <xsl:with-param name="chopString">
302                     <xsl:call-template name="subfieldSelect">
303                         <xsl:with-param name="codes">acg</xsl:with-param>
304                     </xsl:call-template>
305                    </xsl:with-param>
306                </xsl:call-template>
307                     <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
308             </xsl:for-each>
309         </span>
310         </xsl:if>
311
312         <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
313         <xsl:if test="$display880">
314             <xsl:call-template name="m880Select">
315                 <xsl:with-param name="basetags">250</xsl:with-param>
316                 <xsl:with-param name="codes">ab</xsl:with-param>
317                 <xsl:with-param name="class">results_summary edition</xsl:with-param>
318                 <xsl:with-param name="label">Edition: </xsl:with-param>
319             </xsl:call-template>
320         </xsl:if>
321         
322         <xsl:if test="marc:datafield[@tag=250]">
323         <span class="results_summary edition"><span class="label">Edition: </span>
324             <xsl:for-each select="marc:datafield[@tag=250]">
325                 <xsl:call-template name="chopPunctuation">
326                   <xsl:with-param name="chopString">
327                     <xsl:call-template name="subfieldSelect">
328                         <xsl:with-param name="codes">ab</xsl:with-param>
329                     </xsl:call-template>
330                    </xsl:with-param>
331                </xsl:call-template>
332                     <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
333             </xsl:for-each>
334         </span>
335         </xsl:if>
336
337         <!-- Description: Alternate Graphic Representation (MARC 880) -->
338         <xsl:if test="$display880">
339             <xsl:call-template name="m880Select">
340                 <xsl:with-param name="basetags">300</xsl:with-param>
341                 <xsl:with-param name="codes">abceg</xsl:with-param>
342                 <xsl:with-param name="class">results_summary description</xsl:with-param>
343                 <xsl:with-param name="label">Description: </xsl:with-param>
344             </xsl:call-template>
345         </xsl:if>
346         
347         <xsl:if test="marc:datafield[@tag=300]">
348         <span class="results_summary description"><span class="label">Description: </span>
349             <xsl:for-each select="marc:datafield[@tag=300]">
350                 <xsl:call-template name="chopPunctuation">
351                   <xsl:with-param name="chopString">
352                     <xsl:call-template name="subfieldSelect">
353                         <xsl:with-param name="codes">abceg</xsl:with-param>
354                     </xsl:call-template>
355                    </xsl:with-param>
356                </xsl:call-template>
357                     <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
358             </xsl:for-each>
359         </span>
360        </xsl:if>
361
362        <xsl:if test="marc:datafield[@tag=020]">
363         <span class="results_summary isbn"><span class="label">ISBN: </span>
364         <xsl:for-each select="marc:datafield[@tag=020]">
365         <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
366                 <xsl:value-of select="marc:subfield[@code='a']"/>
367                 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
368         </xsl:for-each>
369         </span>
370         </xsl:if>
371
372         <xsl:if test="marc:datafield[@tag=022]">
373         <span class="results_summary issn"><span class="label">ISSN: </span>
374         <xsl:for-each select="marc:datafield[@tag=022]">
375                 <xsl:value-of select="marc:subfield[@code='a']"/>
376                 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
377         </xsl:for-each>
378         </span>
379         </xsl:if>
380
381         <!-- Other Title  Statement: Alternate Graphic Representation (MARC 880) -->
382         <xsl:if test="$display880">
383             <xsl:call-template name="m880Select">
384                 <xsl:with-param name="basetags">246</xsl:with-param>
385                 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
386                 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
387                 <xsl:with-param name="label">Other Title: </xsl:with-param>
388             </xsl:call-template>
389         </xsl:if>
390
391         <xsl:if test="marc:datafield[@tag=246]">
392         <span class="results_summary other_title"><span class="label">Other Title: </span>
393             <xsl:for-each select="marc:datafield[@tag=246]">
394                 <xsl:call-template name="chopPunctuation">
395                   <xsl:with-param name="chopString">
396                     <xsl:call-template name="subfieldSelect">
397                         <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
398                     </xsl:call-template>
399                    </xsl:with-param>
400                </xsl:call-template>
401                     <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
402             </xsl:for-each>
403         </span>
404        </xsl:if>
405
406         <xsl:if test="marc:datafield[@tag=242]">
407         <span class="results_summary translated_title"><span class="label">Title translated: </span>
408             <xsl:for-each select="marc:datafield[@tag=242]">
409                 <xsl:call-template name="chopPunctuation">
410                   <xsl:with-param name="chopString">
411                     <xsl:call-template name="subfieldSelect">
412                         <xsl:with-param name="codes">abchnp</xsl:with-param>
413                     </xsl:call-template>
414                    </xsl:with-param>
415                </xsl:call-template>
416                     <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
417             </xsl:for-each>
418         </span>
419        </xsl:if>
420
421         <!-- Uniform Title  Statement: Alternate Graphic Representation (MARC 880) -->
422         <xsl:if test="$display880">
423             <xsl:call-template name="m880Select">
424                 <xsl:with-param name="basetags">130,240</xsl:with-param>
425                 <xsl:with-param name="codes">adfklmor</xsl:with-param>
426                 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
427                 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
428             </xsl:call-template>
429         </xsl:if>
430
431         <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
432         <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
433         <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
434             <xsl:variable name="str">
435                 <xsl:for-each select="marc:subfield">
436                     <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
437                         <xsl:value-of select="text()"/>
438                         <xsl:text> </xsl:text>
439                      </xsl:if>
440                 </xsl:for-each>
441             </xsl:variable>
442             <xsl:call-template name="chopPunctuation">
443                 <xsl:with-param name="chopString">
444                     <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
445                         
446                 </xsl:with-param>
447             </xsl:call-template>
448             <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
449         </xsl:for-each>
450         </span>
451         </xsl:if>
452
453         <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
454             <span class="results_summary subjects"><span class="label">Subject(s): </span>
455             <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
456             <a>
457             <xsl:choose>
458             <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
459                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
460             </xsl:when>
461             <xsl:when test="$TraceSubjectSubdivisions='1'">
462                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
463                         <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
464                         <xsl:with-param name="delimeter"> and </xsl:with-param>
465                         <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
466                         <xsl:with-param name="suffix">})</xsl:with-param>
467                     </xsl:call-template>
468                 </xsl:attribute>
469             </xsl:when>
470             <xsl:otherwise>
471                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:{<xsl:value-of select="marc:subfield[@code='a']"/>}</xsl:attribute>
472             </xsl:otherwise>
473             </xsl:choose>
474             <xsl:call-template name="chopPunctuation">
475                 <xsl:with-param name="chopString">
476                     <xsl:call-template name="subfieldSelect">
477                         <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
478                         <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
479                         <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
480                     </xsl:call-template>
481                 </xsl:with-param>
482             </xsl:call-template>
483             </a>
484             <xsl:choose>
485             <xsl:when test="position()=last()"></xsl:when>
486             <xsl:otherwise> | </xsl:otherwise>
487             </xsl:choose>
488
489             </xsl:for-each>
490             </span>
491         </xsl:if>
492
493         <xsl:if test="marc:datafield[@tag=856]">
494         <span class="results_summary online_resources"><span class="label">Online Resources: </span>
495         <xsl:for-each select="marc:datafield[@tag=856]">
496                                    <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
497                                    <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
498                                     <xsl:choose>
499                                     <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
500                                         <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
501                                     </xsl:when>
502                                     <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
503                                         <xsl:call-template name="subfieldSelect">
504                                         <xsl:with-param name="codes">y3z</xsl:with-param>
505                                         </xsl:call-template>
506                                     </xsl:when>
507                                     <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
508                                         <xsl:choose>
509                                         <xsl:when test="$URLLinkText!=''">
510                                                 <xsl:value-of select="$URLLinkText"/>
511                                         </xsl:when>
512                                         <xsl:otherwise>
513                                                 <xsl:text>Click here to access online</xsl:text>
514                                         </xsl:otherwise>
515                                         </xsl:choose>
516                                     </xsl:when>
517                                     </xsl:choose>
518                                     </a>
519                                     <xsl:choose>
520                                     <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
521                                     <xsl:otherwise> | </xsl:otherwise>
522                                     </xsl:choose>
523
524         </xsl:for-each>
525         </span>
526         </xsl:if>
527         <xsl:if test="marc:datafield[@tag=505]">
528         <xsl:for-each select="marc:datafield[@tag=505]">
529         <span class="results_summary contents">
530         <xsl:choose>
531         <xsl:when test="@ind1=0">
532             <span class="label">Contents:</span>
533         </xsl:when>
534         <xsl:when test="@ind1=1">
535             <span class="label">Incomplete contents:</span>
536         </xsl:when>
537         <xsl:when test="@ind1=1">
538             <span class="label">Partial contents:</span>
539         </xsl:when>
540         </xsl:choose>  
541         <xsl:choose>
542         <xsl:when test="@ind2=0">
543             <xsl:call-template name="subfieldSelect">
544                 <xsl:with-param name="codes">tru</xsl:with-param>
545             </xsl:call-template>
546         </xsl:when>
547         <xsl:otherwise>
548             <xsl:call-template name="subfieldSelect">
549                 <xsl:with-param name="codes">au</xsl:with-param>
550             </xsl:call-template>
551         </xsl:otherwise>
552         </xsl:choose>
553         </span>
554         </xsl:for-each>
555         </xsl:if>
556
557         <!-- 773 -->
558         <xsl:if test="marc:datafield[@tag=773]">
559         <xsl:for-each select="marc:datafield[@tag=773]">
560         <xsl:if test="@ind1=0">
561         <span class="results_summary in"><span class="label">
562         <xsl:choose>
563         <xsl:when test="@ind2=' '">
564             In:
565         </xsl:when>
566         <xsl:when test="@ind2=8">
567             <xsl:if test="marc:subfield[@code='i']">
568                 <xsl:value-of select="marc:subfield[@code='i']"/>
569             </xsl:if>
570         </xsl:when>
571         </xsl:choose>
572         </span>
573                 <xsl:variable name="f773">
574                     <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
575                         <xsl:with-param name="codes">at</xsl:with-param>
576                     </xsl:call-template></xsl:with-param></xsl:call-template>
577                 </xsl:variable>
578             <xsl:choose>
579                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
580                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
581                         <xsl:value-of select="translate($f773, '()', '')"/>
582                     </a>
583                     <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
584                 </xsl:when>
585                 <xsl:when test="marc:subfield[@code='0']">
586                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
587                         <xsl:value-of select="$f773"/>
588                     </a>
589                 </xsl:when>
590                 <xsl:otherwise>
591                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
592                         <xsl:value-of select="$f773"/>
593                     </a>
594                     <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
595                 </xsl:otherwise>
596             </xsl:choose>
597         </span>
598
599         <xsl:if test="marc:subfield[@code='n']">
600             <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
601         </xsl:if>
602
603         </xsl:if>
604         </xsl:for-each>
605         </xsl:if>
606
607         <!-- 866 textual holdings -->
608         <xsl:if test="marc:datafield[@tag=866]">
609             <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
610                 <xsl:for-each select="marc:datafield[@tag=866]">
611                     <xsl:call-template name="subfieldSelect">
612                         <xsl:with-param name="codes">axz</xsl:with-param>
613                     </xsl:call-template>
614                     <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
615                 </xsl:for-each>
616             </span>
617         </xsl:if>
618
619         <!--  775 Other Edition  -->
620         <xsl:if test="marc:datafield[@tag=775]">
621         <span class="results_summary other_editions"><span class="label">Other Editions: </span>
622         <xsl:for-each select="marc:datafield[@tag=775]">
623             <xsl:if test="marc:subfield[@code='i']">
624                 <xsl:call-template name="subfieldSelect">
625                     <xsl:with-param name="codes">i</xsl:with-param>
626                 </xsl:call-template>
627                 <xsl:text>: </xsl:text>
628             </xsl:if>
629             <a>
630             <xsl:choose>
631             <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
632                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
633             </xsl:when>
634             <xsl:otherwise>
635                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
636             </xsl:otherwise>
637             </xsl:choose>
638             <xsl:call-template name="subfieldSelect">
639                 <xsl:with-param name="codes">t</xsl:with-param>
640             </xsl:call-template>
641             </a>
642             <xsl:choose>
643                 <xsl:when test="position()=last()"></xsl:when>
644                 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
645             </xsl:choose>
646         </xsl:for-each>
647         </span>
648         </xsl:if>
649
650         <!-- 780 -->
651         <xsl:if test="marc:datafield[@tag=780]">
652         <xsl:for-each select="marc:datafield[@tag=780]">
653         <xsl:if test="@ind1=0">
654         <span class="results_summary preceeding_entry">
655         <xsl:choose>
656         <xsl:when test="@ind2=0">
657             <span class="label">Continues:</span>
658         </xsl:when>
659         <xsl:when test="@ind2=1">
660             <span class="label">Continues in part:</span>
661         </xsl:when>
662         <xsl:when test="@ind2=2">
663             <span class="label">Supersedes:</span>
664         </xsl:when>
665         <xsl:when test="@ind2=3">
666             <span class="label">Supersedes in part:</span>
667         </xsl:when>
668         <xsl:when test="@ind2=4">
669             <span class="label">Formed by the union: ... and: ...</span>
670         </xsl:when>
671         <xsl:when test="@ind2=5">
672             <span class="label">Absorbed:</span>
673         </xsl:when>
674         <xsl:when test="@ind2=6">
675             <span class="label">Absorbed in part:</span>
676         </xsl:when>
677         <xsl:when test="@ind2=7">
678             <span class="label">Separated from:</span>
679         </xsl:when>
680         </xsl:choose>
681                 <xsl:variable name="f780">
682                     <xsl:call-template name="subfieldSelect">
683                         <xsl:with-param name="codes">at</xsl:with-param>
684                     </xsl:call-template>
685                 </xsl:variable>
686             <xsl:choose>
687                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
688                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
689                         <xsl:value-of select="translate($f780, '()', '')"/>
690                     </a>
691                 </xsl:when>
692                 <xsl:otherwise>
693                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
694                         <xsl:value-of select="translate($f780, '()', '')"/>
695                     </a>
696                 </xsl:otherwise>
697             </xsl:choose>
698         </span>
699  
700         <xsl:if test="marc:subfield[@code='n']">
701             <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
702         </xsl:if>
703
704         </xsl:if>
705         </xsl:for-each>
706         </xsl:if>
707
708         <!-- 785 -->
709         <xsl:if test="marc:datafield[@tag=785]">
710         <xsl:for-each select="marc:datafield[@tag=785]">
711         <span class="results_summary succeeding_entry">
712         <xsl:choose>
713         <xsl:when test="@ind2=0">
714             <span class="label">Continued by:</span>
715         </xsl:when>
716         <xsl:when test="@ind2=1">
717             <span class="label">Continued in part by:</span>
718         </xsl:when>
719         <xsl:when test="@ind2=2">
720             <span class="label">Superseded by:</span>
721         </xsl:when>
722         <xsl:when test="@ind2=3">
723             <span class="label">Superseded in part by:</span>
724         </xsl:when>
725         <xsl:when test="@ind2=4">
726             <span class="label">Absorbed by:</span>
727         </xsl:when>
728         <xsl:when test="@ind2=5">
729             <span class="label">Absorbed in part by:</span>
730         </xsl:when>
731         <xsl:when test="@ind2=6">
732             <span class="label">Split into .. and ...:</span>
733         </xsl:when>
734         <xsl:when test="@ind2=7">
735             <span class="label">Merged with ... to form ...</span>
736         </xsl:when>
737         <xsl:when test="@ind2=8">
738             <span class="label">Changed back to:</span>
739         </xsl:when>
740
741         </xsl:choose>
742                    <xsl:variable name="f785">
743                     <xsl:call-template name="subfieldSelect">
744                         <xsl:with-param name="codes">at</xsl:with-param>
745                     </xsl:call-template>
746                 </xsl:variable>
747
748             <xsl:choose>
749                 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
750                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
751                         <xsl:value-of select="translate($f785, '()', '')"/>
752                     </a>
753                 </xsl:when>
754                 <xsl:otherwise>
755                     <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
756                         <xsl:value-of select="translate($f785, '()', '')"/>
757                     </a>
758                 </xsl:otherwise>
759             </xsl:choose>
760
761         </span>
762         </xsl:for-each>
763         </xsl:if>
764
765         <xsl:if test="$OPACBaseURL!=''">
766         <span class="results_summary"><span class="label">OPAC view: </span>
767             <a><xsl:attribute name="href">http://<xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
768         </span>
769         </xsl:if>
770
771     </xsl:template>
772
773     <xsl:template name="nameABCDQ">
774             <xsl:call-template name="chopPunctuation">
775                 <xsl:with-param name="chopString">
776                     <xsl:call-template name="subfieldSelect">
777                         <xsl:with-param name="codes">aq</xsl:with-param>
778                     </xsl:call-template>
779                 </xsl:with-param>
780                 <xsl:with-param name="punctuation">
781                     <xsl:text>:,;/ </xsl:text>
782                 </xsl:with-param>
783             </xsl:call-template>
784         <xsl:call-template name="termsOfAddress"/>
785     </xsl:template>
786
787     <xsl:template name="nameABCDN">
788         <xsl:for-each select="marc:subfield[@code='a']">
789                 <xsl:call-template name="chopPunctuation">
790                     <xsl:with-param name="chopString" select="."/>
791                 </xsl:call-template>
792         </xsl:for-each>
793         <xsl:for-each select="marc:subfield[@code='b']">
794                 <xsl:value-of select="."/>
795         </xsl:for-each>
796         <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
797                 <xsl:call-template name="subfieldSelect">
798                     <xsl:with-param name="codes">cdn</xsl:with-param>
799                 </xsl:call-template>
800         </xsl:if>
801     </xsl:template>
802
803     <xsl:template name="nameACDEQ">
804             <xsl:call-template name="subfieldSelect">
805                 <xsl:with-param name="codes">acdeq</xsl:with-param>
806             </xsl:call-template>
807     </xsl:template>
808     <xsl:template name="termsOfAddress">
809         <xsl:if test="marc:subfield[@code='b' or @code='c']">
810             <xsl:call-template name="chopPunctuation">
811                 <xsl:with-param name="chopString">
812                     <xsl:call-template name="subfieldSelect">
813                         <xsl:with-param name="codes">bc</xsl:with-param>
814                     </xsl:call-template>
815                 </xsl:with-param>
816             </xsl:call-template>
817         </xsl:if>
818     </xsl:template>
819
820     <xsl:template name="part">
821         <xsl:variable name="partNumber">
822             <xsl:call-template name="specialSubfieldSelect">
823                 <xsl:with-param name="axis">n</xsl:with-param>
824                 <xsl:with-param name="anyCodes">n</xsl:with-param>
825                 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
826             </xsl:call-template>
827         </xsl:variable>
828         <xsl:variable name="partName">
829             <xsl:call-template name="specialSubfieldSelect">
830                 <xsl:with-param name="axis">p</xsl:with-param>
831                 <xsl:with-param name="anyCodes">p</xsl:with-param>
832                 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
833             </xsl:call-template>
834         </xsl:variable>
835         <xsl:if test="string-length(normalize-space($partNumber))">
836                 <xsl:call-template name="chopPunctuation">
837                     <xsl:with-param name="chopString" select="$partNumber"/>
838                 </xsl:call-template>
839         </xsl:if>
840         <xsl:if test="string-length(normalize-space($partName))">
841                 <xsl:call-template name="chopPunctuation">
842                     <xsl:with-param name="chopString" select="$partName"/>
843                 </xsl:call-template>
844         </xsl:if>
845     </xsl:template>
846
847     <xsl:template name="specialSubfieldSelect">
848         <xsl:param name="anyCodes"/>
849         <xsl:param name="axis"/>
850         <xsl:param name="beforeCodes"/>
851         <xsl:param name="afterCodes"/>
852         <xsl:variable name="str">
853             <xsl:for-each select="marc:subfield">
854                 <xsl:if test="contains($anyCodes, @code)      or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis])      or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
855                     <xsl:value-of select="text()"/>
856                     <xsl:text> </xsl:text>
857                 </xsl:if>
858             </xsl:for-each>
859         </xsl:variable>
860         <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
861     </xsl:template>
862
863     <xsl:template name="showAuthor">
864         <xsl:param name="authorfield"/>
865     <xsl:param name="UseAuthoritiesForTracings"/>
866         <xsl:if test="count($authorfield)&gt;0">
867         <h5 class="author">
868         <xsl:for-each select="$authorfield">
869         <xsl:choose>
870           <xsl:when test="position()&gt;1"/>
871           <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
872           <xsl:otherwise>Additional author(s): </xsl:otherwise>
873         </xsl:choose>
874         <a>
875         <xsl:choose>
876             <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
877                 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
878             </xsl:when>
879             <xsl:otherwise>
880             <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
881             </xsl:otherwise>
882         </xsl:choose>
883         <xsl:choose>
884           <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
885           <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
886           <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
887         </xsl:choose>
888         <!-- add relator code too between brackets-->
889         <xsl:if test="marc:subfield[@code='4' or @code='e']">
890           <xsl:text>[</xsl:text>
891           <xsl:choose>
892             <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
893             <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
894           </xsl:choose>
895           <xsl:text>]</xsl:text>
896         </xsl:if>
897         </a>
898         <xsl:choose>
899           <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
900         </xsl:choose>
901         </xsl:for-each>
902         </h5>
903         </xsl:if>
904     </xsl:template>
905
906 </xsl:stylesheet>