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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-50 / +170 lines)
Lines 1193-1251 Link Here
1193
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1193
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1194
            </xsl:otherwise>
1194
            </xsl:otherwise>
1195
        </xsl:choose>
1195
        </xsl:choose>
1196
	<xsl:choose>
1196
        <xsl:choose>
1197
	    <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1197
            <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1198
	        <!-- #13383 -->
1198
                <!-- #13383 -->
1199
	        <xsl:call-template name="chopPunctuation">
1199
                <xsl:call-template name="chopPunctuation">
1200
	            <xsl:with-param name="chopString">
1200
                    <xsl:with-param name="chopString">
1201
	                <xsl:call-template name="subfieldSelect">
1201
                        <xsl:call-template name="subfieldSelect">
1202
	                    <xsl:with-param name="codes">
1202
                            <xsl:with-param name="codes">
1203
	                        <xsl:choose>
1203
                                <xsl:choose>
1204
	                            <!-- #13383 include subfield e for field 111  -->
1204
                                    <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1205
	                            <xsl:when test="@tag=111">abceqt</xsl:when>
1205
                                    <xsl:when test="@tag=111">aeq</xsl:when>
1206
	                            <xsl:otherwise>abcjqt</xsl:otherwise>
1206
                                    <xsl:when test="@tag=110">ab</xsl:when>
1207
	                        </xsl:choose>
1207
                                    <xsl:otherwise>abcjq</xsl:otherwise>
1208
	                    </xsl:with-param>
1208
                                </xsl:choose>
1209
	                </xsl:call-template>
1209
                            </xsl:with-param>
1210
	            </xsl:with-param>
1210
                        </xsl:call-template>
1211
	            <xsl:with-param name="punctuation">
1211
                    </xsl:with-param>
1212
	                <xsl:text>:,;/ </xsl:text>
1212
                    <xsl:with-param name="punctuation">
1213
	            </xsl:with-param>
1213
                        <xsl:text>:,;/ </xsl:text>
1214
	        </xsl:call-template>
1214
                    </xsl:with-param>
1215
	    </xsl:when>
1215
                </xsl:call-template>
1216
	    <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1216
                    <!-- Display only name and title portion in 110 field -->
1217
	    <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1217
                    <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1218
	    <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1218
                    <span class="titleportion">
1219
	        <xsl:variable name="str">
1219
                    <xsl:choose>
1220
	            <xsl:call-template name="subfieldSelect">
1220
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1221
	                <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
1221
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1222
	            </xsl:call-template>
1222
                    </xsl:choose>
1223
	        </xsl:variable>
1223
                    <xsl:call-template name="chopPunctuation">
1224
	        <xsl:call-template name="chopPunctuation">
1224
                        <xsl:with-param name="chopString">
1225
	            <xsl:with-param name="chopString">
1225
                        <xsl:call-template name="subfieldSelect">
1226
	                <xsl:value-of select="$str"/>
1226
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1227
	            </xsl:with-param>
1227
                        </xsl:call-template>
1228
	            <xsl:with-param name="punctuation">
1228
                        </xsl:with-param>
1229
	                <xsl:text>:,;/. </xsl:text>
1229
                    </xsl:call-template>
1230
	            </xsl:with-param>
1230
                    </span>
1231
	        </xsl:call-template>
1231
                    </xsl:if>
1232
	    </xsl:when>
1232
                    <!-- Display only name and title portion in 111 field -->
1233
	</xsl:choose>
1233
            <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1234
    <xsl:if test="marc:subfield[@code='d']">
1234
                    <span class="titleportion">
1235
        <span class="authordates">
1235
                    <xsl:choose>
1236
            <xsl:text> </xsl:text>
1236
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1237
            <xsl:value-of select="marc:subfield[@code='d']"/>
1237
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1238
        </span>
1238
                    </xsl:choose>
1239
    </xsl:if>
1239
1240
	<!-- add relator code too between brackets-->
1240
                    <xsl:call-template name="chopPunctuation">
1241
                        <xsl:with-param name="chopString">
1242
                        <xsl:call-template name="subfieldSelect">
1243
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1244
                        </xsl:call-template>
1245
                        </xsl:with-param>
