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 1185-1243 Link Here
1185
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1185
            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1186
            </xsl:otherwise>
1186
            </xsl:otherwise>
1187
        </xsl:choose>
1187
        </xsl:choose>
1188
	<xsl:choose>
1188
        <xsl:choose>
1189
	    <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1189
            <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1190
	        <!-- #13383 -->
1190
                <!-- #13383 -->
1191
	        <xsl:call-template name="chopPunctuation">
1191
                <xsl:call-template name="chopPunctuation">
1192
	            <xsl:with-param name="chopString">
1192
                    <xsl:with-param name="chopString">
1193
	                <xsl:call-template name="subfieldSelect">
1193
                        <xsl:call-template name="subfieldSelect">
1194
	                    <xsl:with-param name="codes">
1194
                            <xsl:with-param name="codes">
1195
	                        <xsl:choose>
1195
                                <xsl:choose>
1196
	                            <!-- #13383 include subfield e for field 111  -->
1196
                                    <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1197
	                            <xsl:when test="@tag=111">abceqt</xsl:when>
1197
                                    <xsl:when test="@tag=111">aeq</xsl:when>
1198
	                            <xsl:otherwise>abcjqt</xsl:otherwise>
1198
                                    <xsl:when test="@tag=110">ab</xsl:when>
1199
	                        </xsl:choose>
1199
                                    <xsl:otherwise>abcjq</xsl:otherwise>
1200
	                    </xsl:with-param>
1200
                                </xsl:choose>
1201
	                </xsl:call-template>
1201
                            </xsl:with-param>
1202
	            </xsl:with-param>
1202
                        </xsl:call-template>
1203
	            <xsl:with-param name="punctuation">
1203
                    </xsl:with-param>
1204
	                <xsl:text>:,;/ </xsl:text>
1204
                    <xsl:with-param name="punctuation">
1205
	            </xsl:with-param>
1205
                        <xsl:text>:,;/ </xsl:text>
1206
	        </xsl:call-template>
1206
                    </xsl:with-param>
1207
	    </xsl:when>
1207
                </xsl:call-template>
1208
	    <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1208
                    <!-- Display only name and title portion in 110 field -->
1209
	    <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1209
                    <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1210
	    <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1210
                    <span class="titleportion">
1211
	        <xsl:variable name="str">
1211
                    <xsl:choose>
1212
	            <xsl:call-template name="subfieldSelect">
1212
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1213
	                <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
1213
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1214
	            </xsl:call-template>
1214
                    </xsl:choose>
1215
	        </xsl:variable>
1215
                    <xsl:call-template name="chopPunctuation">
1216
	        <xsl:call-template name="chopPunctuation">
1216
                        <xsl:with-param name="chopString">
1217
	            <xsl:with-param name="chopString">
1217
                        <xsl:call-template name="subfieldSelect">
1218
	                <xsl:value-of select="$str"/>
1218
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1219
	            </xsl:with-param>
1219
                        </xsl:call-template>
1220
	            <xsl:with-param name="punctuation">
1220
                        </xsl:with-param>
1221
	                <xsl:text>:,;/. </xsl:text>
1221
                    </xsl:call-template>
1222
	            </xsl:with-param>
1222
                    </span>
1223
	        </xsl:call-template>
1223
                    </xsl:if>
1224
	    </xsl:when>
1224
                    <!-- Display only name and title portion in 111 field -->
1225
	</xsl:choose>
1225
            <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1226
    <xsl:if test="marc:subfield[@code='d']">
1226
                    <span class="titleportion">
1227
        <span class="authordates">
1227
                    <xsl:choose>
1228
            <xsl:text> </xsl:text>
1228
                        <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>
1229
            <xsl:value-of select="marc:subfield[@code='d']"/>
1229
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1230
        </span>
1230
                    </xsl:choose>
1231
    </xsl:if>
1231
1232
	<!-- add relator code too between brackets-->
1232
                    <xsl:call-template name="chopPunctuation">
1233
                        <xsl:with-param name="chopString">
1234
                        <xsl:call-template name="subfieldSelect">
1235
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1236
                        </xsl:call-template>
1237
                        </xsl:with-param>
1238
                    </xsl:call-template>
1239
                    </span>
1240
            </xsl:if>
1241
            <!-- Display only dates in 100 field -->
