View | Details | Raw Unified | Return to bug 35305
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthDetails.xsl (+399 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
  <xsl:import href="UNIMARCauthUtils.xsl"/>
4
  <xsl:output omit-xml-declaration="yes" method="html" />
5
  <!-- ****************** Authority display *************** -->
6
  <xsl:template match="marc:record">
7
    <xsl:variable name="authid" select="marc:controlfield[@tag='001']"/>
8
    <xsl:element name="div">
9
      <xsl:attribute name="class">
10
        <xsl:text>authority-summary</xsl:text>
11
      </xsl:attribute>
12
      <!-- *********** Personal Name 200 ********* -->
13
      <xsl:if test="marc:datafield[@tag='200']">
14
        <ul>
15
          <xsl:for-each select="marc:datafield[@tag=200]">
16
            <li class="heading">
17
              <xsl:value-of select="marc:subfield[@code='a']"/>
18
              <xsl:text> </xsl:text>
19
              <xsl:value-of select="marc:subfield[@code='b']"/>
20
              <xsl:if test="marc:subfield[@code='f']"> (<xsl:value-of select="marc:subfield[@code='f']"/>) </xsl:if>
21
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
22
                <xsl:for-each select="marc:subfield[@code='j']">
23
                  <xsl:text> -- </xsl:text>
24
                  <xsl:value-of select="."/>
25
                </xsl:for-each>
26
                <xsl:for-each select="marc:subfield[@code='x']">
27
                  <xsl:text> -- </xsl:text>
28
                  <xsl:value-of select="."/>
29
                </xsl:for-each>
30
                <xsl:for-each select="marc:subfield[@code='y']">
31
                  <xsl:text> -- </xsl:text>
32
                  <xsl:value-of select="."/>
33
                </xsl:for-each>
34
                <xsl:for-each select="marc:subfield[@code='z']">
35
                  <xsl:text> -- </xsl:text>
36
                  <xsl:value-of select="."/>
37
                </xsl:for-each>
38
              </xsl:if>
39
            </li>
40
          </xsl:for-each>
41
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
42
            <xsl:call-template name="tag_3xx"/>
43
          </xsl:if>
44
          <xsl:if test="marc:datafield[@tag=400]">
45
            <xsl:call-template name="tag_4xx">
46
              <xsl:with-param name="tag">400</xsl:with-param>
47
            </xsl:call-template>
48
          </xsl:if>
49
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
50
            <xsl:call-template name="tag_5xx"/>
51
          </xsl:if>
52
        </ul>
53
      </xsl:if>
54
      <!-- *** End Personal Name **-->
55
      <!-- *********** Corporate Name 210 ********* -->
56
      <xsl:if test="marc:datafield[@tag='210']">
57
        <ul>
58
          <xsl:for-each select="marc:datafield[@tag=210]">
59
            <li class="heading">
60
              <xsl:value-of select="marc:subfield[@code='a']"/>
61
              <xsl:text> </xsl:text>
62
              <xsl:value-of select="marc:subfield[@code='b']"/>
63
              <xsl:if test="marc:subfield[@code='f']"> (<xsl:value-of select="marc:subfield[@code='f']"/>) </xsl:if>
64
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
65
                <xsl:for-each select="marc:subfield[@code='j']">
66
                  <xsl:text> -- </xsl:text>
67
                  <xsl:value-of select="."/>
68
                </xsl:for-each>
69
                <xsl:for-each select="marc:subfield[@code='x']">
70
                  <xsl:text> -- </xsl:text>
71
                  <xsl:value-of select="."/>
72
                </xsl:for-each>
73
                <xsl:for-each select="marc:subfield[@code='y']">
74
                  <xsl:text> -- </xsl:text>
75
                  <xsl:value-of select="."/>
76
                </xsl:for-each>
77
                <xsl:for-each select="marc:subfield[@code='z']">
78
                  <xsl:text> -- </xsl:text>
79
                  <xsl:value-of select="."/>
80
                </xsl:for-each>
81
              </xsl:if>
82
            </li>
83
          </xsl:for-each>
84
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
85
            <xsl:call-template name="tag_3xx"/>
86
          </xsl:if>
87
          <xsl:if test="marc:datafield[@tag=410]">
88
            <xsl:call-template name="tag_4xx">
89
              <xsl:with-param name="tag">410</xsl:with-param>
90
            </xsl:call-template>
91
          </xsl:if>
92
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
93
            <xsl:call-template name="tag_5xx"/>
94
          </xsl:if>
95
        </ul>
96
      </xsl:if>
97
      <!-- *** End Corporate Name **-->
98
      <!-- *********** Geographic Name 215 ********* -->
99
      <xsl:if test="marc:datafield[@tag='215']">
100
        <ul>
101
          <xsl:for-each select="marc:datafield[@tag=215]">
102
            <li class="heading">
103
              <xsl:value-of select="marc:subfield[@code='a']"/>
104
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
105
                <xsl:for-each select="marc:subfield[@code='j']">
106
                  <xsl:text> -- </xsl:text>
107
                  <xsl:value-of select="."/>
108
                </xsl:for-each>
109
                <xsl:for-each select="marc:subfield[@code='x']">
110
                  <xsl:text> -- </xsl:text>
111
                  <xsl:value-of select="."/>
112
                </xsl:for-each>
113
                <xsl:for-each select="marc:subfield[@code='y']">
114
                  <xsl:text> -- </xsl:text>
115
                  <xsl:value-of select="."/>
116
                </xsl:for-each>
117
                <xsl:for-each select="marc:subfield[@code='z']">
118
                  <xsl:text> -- </xsl:text>
119
                  <xsl:value-of select="."/>
120
                </xsl:for-each>
121
              </xsl:if>
122
            </li>
123
          </xsl:for-each>
124
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
125
            <xsl:call-template name="tag_3xx"/>
126
          </xsl:if>
127
          <xsl:if test="marc:datafield[@tag=415]">
128
            <xsl:call-template name="tag_4xx">
129
              <xsl:with-param name="tag">415</xsl:with-param>
130
            </xsl:call-template>
131
          </xsl:if>
132
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
133
            <xsl:call-template name="tag_5xx"/>
134
          </xsl:if>
135
        </ul>
136
      </xsl:if>
137
      <!-- *** End Geographic Name **-->
138
      <!-- *********** Trademark 216 ********* -->
139
      <xsl:if test="marc:datafield[@tag='216']">
140
        <ul>
141
          <xsl:for-each select="marc:datafield[@tag=216]">
142
            <li class="heading">
143
              <xsl:value-of select="marc:subfield[@code='a']"/>
144
              <xsl:if test="marc:subfield[@code='f']"> (<xsl:value-of select="marc:subfield[@code='f']"/>) </xsl:if>
145
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
146
                <xsl:for-each select="marc:subfield[@code='j']">
147
                  <xsl:text> -- </xsl:text>
148
                  <xsl:value-of select="."/>
149
                </xsl:for-each>
150
                <xsl:for-each select="marc:subfield[@code='x']">
151
                  <xsl:text> -- </xsl:text>
152
                  <xsl:value-of select="."/>
153
                </xsl:for-each>
154
                <xsl:for-each select="marc:subfield[@code='y']">
155
                  <xsl:text> -- </xsl:text>
156
                  <xsl:value-of select="."/>
157
                </xsl:for-each>
158
                <xsl:for-each select="marc:subfield[@code='z']">
159
                  <xsl:text> -- </xsl:text>
160
                  <xsl:value-of select="."/>
161
                </xsl:for-each>
162
              </xsl:if>
163
            </li>
164
          </xsl:for-each>
165
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
166
            <xsl:call-template name="tag_3xx"/>
167
          </xsl:if>
168
          <xsl:if test="marc:datafield[@tag=416]">
169
            <xsl:call-template name="tag_4xx">
170
              <xsl:with-param name="tag">416</xsl:with-param>
171
            </xsl:call-template>
172
          </xsl:if>
173
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
174
            <xsl:call-template name="tag_5xx"/>
175
          </xsl:if>
176
        </ul>
177
      </xsl:if>
178
      <!-- *** End Trademark **-->
179
      <!-- *********** Family Name 220 ********* -->
180
      <xsl:if test="marc:datafield[@tag='220']">
181
        <ul>
182
          <xsl:for-each select="marc:datafield[@tag=220]">
183
            <li class="heading">
184
              <xsl:value-of select="marc:subfield[@code='a']"/>
185
              <xsl:if test="marc:subfield[@code='f']"> (<xsl:value-of select="marc:subfield[@code='f']"/>) </xsl:if>
186
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
187
                <xsl:for-each select="marc:subfield[@code='j']">
188
                  <xsl:text> -- </xsl:text>
189
                  <xsl:value-of select="."/>
190
                </xsl:for-each>
191
                <xsl:for-each select="marc:subfield[@code='x']">
192
                  <xsl:text> -- </xsl:text>
193
                  <xsl:value-of select="."/>
194
                </xsl:for-each>
195
                <xsl:for-each select="marc:subfield[@code='y']">
196
                  <xsl:text> -- </xsl:text>
197
                  <xsl:value-of select="."/>
198
                </xsl:for-each>
199
                <xsl:for-each select="marc:subfield[@code='z']">
200
                  <xsl:text> -- </xsl:text>
201
                  <xsl:value-of select="."/>
202
                </xsl:for-each>
203
              </xsl:if>
204
            </li>
205
          </xsl:for-each>
206
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
207
            <xsl:call-template name="tag_3xx"/>
208
          </xsl:if>
209
          <xsl:if test="marc:datafield[@tag=420]">
210
            <xsl:call-template name="tag_4xx">
211
              <xsl:with-param name="tag">420</xsl:with-param>
212
            </xsl:call-template>
213
          </xsl:if>
214
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
215
            <xsl:call-template name="tag_5xx"/>
216
          </xsl:if>
217
        </ul>
218
      </xsl:if>
219
      <!-- *** End Family Name **-->
220
      <!-- *********** Uniform Title 230 ********* -->
221
      <xsl:if test="marc:datafield[@tag='230']">
222
        <ul>
223
          <xsl:for-each select="marc:datafield[@tag=230]">
224
            <li class="heading">
225
              <xsl:value-of select="marc:subfield[@code='a']"/>
226
              <xsl:if test="marc:subfield[@code='b']">
227
                <xsl:text> [</xsl:text>
228
                <xsl:value-of select="."/>
229
                <xsl:text>]</xsl:text>
230
              </xsl:if>
231
              <xsl:if test="marc:subfield[@code='h']">
232
                <xsl:text> </xsl:text>
233
                <xsl:value-of select="."/>
234
              </xsl:if>
235
              <xsl:if test="marc:subfield[@code='i']">
236
                <xsl:text> </xsl:text>
237
                <xsl:value-of select="."/>
238
              </xsl:if>
239
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
240
                <xsl:for-each select="marc:subfield[@code='j']">
241
                  <xsl:text> -- </xsl:text>
242
                  <xsl:value-of select="."/>
243
                </xsl:for-each>
244
                <xsl:for-each select="marc:subfield[@code='x']">
245
                  <xsl:text> -- </xsl:text>
246
                  <xsl:value-of select="."/>
247
                </xsl:for-each>
248
                <xsl:for-each select="marc:subfield[@code='y']">
249
                  <xsl:text> -- </xsl:text>
250
                  <xsl:value-of select="."/>
251
                </xsl:for-each>
252
                <xsl:for-each select="marc:subfield[@code='z']">
253
                  <xsl:text> -- </xsl:text>
254
                  <xsl:value-of select="."/>
255
                </xsl:for-each>
256
              </xsl:if>
257
            </li>
258
          </xsl:for-each>
259
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
260
            <xsl:call-template name="tag_3xx"/>
261
          </xsl:if>
262
          <xsl:if test="marc:datafield[@tag=430]">
263
            <xsl:call-template name="tag_4xx">
264
              <xsl:with-param name="tag">430</xsl:with-param>
265
            </xsl:call-template>
266
          </xsl:if>
267
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
268
            <xsl:call-template name="tag_5xx"/>
269
          </xsl:if>
270
        </ul>
271
      </xsl:if>
272
      <!-- *** End Uniform Title **-->
273
      <!-- *********** Author Title 240 ********* -->
274
      <xsl:if test="marc:datafield[@tag='240']">
275
        <ul>
276
          <xsl:for-each select="marc:datafield[@tag=240]">
277
            <li class="heading">
278
              <xsl:value-of select="marc:subfield[@code='a']"/>
279
              <xsl:text> </xsl:text>
280
              <xsl:value-of select="marc:subfield[@code='t']"/>
281
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
282
                <xsl:for-each select="marc:subfield[@code='j']">
283
                  <xsl:text> -- </xsl:text>
284
                  <xsl:value-of select="."/>
285
                </xsl:for-each>
286
                <xsl:for-each select="marc:subfield[@code='x']">
287
                  <xsl:text> -- </xsl:text>
288
                  <xsl:value-of select="."/>
289
                </xsl:for-each>
290
                <xsl:for-each select="marc:subfield[@code='y']">
291
                  <xsl:text> -- </xsl:text>
292
                  <xsl:value-of select="."/>
293
                </xsl:for-each>
294
                <xsl:for-each select="marc:subfield[@code='z']">
295
                  <xsl:text> -- </xsl:text>
296
                  <xsl:value-of select="."/>
297
                </xsl:for-each>
298
              </xsl:if>
299
            </li>
300
          </xsl:for-each>
301
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
302
            <xsl:call-template name="tag_3xx"/>
303
          </xsl:if>
304
          <xsl:if test="marc:datafield[@tag=440]">
305
            <xsl:call-template name="tag_4xx">
306
              <xsl:with-param name="tag">440</xsl:with-param>
307
            </xsl:call-template>
308
          </xsl:if>
309
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
310
            <xsl:call-template name="tag_5xx"/>
311
          </xsl:if>
312
        </ul>
313
      </xsl:if>
314
      <!-- *** End Author Title **-->
315
      <!-- *********** Subject 250 ********* -->
316
      <xsl:if test="marc:datafield[@tag='250']">
317
        <ul>
318
          <xsl:for-each select="marc:datafield[@tag=250]">
319
            <li class="heading">
320
              <xsl:value-of select="marc:subfield[@code='a']"/>
321
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
322
                <xsl:for-each select="marc:subfield[@code='j']">
323
                  <xsl:text> -- </xsl:text>
324
                  <xsl:value-of select="."/>
325
                </xsl:for-each>
326
                <xsl:for-each select="marc:subfield[@code='x']">
327
                  <xsl:text> -- </xsl:text>
328
                  <xsl:value-of select="."/>
329
                </xsl:for-each>
330
                <xsl:for-each select="marc:subfield[@code='y']">
331
                  <xsl:text> -- </xsl:text>
332
                  <xsl:value-of select="."/>
333
                </xsl:for-each>
334
                <xsl:for-each select="marc:subfield[@code='z']">
335
                  <xsl:text> -- </xsl:text>
336
                  <xsl:value-of select="."/>
337
                </xsl:for-each>
338
              </xsl:if>
339
            </li>
340
          </xsl:for-each>
341
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
342
            <xsl:call-template name="tag_3xx"/>
343
          </xsl:if>
344
          <xsl:if test="marc:datafield[@tag=450]">
345
            <xsl:call-template name="tag_4xx">
346
              <xsl:with-param name="tag">450</xsl:with-param>
347
            </xsl:call-template>
348
          </xsl:if>
349
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
350
            <xsl:call-template name="tag_5xx"/>
351
          </xsl:if>
352
        </ul>
353
      </xsl:if>
354
      <!-- *** End Subject **-->
355
      <!-- *********** Genre/Form 280 ********* -->
356
      <xsl:if test="marc:datafield[@tag='280']">
357
        <ul>
358
          <xsl:for-each select="marc:datafield[@tag=280]">
359
            <li class="heading">
360
              <xsl:value-of select="marc:subfield[@code='a']"/>
361
              <xsl:if test="marc:subfield[@code='j'] or marc:subfield[@code='x'] or marc:subfield[@code='y'] or marc:subfield[@code='z']">
362
                <xsl:for-each select="marc:subfield[@code='j']">
363
                  <xsl:text> -- </xsl:text>
364
                  <xsl:value-of select="."/>
365
                </xsl:for-each>
366
                <xsl:for-each select="marc:subfield[@code='x']">
367
                  <xsl:text> -- </xsl:text>
368
                  <xsl:value-of select="."/>
369
                </xsl:for-each>
370
                <xsl:for-each select="marc:subfield[@code='y']">
371
                  <xsl:text> -- </xsl:text>
372
                  <xsl:value-of select="."/>
373
                </xsl:for-each>
374
                <xsl:for-each select="marc:subfield[@code='z']">
375
                  <xsl:text> -- </xsl:text>
376
                  <xsl:value-of select="."/>
377
                </xsl:for-each>
378
              </xsl:if>
379
            </li>
380
          </xsl:for-each>
381
          <xsl:if test="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
382
            <xsl:call-template name="tag_3xx"/>
383
          </xsl:if>
384
          <xsl:if test="marc:datafield[@tag=480]">
385
            <xsl:call-template name="tag_4xx">
386
              <xsl:with-param name="tag">480</xsl:with-param>
387
            </xsl:call-template>
388
          </xsl:if>
389
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
390
            <xsl:call-template name="tag_5xx"/>
391
          </xsl:if>
392
        </ul>
393
      </xsl:if>
394
      <!-- *** End Genre/Form **-->
395
      <!-- end div class authority-summary-->
396
    </xsl:element>
397
    <!-- end template -->
398
  </xsl:template>
399
</xsl:stylesheet>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthResults.xsl (-139 / +30 lines)
Lines 1-68 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2
<xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
  <xsl:output omit-xml-declaration="yes"/>
3
  <xsl:import href="UNIMARCauthUtils.xsl"/>
4
  <!-- ***************** Templates *************-->
4
  <xsl:output omit-xml-declaration="yes" method="html" />
5
  <xsl:template name="tag_152">
6
    <li class="authtype">
7
      <xsl:value-of select="marc:datafield[@tag='152']/marc:subfield[@code='b']"/>
8
    </li>
9
  </xsl:template>
10
  <xsl:template name="tag_3xx">
11
    <li class="note">
12
      <xsl:for-each select="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
13
        <xsl:value-of select="marc:subfield[@code='a']"/>
14
        <xsl:text>. </xsl:text>
15
      </xsl:for-each>
16
    </li>
17
  </xsl:template>
18
  <xsl:template name="tag_5xx">
19
    <li class="related">
20
      <xsl:for-each select="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
21
        <xsl:choose>
22
          <xsl:when test="marc:subfield[@code='5']='g'">
23
            <span class="leg">GT : </span>
24
          </xsl:when>
25
          <xsl:when test="marc:subfield[@code='5']='h'">
26
            <span class="leg">ST : </span>
27
          </xsl:when>
28
          <xsl:otherwise>
29
            <span class="leg">RT : </span>
30
          </xsl:otherwise>
31
        </xsl:choose>
32
        <xsl:choose>
33
          <xsl:when test="marc:subfield[@code='9']">
34
            <a>
35
              <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="marc:subfield[@code='9']"/></xsl:attribute>
36
              <xsl:value-of select="marc:subfield[@code='a']"/>
37
              <xsl:if test="marc:subfield[@code='b']">
38
                <xsl:text> </xsl:text>
39
                <xsl:value-of select="."/>
40
              </xsl:if>
41
            </a>
42
          </xsl:when>
43
          <xsl:when test="marc:subfield[@code='3']">
44
            <a>
45
              <xsl:attribute name="href">/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&amp;type=intranet&amp;value=identifier-standard%3A<xsl:value-of select="marc:subfield[@code='3']"/></xsl:attribute>
46
              <xsl:value-of select="marc:subfield[@code='a']"/>
47
              <xsl:if test="marc:subfield[@code='b']">
48
                <xsl:text> </xsl:text>
49
                <xsl:value-of select="."/>
50
              </xsl:if>
51
            </a>
52
          </xsl:when>
53
          <xsl:otherwise>
54
            <xsl:value-of select="marc:subfield[@code='a']"/>
55
            <xsl:if test="marc:subfield[@code='b']">
56
              <xsl:text> </xsl:text>
57
              <xsl:value-of select="."/>
58
            </xsl:if>
59
          </xsl:otherwise>
60
        </xsl:choose>
61
        <xsl:text> ; </xsl:text>
62
      </xsl:for-each>
63
    </li>
64
  </xsl:template>
65
  <!--*** End Templates **-->
66
  <!-- ****************** Authority display *************** -->
5
  <!-- ****************** Authority display *************** -->
67
  <xsl:template match="marc:record">
6
  <xsl:template match="marc:record">
68
    <xsl:variable name="authid" select="marc:controlfield[@tag='001']"/>
7
    <xsl:variable name="authid" select="marc:controlfield[@tag='001']"/>
Lines 104-118 Link Here
104
            <xsl:call-template name="tag_3xx"/>
43
            <xsl:call-template name="tag_3xx"/>
105
          </xsl:if>
44
          </xsl:if>
106
          <xsl:if test="marc:datafield[@tag=400]">
45
          <xsl:if test="marc:datafield[@tag=400]">
107
            <li class="usefor">
46
            <xsl:call-template name="tag_4xx">
108
              <span class="leg">UF : </span>
47
              <xsl:with-param name="tag">400</xsl:with-param>
109
              <xsl:for-each select="marc:datafield[@tag=400]">
48
            </xsl:call-template>
110
                <xsl:value-of select="marc:subfield[@code='a']"/>
111
                <xsl:text> </xsl:text>
112
                <xsl:value-of select="marc:subfield[@code='b']"/>
113
                <xsl:text> ; </xsl:text>
114
              </xsl:for-each>
115
            </li>
116
          </xsl:if>
49
          </xsl:if>
117
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
50
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
118
            <xsl:call-template name="tag_5xx"/>
51
            <xsl:call-template name="tag_5xx"/>
Lines 157-171 Link Here
157
            <xsl:call-template name="tag_3xx"/>
90
            <xsl:call-template name="tag_3xx"/>
158
          </xsl:if>
91
          </xsl:if>
159
          <xsl:if test="marc:datafield[@tag=410]">
92
          <xsl:if test="marc:datafield[@tag=410]">
160
            <li class="usefor">
93
            <xsl:call-template name="tag_4xx">
161
              <span class="leg">UF : </span>
94
              <xsl:with-param name="tag">410</xsl:with-param>
162
              <xsl:for-each select="marc:datafield[@tag=410]">
95
            </xsl:call-template>
163
                <xsl:value-of select="marc:subfield[@code='a']"/>
164
                <xsl:text> </xsl:text>
165
                <xsl:value-of select="marc:subfield[@code='b']"/>
166
                <xsl:text> ; </xsl:text>
167
              </xsl:for-each>
168
            </li>
169
          </xsl:if>
96
          </xsl:if>
170
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
97
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
171
            <xsl:call-template name="tag_5xx"/>
98
            <xsl:call-template name="tag_5xx"/>
Lines 207-219 Link Here
207
            <xsl:call-template name="tag_3xx"/>
134
            <xsl:call-template name="tag_3xx"/>
208
          </xsl:if>
135
          </xsl:if>
209
          <xsl:if test="marc:datafield[@tag=415]">
136
          <xsl:if test="marc:datafield[@tag=415]">
210
            <li class="usefor">
137
            <xsl:call-template name="tag_4xx">
211
              <span class="leg">UF : </span>
138
              <xsl:with-param name="tag">415</xsl:with-param>
212
              <xsl:for-each select="marc:datafield[@tag=415]">
139
            </xsl:call-template>
213
                <xsl:value-of select="marc:subfield[@code='a']"/>
214
                <xsl:text> ; </xsl:text>
215
              </xsl:for-each>
216
            </li>
217
          </xsl:if>
140
          </xsl:if>
218
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
141
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
219
            <xsl:call-template name="tag_5xx"/>
142
            <xsl:call-template name="tag_5xx"/>
Lines 256-270 Link Here
256
            <xsl:call-template name="tag_3xx"/>
179
            <xsl:call-template name="tag_3xx"/>
257
          </xsl:if>
180
          </xsl:if>
258
          <xsl:if test="marc:datafield[@tag=416]">
181
          <xsl:if test="marc:datafield[@tag=416]">
259
            <li class="usefor">
182
            <xsl:call-template name="tag_4xx">
260
              <span class="leg">UF : </span>
183
              <xsl:with-param name="tag">416</xsl:with-param>
261
              <xsl:for-each select="marc:datafield[@tag=416]">
184
            </xsl:call-template>
262
                <xsl:value-of select="marc:subfield[@code='a']"/>
263
                <xsl:text> </xsl:text>
264
                <xsl:value-of select="marc:subfield[@code='b']"/>
265
                <xsl:text> ; </xsl:text>
266
              </xsl:for-each>
267
            </li>
268
          </xsl:if>
185
          </xsl:if>
269
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
186
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
270
            <xsl:call-template name="tag_5xx"/>
187
            <xsl:call-template name="tag_5xx"/>
Lines 307-321 Link Here
307
            <xsl:call-template name="tag_3xx"/>
224
            <xsl:call-template name="tag_3xx"/>
308
          </xsl:if>
225
          </xsl:if>
309
          <xsl:if test="marc:datafield[@tag=420]">
226
          <xsl:if test="marc:datafield[@tag=420]">
310
            <li class="usefor">
227
            <xsl:call-template name="tag_4xx">
311
              <span class="leg">UF : </span>
228
              <xsl:with-param name="tag">420</xsl:with-param>
312
              <xsl:for-each select="marc:datafield[@tag=420]">
229
            </xsl:call-template>
313
                <xsl:value-of select="marc:subfield[@code='a']"/>
314
                <xsl:text> </xsl:text>
315
                <xsl:value-of select="marc:subfield[@code='b']"/>
316
                <xsl:text> ; </xsl:text>
317
              </xsl:for-each>
318
            </li>
319
          </xsl:if>
230
          </xsl:if>
320
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
231
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
321
            <xsl:call-template name="tag_5xx"/>
232
            <xsl:call-template name="tag_5xx"/>
Lines 370-384 Link Here
370
            <xsl:call-template name="tag_3xx"/>
281
            <xsl:call-template name="tag_3xx"/>
371
          </xsl:if>
282
          </xsl:if>
372
          <xsl:if test="marc:datafield[@tag=430]">
283
          <xsl:if test="marc:datafield[@tag=430]">
373
            <li class="usefor">
284
            <xsl:call-template name="tag_4xx">
374
              <span class="leg">UF : </span>
285
              <xsl:with-param name="tag">430</xsl:with-param>
375
              <xsl:for-each select="marc:datafield[@tag=430]">
286
            </xsl:call-template>
376
                <xsl:value-of select="marc:subfield[@code='a']"/>
377
                <xsl:text> </xsl:text>
378
                <xsl:value-of select="marc:subfield[@code='b']"/>
379
                <xsl:text> ; </xsl:text>
380
              </xsl:for-each>
381
            </li>
382
          </xsl:if>
287
          </xsl:if>
383
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
288
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
384
            <xsl:call-template name="tag_5xx"/>
289
            <xsl:call-template name="tag_5xx"/>
Lines 422-436 Link Here
422
            <xsl:call-template name="tag_3xx"/>
327
            <xsl:call-template name="tag_3xx"/>
423
          </xsl:if>
328
          </xsl:if>
424
          <xsl:if test="marc:datafield[@tag=440]">
329
          <xsl:if test="marc:datafield[@tag=440]">
425
            <li class="usefor">
330
            <xsl:call-template name="tag_4xx">
426
              <span class="leg">UF : </span>
331
              <xsl:with-param name="tag">440</xsl:with-param>
427
              <xsl:for-each select="marc:datafield[@tag=440]">
332
            </xsl:call-template>
428
                <xsl:value-of select="marc:subfield[@code='a']"/>
429
                <xsl:text> </xsl:text>
430
                <xsl:value-of select="marc:subfield[@code='b']"/>
431
                <xsl:text> ; </xsl:text>
432
              </xsl:for-each>
433
            </li>
434
          </xsl:if>
333
          </xsl:if>
435
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
334
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
436
            <xsl:call-template name="tag_5xx"/>
335
            <xsl:call-template name="tag_5xx"/>
Lines 472-484 Link Here
472
            <xsl:call-template name="tag_3xx"/>
371
            <xsl:call-template name="tag_3xx"/>
473
          </xsl:if>
372
          </xsl:if>
474
          <xsl:if test="marc:datafield[@tag=450]">
373
          <xsl:if test="marc:datafield[@tag=450]">
475
            <li class="usefor">
374
            <xsl:call-template name="tag_4xx">
476
              <span class="leg">UF : </span>
375
              <xsl:with-param name="tag">450</xsl:with-param>
477
              <xsl:for-each select="marc:datafield[@tag=450]">
376
            </xsl:call-template>
478
                <xsl:value-of select="marc:subfield[@code='a']"/>
479
                <xsl:text> ; </xsl:text>
480
              </xsl:for-each>
481
            </li>
482
          </xsl:if>
377
          </xsl:if>
483
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
378
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
484
            <xsl:call-template name="tag_5xx"/>
379
            <xsl:call-template name="tag_5xx"/>
Lines 520-539 Link Here
520
            <xsl:call-template name="tag_3xx"/>
415
            <xsl:call-template name="tag_3xx"/>
521
          </xsl:if>
416
          </xsl:if>
522
          <xsl:if test="marc:datafield[@tag=480]">
417
          <xsl:if test="marc:datafield[@tag=480]">
523
            <li class="usefor">
418
            <xsl:call-template name="tag_4xx">
524
              <span class="leg">UF : </span>
419
              <xsl:with-param name="tag">480</xsl:with-param>
525
              <xsl:for-each select="marc:datafield[@tag=450]">
420
            </xsl:call-template>
526
                <xsl:value-of select="marc:subfield[@code='a']"/>
527
                <xsl:text> ; </xsl:text>
528
              </xsl:for-each>
529
            </li>
530
          </xsl:if>
421
          </xsl:if>
531
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
422
          <xsl:if test="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
532
            <xsl:call-template name="tag_5xx"/>
423
            <xsl:call-template name="tag_5xx"/>
533
          </xsl:if>
424
          </xsl:if>
534
        </ul>
425
        </ul>
535
      </xsl:if>
426
      </xsl:if>
536
      <!-- *** End Subject **-->
427
      <!-- *** End Genre/Form **-->
537
    </div> <!-- /div.authority-summary -->
428
    </div> <!-- /div.authority-summary -->
538
    <!-- end template -->
429
    <!-- end template -->
539
  </xsl:template>
430
  </xsl:template>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthUtils.xsl (-1 / +79 lines)
Line 0 Link Here
0
- 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
  <!-- ***************** Templates *************-->
4
  <xsl:template name="tag_152">
5
    <li class="authtype">
6
      <xsl:value-of select="marc:datafield[@tag='152']/marc:subfield[@code='b']"/>
7
    </li>
8
  </xsl:template>
9
  <xsl:template name="tag_3xx">
10
    <li class="note">
11
      <xsl:for-each select="marc:datafield[@tag &gt;= 300 and @tag &lt; 400]">
12
        <xsl:value-of select="marc:subfield[@code='a']"/>
13
        <xsl:text>. </xsl:text>
14
      </xsl:for-each>
15
    </li>
16
  </xsl:template>
17
  <xsl:template name="tag_4xx">
18
    <xsl:param name="tag" />
19
      <li class="usefor">
20
        <span class="leg">UF : </span>
21
        <xsl:for-each select="marc:datafield[@tag=$tag]">
22
          <xsl:value-of select="marc:subfield[@code='a']"/>
23
          <xsl:if test="marc:subfield[@code='b']">
24
            <xsl:text> </xsl:text>
25
            <xsl:value-of select="marc:subfield[@code='b']"/>
26
          </xsl:if>
27
          <xsl:text> ; </xsl:text>
28
        </xsl:for-each>
29
      </li>
30
  </xsl:template>
31
  <xsl:template name="tag_5xx">
32
    <li class="related">
33
      <xsl:for-each select="marc:datafield[@tag &gt;= 500 and @tag &lt; 600]">
34
        <xsl:choose>
35
          <xsl:when test="marc:subfield[@code='5']='g'">
36
            <span class="leg">GT : </span>
37
          </xsl:when>
38
          <xsl:when test="marc:subfield[@code='5']='h'">
39
            <span class="leg">ST : </span>
40
          </xsl:when>
41
          <xsl:otherwise>
42
            <span class="leg">RT : </span>
43
          </xsl:otherwise>
44
        </xsl:choose>
45
        <xsl:choose>
46
          <xsl:when test="marc:subfield[@code='9']">
47
            <a>
48
              <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="marc:subfield[@code='9']"/></xsl:attribute>
49
              <xsl:value-of select="marc:subfield[@code='a']"/>
50
              <xsl:if test="marc:subfield[@code='b']">
51
                <xsl:text> </xsl:text>
52
                <xsl:value-of select="."/>
53
              </xsl:if>
54
            </a>
55
          </xsl:when>
56
          <xsl:when test="marc:subfield[@code='3']">
57
            <a>
58
              <xsl:attribute name="href">/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&amp;type=intranet&amp;value=identifier-standard%3A<xsl:value-of select="marc:subfield[@code='3']"/></xsl:attribute>
59
              <xsl:value-of select="marc:subfield[@code='a']"/>
60
              <xsl:if test="marc:subfield[@code='b']">
61
                <xsl:text> </xsl:text>
62
                <xsl:value-of select="."/>
63
              </xsl:if>
64
            </a>
65
          </xsl:when>
66
          <xsl:otherwise>
67
            <xsl:value-of select="marc:subfield[@code='a']"/>
68
            <xsl:if test="marc:subfield[@code='b']">
69
              <xsl:text> </xsl:text>
70
              <xsl:value-of select="."/>
71
            </xsl:if>
72
          </xsl:otherwise>
73
        </xsl:choose>
74
        <xsl:text> ; </xsl:text>
75
      </xsl:for-each>
76
    </li>
77
  </xsl:template>
78
  <!--*** End Templates **-->
79
</xsl:stylesheet>

Return to bug 35305