1246
                    </xsl:call-template>
1247
                    </span>
1248
            </xsl:if>
1249
            <!-- Display only dates in 100 field -->
1250
            <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1251
                <span class="authordates">
1252
                <xsl:text>, </xsl:text>
1253
                <xsl:call-template name="chopPunctuation">
1254
                    <xsl:with-param name="chopString">
1255
                        <xsl:call-template name="subfieldSelect">
1256
                           <xsl:with-param name="codes">d</xsl:with-param>
1257
                        </xsl:call-template>
1258
                        </xsl:with-param>
1259
                    </xsl:call-template>
1260
                    </span>
1261
            </xsl:if>
1262
1263
            </xsl:when>
1264
            <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1265
            <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1266
            <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1267
                    <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1268
                    <xsl:if test="@tag=710 or @tag=711">
1269
                    <xsl:call-template name="chopPunctuation">
1270
                        <xsl:with-param name="chopString">
1271
                            <xsl:call-template name="subfieldSelect">
1272
                            <xsl:with-param name="codes">
1273
                            <xsl:choose>
1274
                                <xsl:when test="@tag=711">aeq</xsl:when>
1275
                                <xsl:otherwise>ab</xsl:otherwise>
1276
                            </xsl:choose>
1277
                            </xsl:with-param>
1278
                            </xsl:call-template>
1279
                        </xsl:with-param>
1280
                        <xsl:with-param name="punctuation">
1281
                            <xsl:text>:,;/ </xsl:text>
1282
                        </xsl:with-param>
1283
                    </xsl:call-template>
1284
                    <!-- Display only name and title portion in 711 field -->
1285
                    <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1286
                    <span class="titleportion">
1287
                    <xsl:choose>
1288
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1289
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1290
                    </xsl:choose>
1291
1292
                    <xsl:call-template name="chopPunctuation">
1293
                        <xsl:with-param name="chopString">
1294
                        <xsl:call-template name="subfieldSelect">
1295
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1296
                        </xsl:call-template>
1297
                        </xsl:with-param>
1298
                    </xsl:call-template>
1299
                    </span>
1300
                    </xsl:if>
1301
                    <!-- Display only name and title portion in 710 field -->
1302
                    <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1303
                    <span class="titleportion">
1304
                    <xsl:choose>
1305
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1306
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1307
                    </xsl:choose>
1308
                    <xsl:call-template name="chopPunctuation">
1309
                        <xsl:with-param name="chopString">
1310
                        <xsl:call-template name="subfieldSelect">
1311
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1312
                        </xsl:call-template>
1313
                        </xsl:with-param>
1314
                    </xsl:call-template>
1315
                    </span>
1316
                    </xsl:if>
1317
1318
                    </xsl:if>
1319
                        <!-- Display only name portion in 700 field -->
1320
                        <xsl:if test="@tag=700">
1321
                           <xsl:call-template name="chopPunctuation">
1322
                               <xsl:with-param name="chopString">
1323
                               <xsl:call-template name="subfieldSelect">
1324
                                  <xsl:with-param name="codes">abcq</xsl:with-param>
1325
                               </xsl:call-template>
1326
                               </xsl:with-param>
1327
                        </xsl:call-template>
1328
                        </xsl:if>
1329
                        <!-- Display class "authordates" in 700 field -->
1330
                        <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1331
                        <span class="authordates">
1332
                        <xsl:text>, </xsl:text>
1333
                        <xsl:call-template name="chopPunctuation">
1334
                            <xsl:with-param name="chopString">
1335
                            <xsl:call-template name="subfieldSelect">
1336
                               <xsl:with-param name="codes">d</xsl:with-param>
1337
                            </xsl:call-template>
1338
                            </xsl:with-param>
1339
                        </xsl:call-template>
1340
                        </span>
1341
                        </xsl:if>
1342
                        <!-- Display class "titleportion" in 700 field -->
1343
                        <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1344
                        <xsl:if test="@tag=700 and $titleportionfields">
1345
                        <span class="titleportion">
1346
                        <xsl:text>. </xsl:text>
1347
                        <xsl:call-template name="chopPunctuation">
1348
                            <xsl:with-param name="chopString">