1242
            <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1243
                <span class="authordates">
1244
                <xsl:text>, </xsl:text>
1245
                <xsl:call-template name="chopPunctuation">
1246
                    <xsl:with-param name="chopString">
1247
                        <xsl:call-template name="subfieldSelect">
1248
                           <xsl:with-param name="codes">d</xsl:with-param>
1249
                        </xsl:call-template>
1250
                        </xsl:with-param>
1251
                    </xsl:call-template>
1252
                    </span>
1253
            </xsl:if>
1254
1255
            </xsl:when>
1256
            <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1257
            <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1258
            <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1259
                    <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1260
                    <xsl:if test="@tag=710 or @tag=711">
1261
                    <xsl:call-template name="chopPunctuation">
1262
                        <xsl:with-param name="chopString">
1263
                            <xsl:call-template name="subfieldSelect">
1264
                            <xsl:with-param name="codes">
1265
                            <xsl:choose>
1266
                                <xsl:when test="@tag=711">aeq</xsl:when>
1267
                                <xsl:otherwise>ab</xsl:otherwise>
1268
                            </xsl:choose>
1269
                            </xsl:with-param>
1270
                            </xsl:call-template>
1271
                        </xsl:with-param>
1272
                        <xsl:with-param name="punctuation">
1273
                            <xsl:text>:,;/ </xsl:text>
1274
                        </xsl:with-param>
1275
                    </xsl:call-template>
1276
                    <!-- Display only name and title portion in 711 field -->
1277
                    <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1278
                    <span class="titleportion">
1279
                    <xsl:choose>
1280
                        <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>
1281
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1282
                    </xsl:choose>
1283
1284
                    <xsl:call-template name="chopPunctuation">
1285
                        <xsl:with-param name="chopString">
1286
                        <xsl:call-template name="subfieldSelect">
1287
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
1288
                        </xsl:call-template>
1289
                        </xsl:with-param>
1290
                    </xsl:call-template>
1291
                    </span>
1292
                    </xsl:if>
1293
                    <!-- Display only name and title portion in 710 field -->
1294
                    <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1295
                    <span class="titleportion">
1296
                    <xsl:choose>
1297
                        <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1298
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1299
                    </xsl:choose>
1300
                    <xsl:call-template name="chopPunctuation">
1301
                        <xsl:with-param name="chopString">
1302
                        <xsl:call-template name="subfieldSelect">
1303
                            <xsl:with-param name="codes">cdnt</xsl:with-param>
1304
                        </xsl:call-template>
1305
                        </xsl:with-param>
1306
                    </xsl:call-template>
1307
                    </span>
1308
                    </xsl:if>
1309
1310
                    </xsl:if>
1311
                        <!-- Display only name portion in 700 field -->
1312
                        <xsl:if test="@tag=700">
1313
                           <xsl:call-template name="chopPunctuation">
1314
                               <xsl:with-param name="chopString">
1315
                               <xsl:call-template name="subfieldSelect">
1316
                                  <xsl:with-param name="codes">abcq</xsl:with-param>
1317
                               </xsl:call-template>
1318
                               </xsl:with-param>
1319
                        </xsl:call-template>
1320
                        </xsl:if>
1321
                        <!-- Display class "authordates" in 700 field -->
1322
                        <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1323
                        <span class="authordates">
1324
                        <xsl:text>, </xsl:text>
1325
                        <xsl:call-template name="chopPunctuation">
1326
                            <xsl:with-param name="chopString">
1327
                            <xsl:call-template name="subfieldSelect">
1328
                               <xsl:with-param name="codes">d</xsl:with-param>
1329
                            </xsl:call-template>
1330
                            </xsl:with-param>
1331
                        </xsl:call-template>
1332
                        </span>
1333
                        </xsl:if>
1334
                        <!-- Display class "titleportion" in 700 field -->
1335
                        <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1336
                        <xsl:if test="@tag=700 and $titleportionfields">
1337
                        <span class="titleportion">
1338
                        <xsl:text>. </xsl:text>
1339
                        <xsl:call-template name="chopPunctuation">
1340
                            <xsl:with-param name="chopString">
1341
                            <xsl:call-template name="subfieldSelect">
1342
                                <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1343
                            </xsl:call-template>
1344
                            </xsl:with-param>
1345
                        </xsl:call-template>