1349
                            <xsl:call-template name="subfieldSelect">
1350
                                <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1351
                            </xsl:call-template>
1352
                            </xsl:with-param>
1353
                        </xsl:call-template>
1354
                        </span>
1355
                        </xsl:if>
1356
1357
        </xsl:when>
1358
        </xsl:choose>
1359
1360
    <!-- add relator code too between brackets-->
1241
    <!-- #13383 include relator code j for field 111 -->
1361
    <!-- #13383 include relator code j for field 111 -->
1242
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1362
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1243
                <span class="relatorcode">
1363
                <span class="relatorcode">
1244
                    <xsl:text> [</xsl:text>
1364
                    <xsl:text> [</xsl:text>
1245
                    <xsl:choose>
1365
                    <xsl:choose>
1246
                        <xsl:when test="@tag=111">
1366
                        <xsl:when test="@tag=111 or @tag=711">
1247
                            <xsl:choose>
1367
                            <xsl:choose>
1248
                                <!-- Prefer j over 4 -->
1368
                                <!-- Prefer j over 4 for fields 111 and 711-->
1249
                                <xsl:when test="marc:subfield[@code='j']">
1369
                                <xsl:when test="marc:subfield[@code='j']">
1250
                                    <xsl:for-each select="marc:subfield[@code='j']">
1370
                                    <xsl:for-each select="marc:subfield[@code='j']">
1251
                                        <xsl:value-of select="."/>
1371
                                        <xsl:value-of select="."/>
Lines 1260-1267 Link Here
1260
                                </xsl:otherwise>
1380
                                </xsl:otherwise>
1261
                            </xsl:choose>
1381
                            </xsl:choose>
1262
                        </xsl:when>
1382
                        </xsl:when>
1263
                        <!-- Prefer e over 4 -->
1383
                        <!-- Prefer e over 4 for fields 111 and 711-->
1264
                        <xsl:when test="marc:subfield[@code='e']">
1384
                        <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1265
                            <xsl:for-each select="marc:subfield[@code='e']">
1385
                            <xsl:for-each select="marc:subfield[@code='e']">
1266
                                <xsl:value-of select="."/>
1386
                                <xsl:value-of select="."/>
1267
                                <xsl:if test="position() != last()">, </xsl:if>
1387
                                <xsl:if test="position() != last()">, </xsl:if>
Lines 1277-1283 Link Here
1277
                    <xsl:text>]</xsl:text>
1397
                    <xsl:text>]</xsl:text>
1278
                </span>
1398
                </span>
1279
            </xsl:if>
1399
            </xsl:if>
1280
	</a>
1400
        </a>
1281
        <xsl:choose>
1401
        <xsl:choose>
1282
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1402
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1283
        </xsl:choose>
1403
        </xsl:choose>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-15 / +63 lines)
Lines 349-361 Link Here
349
    <p class="author">by
349
    <p class="author">by
350
        <!-- #13383 -->
350
        <!-- #13383 -->
351
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
351
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
352
            <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
353
                <xsl:text> </xsl:text>
354
                <xsl:call-template name="subfieldSelect">
355
                    <xsl:with-param name="codes">n</xsl:with-param>
356
                </xsl:call-template>
357
                <xsl:text> </xsl:text>
358
            </xsl:if>
359
            <a>
352
            <a>
360
                <xsl:choose>
353
                <xsl:choose>
361
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
354
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
Lines 371-378 Link Here
371
                            <xsl:with-param name="codes">
364
                            <xsl:with-param name="codes">
372
                                <xsl:choose>
365
                                <xsl:choose>
373
                                    <!-- #13383 include subfield e for field 111  -->
366
                                    <!-- #13383 include subfield e for field 111  -->
374
                                    <xsl:when test="@tag=111">abceqt</xsl:when>
367
                                    <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when>
375
                                    <xsl:otherwise>abcjqt</xsl:otherwise>
368
                                    <xsl:when test="@tag=110 or @tag=710">ab</xsl:when>
369
                                    <xsl:otherwise>abcjq</xsl:otherwise>
376
                                </xsl:choose>
370
                                </xsl:choose>
377
                            </xsl:with-param>
371
                            </xsl:with-param>
378
                        </xsl:call-template>
372
                        </xsl:call-template>
Lines 381-398 Link Here
381
                        <xsl:text>:,;/ </xsl:text>
375
                        <xsl:text>:,;/ </xsl:text>
382
                    </xsl:with-param>
376
                    </xsl:with-param>
383
                </xsl:call-template>
377
                </xsl:call-template>
384
            </a>
378
            <!-- Display title portion for 110 and 710 fields -->
385
            <xsl:if test="marc:subfield[@code='d']">
379
            <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
380
                <span class="titleportion">
381
                <xsl:choose>
382
                    <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
383
                    <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
384
                </xsl:choose>
385
                <xsl:call-template name="chopPunctuation">
386
                    <xsl:with-param name="chopString">
387
                    <xsl:call-template name="subfieldSelect">
388
                        <xsl:with-param name="codes">cdnt</xsl:with-param>
389
                    </xsl:call-template>
390
                    </xsl:with-param>
391
                </xsl:call-template>
392
                </span>
393
            </xsl:if>
394
            <!-- Display title portion for 111 and 711 fields -->
395
            <xsl:if test="(@tag=111 or @tag=711) and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
396
                    <span class="titleportion">
397
                    <xsl:choose>
398
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
399
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
400
                    </xsl:choose>
401
402
                    <xsl:call-template name="chopPunctuation">
403
                        <xsl:with-param name="chopString">
404
                        <xsl:call-template name="subfieldSelect">
405
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
406
                        </xsl:call-template>
407
                        </xsl:with-param>
408
                    </xsl:call-template>
409
                    </span>
410
            </xsl:if>
411
            <!-- Display dates for 100 and 700 fields -->
412
            <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']">
386
                <span class="authordates">
413
                <span class="authordates">
387
                    <xsl:text> </xsl:text>
414
                <xsl:text>, </xsl:text>
388
                    <xsl:value-of select="marc:subfield[@code='d']"/>
415
                <xsl:call-template name="chopPunctuation">
416
                    <xsl:with-param name="chopString">
417
                        <xsl:call-template name="subfieldSelect">
418
                           <xsl:with-param name="codes">d</xsl:with-param>
419
                        </xsl:call-template>
420
                    </xsl:with-param>
421
                </xsl:call-template>
422
                </span>
423
            </xsl:if>
424
            <!-- Display title portion for 100 and 700 fields -->
425
            <xsl:if test="@tag=700 and marc:subfield[@code='t']">
426
                <span class="titleportion">
427
                <xsl:text>. </xsl:text>
428
                <xsl:call-template name="chopPunctuation">
429
                    <xsl:with-param name="chopString">
430
                        <xsl:call-template name="subfieldSelect">
431
                            <xsl:with-param name="codes">t</xsl:with-param>
432
                        </xsl:call-template>
433
                    </xsl:with-param>
434
                </xsl:call-template>
389
                </span>
435
                </span>
390
            </xsl:if>
436
            </xsl:if>
437
            </a>
438
            <!-- Display relators for 1XX and 7XX fields -->
391
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
439
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
392
                <span class="relatorcode">
440
                <span class="relatorcode">