1346
                        </span>
1347
                        </xsl:if>
1348
1349
        </xsl:when>
1350
        </xsl:choose>
1351
1352
    <!-- add relator code too between brackets-->
1233
    <!-- #13383 include relator code j for field 111 -->
1353
    <!-- #13383 include relator code j for field 111 -->
1234
            <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'][. != ''])">
1354
            <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'][. != ''])">
1235
                <span class="relatorcode">
1355
                <span class="relatorcode">
1236
                    <xsl:text> [</xsl:text>
1356
                    <xsl:text> [</xsl:text>
1237
                    <xsl:choose>
1357
                    <xsl:choose>
1238
                        <xsl:when test="@tag=111">
1358
                        <xsl:when test="@tag=111 or @tag=711">
1239
                            <xsl:choose>
1359
                            <xsl:choose>
1240
                                <!-- Prefer j over 4 -->
1360
                                <!-- Prefer j over 4 for fields 111 and 711-->
1241
                                <xsl:when test="marc:subfield[@code='j']">
1361
                                <xsl:when test="marc:subfield[@code='j']">
1242
                                    <xsl:for-each select="marc:subfield[@code='j']">
1362
                                    <xsl:for-each select="marc:subfield[@code='j']">
1243
                                        <xsl:value-of select="."/>
1363
                                        <xsl:value-of select="."/>
Lines 1252-1259 Link Here
1252
                                </xsl:otherwise>
1372
                                </xsl:otherwise>
1253
                            </xsl:choose>
1373
                            </xsl:choose>
1254
                        </xsl:when>
1374
                        </xsl:when>
1255
                        <!-- Prefer e over 4 -->
1375
                        <!-- Prefer e over 4 for fields 111 and 711-->
1256
                        <xsl:when test="marc:subfield[@code='e']">
1376
                        <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1257
                            <xsl:for-each select="marc:subfield[@code='e']">
1377
                            <xsl:for-each select="marc:subfield[@code='e']">
1258
                                <xsl:value-of select="."/>
1378
                                <xsl:value-of select="."/>
1259
                                <xsl:if test="position() != last()">, </xsl:if>
1379
                                <xsl:if test="position() != last()">, </xsl:if>
Lines 1269-1275 Link Here
1269
                    <xsl:text>]</xsl:text>
1389
                    <xsl:text>]</xsl:text>
1270
                </span>
1390
                </span>
1271
            </xsl:if>
1391
            </xsl:if>
1272
	</a>
1392
        </a>
1273
        <xsl:choose>
1393
        <xsl:choose>
1274
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1394
            <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1275
        </xsl:choose>
1395
        </xsl:choose>
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-15 / +63 lines)
Lines 341-353 Link Here
341
    <p class="author">by
341
    <p class="author">by
342
        <!-- #13383 -->
342
        <!-- #13383 -->
343
        <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']">
343
        <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']">
344
            <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
345
                <xsl:text> </xsl:text>
346
                <xsl:call-template name="subfieldSelect">
347
                    <xsl:with-param name="codes">n</xsl:with-param>
348
                </xsl:call-template>
349
                <xsl:text> </xsl:text>
350
            </xsl:if>
351
            <a>
344
            <a>
352
                <xsl:choose>
345
                <xsl:choose>
353
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
346
                    <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
Lines 363-370 Link Here
363
                            <xsl:with-param name="codes">
356
                            <xsl:with-param name="codes">
364
                                <xsl:choose>
357
                                <xsl:choose>
365
                                    <!-- #13383 include subfield e for field 111  -->
358
                                    <!-- #13383 include subfield e for field 111  -->
366
                                    <xsl:when test="@tag=111">abceqt</xsl:when>
359
                                    <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when>
367
                                    <xsl:otherwise>abcjqt</xsl:otherwise>
360
                                    <xsl:when test="@tag=110 or @tag=710">ab</xsl:when>
361
                                    <xsl:otherwise>abcjq</xsl:otherwise>
368
                                </xsl:choose>
362
                                </xsl:choose>
369
                            </xsl:with-param>
363
                            </xsl:with-param>
370
                        </xsl:call-template>
364
                        </xsl:call-template>
Lines 373-390 Link Here
373
                        <xsl:text>:,;/ </xsl:text>
367
                        <xsl:text>:,;/ </xsl:text>