393
                    <xsl:text> [</xsl:text>
441
                    <xsl:text> [</xsl:text>
394
                    <xsl:choose>
442
                    <xsl:choose>
395
                        <xsl:when test="@tag=111">
443
                        <xsl:when test="@tag=111 or @tag=711">
396
                            <xsl:choose>
444
                            <xsl:choose>
397
                                <!-- Prefer j over 4 -->
445
                                <!-- Prefer j over 4 -->
398
                                <xsl:when test="marc:subfield[@code='j']">
446
                                <xsl:when test="marc:subfield[@code='j']">
Lines 411-417 Link Here
411
                        </xsl:when>
459
                        </xsl:when>
412
                        <!-- Prefer e over 4 -->
460
                        <!-- Prefer e over 4 -->
413
                        <xsl:when test="marc:subfield[@code='e']">
461
                        <xsl:when test="marc:subfield[@code='e']">
414
                            <xsl:for-each select="marc:subfield[@code='e']">
462
                            <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
415
                                <xsl:value-of select="."/>
463
                                <xsl:value-of select="."/>
416
                                <xsl:if test="position() != last()">, </xsl:if>
464
                                <xsl:if test="position() != last()">, </xsl:if>
417
                            </xsl:for-each>
465
                            </xsl:for-each>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-20 / +140 lines)
Lines 1294-1302 Link Here
1294
                                <xsl:call-template name="subfieldSelect">
1294
                                <xsl:call-template name="subfieldSelect">
1295
                                    <xsl:with-param name="codes">
1295
                                    <xsl:with-param name="codes">
1296
                                        <xsl:choose>
1296
                                        <xsl:choose>
1297
                                            <!-- #13383 include subfield e for field 111  -->
1297
                                            <!-- #13383 include subfield e for field 111, Display only name portion in 1XX  -->
1298
                                            <xsl:when test="@tag=111">abceqt</xsl:when>
1298
                                            <xsl:when test="@tag=111">aeq</xsl:when>
1299
                                            <xsl:otherwise>abcjqt</xsl:otherwise>
1299
                                            <xsl:when test="@tag=110">ab</xsl:when>
1300
                                            <xsl:otherwise>abcjq</xsl:otherwise>
1300
                                        </xsl:choose>
1301
                                        </xsl:choose>
1301
                                    </xsl:with-param>
1302
                                    </xsl:with-param>
1302
                                </xsl:call-template>
1303
                                </xsl:call-template>
Lines 1305-1344 Link Here
1305
                                <xsl:text>:,;/ </xsl:text>
1306
                                <xsl:text>:,;/ </xsl:text>
1306
                            </xsl:with-param>
1307
                            </xsl:with-param>
1307
                        </xsl:call-template>
1308
                        </xsl:call-template>
1309
                    <!-- Display only name and title portion in 110 field -->
1310
                    <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1311
                    <span class="titleportion">
1312
                    <xsl:choose>
1313
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1314
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1315
                    </xsl:choose>
1316
                    <xsl:call-template name="chopPunctuation">
1317
                        <xsl:with-param name="chopString">
1318
                        <xsl:call-template name="subfieldSelect">
1319
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1320
                        </xsl:call-template>
1321
                        </xsl:with-param>
1322
                    </xsl:call-template>
1323
                    </span>
1324
                    </xsl:if>
1325
                    <!-- Display only name and title portion in 111 field -->
1326
            <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1327
                    <span class="titleportion">
1328
                    <xsl:choose>
1329
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1330
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1331
                    </xsl:choose>
1332
1333
                    <xsl:call-template name="chopPunctuation">
1334
                        <xsl:with-param name="chopString">
1335
                        <xsl:call-template name="subfieldSelect">
1336
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1337
                        </xsl:call-template>
1338
                        </xsl:with-param>
1339
                    </xsl:call-template>
1340
                    </span>
1341
            </xsl:if>
1342
            <!-- Display only dates in 100 field -->
1343
                        <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1344
                        <span class="authordates">
1345
                        <xsl:text>, </xsl:text>
1346
                        <xsl:call-template name="chopPunctuation">
1347
                            <xsl:with-param name="chopString">
1348
                            <xsl:call-template name="subfieldSelect">
1349
                               <xsl:with-param name="codes">d</xsl:with-param>
1350
                            </xsl:call-template>
1351
                            </xsl:with-param>
1352
                        </xsl:call-template>
1353
                        </span>
1354
                        </xsl:if>
1308
                    </xsl:when>
1355
                    </xsl:when>
1309
                    <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1356
                    <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1310
                    <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1357
                    <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1311
                    <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1358
                    <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1312
                        <xsl:variable name="str">
1359
                    <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1360
                    <xsl:if test="@tag=710 or @tag=711">
1361
                    <xsl:call-template name="chopPunctuation">
1362
                        <xsl:with-param name="chopString">
1313
                            <xsl:call-template name="subfieldSelect">
1363
                            <xsl:call-template name="subfieldSelect">
1314
                                <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
1364
                            <xsl:with-param name="codes">
1365
                            <xsl:choose>
1366
                                <xsl:when test="@tag=711">aeq</xsl:when>
1367
                                <xsl:otherwise>ab</xsl:otherwise>
1368
                            </xsl:choose>
1369
                            </xsl:with-param>
1315
                            </xsl:call-template>
1370
                            </xsl:call-template>
1316
                        </xsl:variable>
1371
                        </xsl:with-param>
1372
                        <xsl:with-param name="punctuation">
1373
                            <xsl:text>:,;/ </xsl:text>
1374
                        </xsl:with-param>
1375
                    </xsl:call-template>
1376
                    <!-- Display only name and title portion in 711 field -->
1377
                    <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1378
                    <span class="titleportion">
1379
                    <xsl:choose>
1380
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1381
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1382
                    </xsl:choose>
1383
1384
                    <xsl:call-template name="chopPunctuation">
1385
                        <xsl:with-param name="chopString">
1386
                        <xsl:call-template name="subfieldSelect">
1387
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1388
                        </xsl:call-template>
1389
                        </xsl:with-param>
1390
                    </xsl:call-template>
1391
                    </span>
1392
                    </xsl:if>
1393
                    <!-- Display only name and title portion in 710 field -->
1394
                    <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1395
                    <span class="titleportion">
1396
                    <xsl:choose>
1397
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1398
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1399
                    </xsl:choose>
1400
                    <xsl:call-template name="chopPunctuation">
1401
                        <xsl:with-param name="chopString">
1402
                        <xsl:call-template name="subfieldSelect">
1403
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1404
                        </xsl:call-template>
1405
                        </xsl:with-param>
1406
                    </xsl:call-template>
1407
                    </span>
1408
                    </xsl:if>
1409
1410
                    </xsl:if>
1411
                        <!-- Display only name portion in 700 field -->
1412
                        <xsl:if test="@tag=700">
1413
                           <xsl:call-template name="chopPunctuation">
1414
                               <xsl:with-param name="chopString">
1415
                               <xsl:call-template name="subfieldSelect">
1416
                                  <xsl:with-param name="codes">abcq</xsl:with-param>
1417
                               </xsl:call-template>
1418
                               </xsl:with-param>
1419
                        </xsl:call-template>
1420
                        </xsl:if>
1421
                        <!-- Display class "authordates" in 700 field -->
1422
                        <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1423
                        <span class="authordates">
1424
                        <xsl:text>, </xsl:text>
1317
                        <xsl:call-template name="chopPunctuation">
1425
                        <xsl:call-template name="chopPunctuation">
1318
                            <xsl:with-param name="chopString">
1426
                            <xsl:with-param name="chopString">
1319
                                <xsl:value-of select="$str"/>
1427
                            <xsl:call-template name="subfieldSelect">
1428
                               <xsl:with-param name="codes">d</xsl:with-param>
1429
                            </xsl:call-template>
1320
                            </xsl:with-param>
1430
                            </xsl:with-param>
1321
                            <xsl:with-param name="punctuation">
1431
                        </xsl:call-template>
1322
                                <xsl:text>:,;/. </xsl:text>
1432
                        </span>
1433
                        </xsl:if>
1434
                        <!-- Display class "titleportion" in 700 field -->
1435
                        <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1436
                        <xsl:if test="@tag=700 and $titleportionfields">
1437
                        <span class="titleportion">
1438
                        <xsl:text>. </xsl:text>
1439
                        <xsl:call-template name="chopPunctuation">
1440
                            <xsl:with-param name="chopString">
1441
                            <xsl:call-template name="subfieldSelect">
1442
                                <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1443
                            </xsl:call-template>
1323
                            </xsl:with-param>
1444
                            </xsl:with-param>
1324
                        </xsl:call-template>
1445
                        </xsl:call-template>
1446
                        </span>
1447
                        </xsl:if>
1448
1325
                    </xsl:when>
1449
                    </xsl:when>
1326
                </xsl:choose>
1450
                </xsl:choose>
1327
                </span></span></span>
1451
                </span></span></span>
1328
                <xsl:if test="marc:subfield[@code='d']">
1452
1329
                    <span class="authordates">
1453
                <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1330
                        <xsl:text> </xsl:text>
1331
                        <xsl:value-of select="marc:subfield[@code='d']"/>
1332
                    </span>
1333
                </xsl:if>
1334
                <!-- #13383 include relator code j for field 111 -->
1335
                <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1454
                <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1455
1336
                    <span class="relatorcode">
1456
                    <span class="relatorcode">
1337
                        <xsl:text> [</xsl:text>
1457
                        <xsl:text> [</xsl:text>
1338
                        <xsl:choose>
1458
                        <xsl:choose>
1339
                            <xsl:when test="@tag=111">
1459
                            <xsl:when test="@tag=111 or @tag=711">
1340
                                <xsl:choose>
1460
                                <xsl:choose>
1341
                                    <!-- Prefer j over 4 -->
1461
                                    <!-- Prefer j over 4 for 111 and 711 -->
1342
                                    <xsl:when test="marc:subfield[@code='j']">
1462
                                    <xsl:when test="marc:subfield[@code='j']">
1343
                                        <xsl:for-each select="marc:subfield[@code='j']">
1463
                                        <xsl:for-each select="marc:subfield[@code='j']">
1344
                                            <xsl:value-of select="."/>
1464
                                            <xsl:value-of select="."/>
Lines 1353-1360 Link Here
1353
                                    </xsl:otherwise>
1473
                                    </xsl:otherwise>
1354
                                </xsl:choose>
1474
                                </xsl:choose>
1355
                            </xsl:when>
1475
                            </xsl:when>
1356
                            <!-- Prefer e over 4 -->
1476
                            <!-- Prefer e over 4 on 100 and 110-->
1357
                            <xsl:when test="marc:subfield[@code='e']">
1477
                            <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1358
                                <xsl:for-each select="marc:subfield[@code='e']">
1478
                                <xsl:for-each select="marc:subfield[@code='e']">
1359
                                    <xsl:value-of select="."/>
1479
                                    <xsl:value-of select="."/>
1360
                                    <xsl:if test="position() != last()">, </xsl:if>
1480
                                    <xsl:if test="position() != last()">, </xsl:if>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-17 / +64 lines)
Lines 457-477 Link Here
457
    by <span class="author">
457
    by <span class="author">
458
        <!-- #13383 -->
458
        <!-- #13383 -->
459
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
459
        <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
460
            <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
461
                <xsl:text> </xsl:text>
462
                <xsl:call-template name="subfieldSelect">
463
                    <xsl:with-param name="codes">n</xsl:with-param>
464
                </xsl:call-template>
465
                <xsl:text> </xsl:text>
466
            </xsl:if>
467
            <xsl:call-template name="chopPunctuation">
460
            <xsl:call-template name="chopPunctuation">
468
                <xsl:with-param name="chopString">
461
                <xsl:with-param name="chopString">
469
                    <xsl:call-template name="subfieldSelect">
462
                    <xsl:call-template name="subfieldSelect">
470
                        <xsl:with-param name="codes">
463
                        <xsl:with-param name="codes">
471
                            <xsl:choose>
464
                            <xsl:choose>
472
                                <!-- #13383 include subfield e for field 111  -->
465
                                <!-- #13383 include subfield e for field 111  -->
473
                                <xsl:when test="@tag=111">abceqt</xsl:when>
466
                                <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when>
474
                                <xsl:otherwise>abcjqt</xsl:otherwise>
467
                                <xsl:when test="@tag=110 or @tag=710">ab</xsl:when>
468
                                <xsl:otherwise>abcjq</xsl:otherwise>
475
                            </xsl:choose>
469
                            </xsl:choose>
476
                        </xsl:with-param>
470
                        </xsl:with-param>
477
                    </xsl:call-template>
471
                    </xsl:call-template>
Lines 480-498 Link Here
480
                    <xsl:text>:,;/ </xsl:text>
474
                    <xsl:text>:,;/ </xsl:text>
481
                </xsl:with-param>
475
                </xsl:with-param>
482
            </xsl:call-template>
476
            </xsl:call-template>
483
            <xsl:if test="marc:subfield[@code='d']">
477
            <!-- Display title portion for 110 and 710 fields -->
478
            <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
479
                <span class="titleportion">
480
                <xsl:choose>
481
                    <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
482
                    <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
483
                </xsl:choose>
484
                <xsl:call-template name="chopPunctuation">
485
                    <xsl:with-param name="chopString">
486
                    <xsl:call-template name="subfieldSelect">
487
                        <xsl:with-param name="codes">cdnt</xsl:with-param>
488
                    </xsl:call-template>
489
                    </xsl:with-param>
490
                </xsl:call-template>
491
                </span>
492
            </xsl:if>
493
            <!-- Display title portion for 111 and 711 fields -->
494
            <xsl:if test="(@tag=111 or @tag=711) and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
495
                    <span class="titleportion">
496
                    <xsl:choose>
497
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
498
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
499
                    </xsl:choose>
500
501
                    <xsl:call-template name="chopPunctuation">
502
                        <xsl:with-param name="chopString">
503
                        <xsl:call-template name="subfieldSelect">
504
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
505
                        </xsl:call-template>
506
                        </xsl:with-param>
507
                    </xsl:call-template>
508
                    </span>
509
            </xsl:if>
510
            <!-- Display dates for 100 and 700 fields -->
511
            <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']">
484
                <span class="authordates">
512
                <span class="authordates">
485
                    <xsl:text> </xsl:text>
513
                <xsl:text>, </xsl:text>
486
                    <xsl:value-of select="marc:subfield[@code='d']"/>
514
                <xsl:call-template name="chopPunctuation">
515
                    <xsl:with-param name="chopString">
516
                        <xsl:call-template name="subfieldSelect">
517
                           <xsl:with-param name="codes">d</xsl:with-param>
518
                        </xsl:call-template>
519
                    </xsl:with-param>
520
                </xsl:call-template>
521
                </span>
522
            </xsl:if>
523
            <!-- Display title portion for 100 and 700 fields -->
524
            <xsl:if test="@tag=700 and marc:subfield[@code='t']">
525
                <span class="titleportion">
526
                <xsl:text>. </xsl:text>
527
                <xsl:call-template name="chopPunctuation">
528
                    <xsl:with-param name="chopString">
529
                        <xsl:call-template name="subfieldSelect">
530
                            <xsl:with-param name="codes">t</xsl:with-param>
531
                        </xsl:call-template>
532
                    </xsl:with-param>
533
                </xsl:call-template>
487
                </span>
534
                </span>
488
            </xsl:if>
535
            </xsl:if>
536
            <!-- Display relators for 1XX and 7XX fields -->
489
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
537
            <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
490
                <span class="relatorcode">
538
                <span class="relatorcode">
491
                    <xsl:text> [</xsl:text>
539
                    <xsl:text> [</xsl:text>
492
                    <xsl:choose>
540
                    <xsl:choose>
493
                        <xsl:when test="@tag=111">
541
                        <xsl:when test="@tag=111 or @tag=711">
494
                            <xsl:choose>
542
                            <xsl:choose>
495
                                <!-- Prefer j over 4 -->
543
                                <!-- Prefer j over 4 for 111 and 711 -->
496
                                <xsl:when test="marc:subfield[@code='j']">
544
                                <xsl:when test="marc:subfield[@code='j']">
497
                                    <xsl:for-each select="marc:subfield[@code='j']">
545
                                    <xsl:for-each select="marc:subfield[@code='j']">
498
                                        <xsl:value-of select="."/>
546
                                        <xsl:value-of select="."/>
Lines 507-515 Link Here
507
                                </xsl:otherwise>
555
                                </xsl:otherwise>
508
                            </xsl:choose>
556
                            </xsl:choose>
509
                        </xsl:when>
557
                        </xsl:when>
510
                        <!-- Prefer e over 4 -->
558
                        <!-- Prefer e over 4 on 100 and 110 -->
511
                        <xsl:when test="marc:subfield[@code='e']">
559
                        <xsl:when test="marc:subfield[@code='e']">
512
                            <xsl:for-each select="marc:subfield[@code='e']">
560
                            <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
513
                                <xsl:value-of select="."/>
561
                                <xsl:value-of select="."/>
514
                                <xsl:if test="position() != last()">, </xsl:if>
562
                                <xsl:if test="position() != last()">, </xsl:if>
515
                            </xsl:for-each>
563
                            </xsl:for-each>
516
- 

Return to bug 16343