374
                    </xsl:with-param>
368
                    </xsl:with-param>
375
                </xsl:call-template>
369
                </xsl:call-template>
376
            </a>
370
            <!-- Display title portion for 110 and 710 fields -->
377
            <xsl:if test="marc:subfield[@code='d']">
371
            <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
372
                <span class="titleportion">
373
                <xsl:choose>
374
                    <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
375
                    <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
376
                </xsl:choose>
377
                <xsl:call-template name="chopPunctuation">
378
                    <xsl:with-param name="chopString">
379
                    <xsl:call-template name="subfieldSelect">
380
                        <xsl:with-param name="codes">cdnt</xsl:with-param>
381
                    </xsl:call-template>
382
                    </xsl:with-param>
383
                </xsl:call-template>
384
                </span>
385
            </xsl:if>
386
            <!-- Display title portion for 111 adn 711 fields -->
387
            <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'])">
388
                    <span class="titleportion">
389
                    <xsl:choose>
390
                        <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>
391
                        <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
392
                    </xsl:choose>
393
394
                    <xsl:call-template name="chopPunctuation">
395
                        <xsl:with-param name="chopString">
396
                        <xsl:call-template name="subfieldSelect">
397
                            <xsl:with-param name="codes">cdgnt</xsl:with-param>
398
                        </xsl:call-template>
399
                        </xsl:with-param>
400
                    </xsl:call-template>
401
                    </span>
402
            </xsl:if>
403
            <!-- Display dates for 100 and 700 fields -->
404
            <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']">
378
                <span class="authordates">
405
                <span class="authordates">
379
                    <xsl:text> </xsl:text>
406
                <xsl:text>, </xsl:text>
380
                    <xsl:value-of select="marc:subfield[@code='d']"/>
407
                <xsl:call-template name="chopPunctuation">
408
                    <xsl:with-param name="chopString">
409
                        <xsl:call-template name="subfieldSelect">
410
                           <xsl:with-param name="codes">d</xsl:with-param>
411
                        </xsl:call-template>
412
                    </xsl:with-param>
413
                </xsl:call-template>
414
                </span>
415
            </xsl:if>
416
            <!-- Display title portion for 100 and 700 fields -->
417
            <xsl:if test="@tag=700 and marc:subfield[@code='t']">
418
                <span class="titleportion">
419
                <xsl:text>. </xsl:text>
420
                <xsl:call-template name="chopPunctuation">
421
                    <xsl:with-param name="chopString">
422
                        <xsl:call-template name="subfieldSelect">
423
                            <xsl:with-param name="codes">t</xsl:with-param>
424
                        </xsl:call-template>
425
                    </xsl:with-param>
426
                </xsl:call-template>
381
                </span>
427
                </span>
382
            </xsl:if>
428
            </xsl:if>
429
            </a>
430
            <!-- Display display relators for 1XX and 7XX fields -->
383
            <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'][. != ''])">
431
            <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'][. != ''])">
384
                <span class="relatorcode">
432
                <span class="relatorcode">
385
                    <xsl:text> [</xsl:text>
433
                    <xsl:text> [</xsl:text>
386
                    <xsl:choose>
434
                    <xsl:choose>
387
                        <xsl:when test="@tag=111">
435
                        <xsl:when test="@tag=111 or @tag=711">
388
                            <xsl:choose>
436
                            <xsl:choose>
389
                                <!-- Prefer j over 4 -->
437
                                <!-- Prefer j over 4 -->
390
                                <xsl:when test="marc:subfield[@code='j']">
438
                                <xsl:when test="marc:subfield[@code='j']">
Lines 403-409 Link Here
403
                        </xsl:when>
451
                        </xsl:when>
404
                        <!-- Prefer e over 4 -->
452
                        <!-- Prefer e over 4 -->
405
                        <xsl:when test="marc:subfield[@code='e']">
453
                        <xsl:when test="marc:subfield[@code='e']">
406
                            <xsl:for-each select="marc:subfield[@code='e']">
454
                            <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
407
                                <xsl:value-of select="."/>
455
                                <xsl:value-of select="."/>
408
                                <xsl:if test="position() != last()">, </xsl:if>
456
                                <xsl:if test="position() != last()">, </xsl:if>
409
                            </xsl:for-each>
457
                            </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 adn 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 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