Lines 440-452
Link Here
|
440 |
<!-- Prefer j over 4 --> |
440 |
<!-- Prefer j over 4 --> |
441 |
<xsl:when test="marc:subfield[@code='j']"> |
441 |
<xsl:when test="marc:subfield[@code='j']"> |
442 |
<xsl:for-each select="marc:subfield[@code='j']"> |
442 |
<xsl:for-each select="marc:subfield[@code='j']"> |
443 |
<xsl:value-of select="."/> |
443 |
<xsl:call-template name="chopPunctuation"> |
|
|
444 |
<xsl:with-param name="chopString"> |
445 |
<xsl:value-of select="text()"/> |
446 |
</xsl:with-param> |
447 |
<xsl:with-param name="punctuation"><xsl:text>.</xsl:text></xsl:with-param> |
448 |
</xsl:call-template> |
444 |
<xsl:if test="position() != last()">, </xsl:if> |
449 |
<xsl:if test="position() != last()">, </xsl:if> |
445 |
</xsl:for-each> |
450 |
</xsl:for-each> |
446 |
</xsl:when> |
451 |
</xsl:when> |
447 |
<xsl:otherwise> |
452 |
<xsl:otherwise> |
448 |
<xsl:for-each select="marc:subfield[@code=4]"> |
453 |
<xsl:for-each select="marc:subfield[@code=4]"> |
449 |
<xsl:value-of select="."/> |
454 |
<xsl:call-template name="chopPunctuation"> |
|
|
455 |
<xsl:with-param name="chopString"> |
456 |
<xsl:value-of select="text()"/> |
457 |
</xsl:with-param> |
458 |
<xsl:with-param name="punctuation"><xsl:text>.</xsl:text></xsl:with-param> |
459 |
</xsl:call-template> |
450 |
<xsl:if test="position() != last()">, </xsl:if> |
460 |
<xsl:if test="position() != last()">, </xsl:if> |
451 |
</xsl:for-each> |
461 |
</xsl:for-each> |
452 |
</xsl:otherwise> |
462 |
</xsl:otherwise> |
Lines 455-467
Link Here
|
455 |
<!-- Prefer e over 4 --> |
465 |
<!-- Prefer e over 4 --> |
456 |
<xsl:when test="marc:subfield[@code='e']"> |
466 |
<xsl:when test="marc:subfield[@code='e']"> |
457 |
<xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> |
467 |
<xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> |
458 |
<xsl:value-of select="."/> |
468 |
<xsl:call-template name="chopPunctuation"> |
|
|
469 |
<xsl:with-param name="chopString"> |
470 |
<xsl:value-of select="text()"/> |
471 |
</xsl:with-param> |
472 |
<xsl:with-param name="punctuation"><xsl:text>.</xsl:text></xsl:with-param> |
473 |
</xsl:call-template> |
459 |
<xsl:if test="position() != last()">, </xsl:if> |
474 |
<xsl:if test="position() != last()">, </xsl:if> |
460 |
</xsl:for-each> |
475 |
</xsl:for-each> |
461 |
</xsl:when> |
476 |
</xsl:when> |
462 |
<xsl:otherwise> |
477 |
<xsl:otherwise> |
463 |
<xsl:for-each select="marc:subfield[@code=4]"> |
478 |
<xsl:for-each select="marc:subfield[@code=4]"> |
464 |
<xsl:value-of select="."/> |
479 |
<xsl:call-template name="chopPunctuation"> |
|
|
480 |
<xsl:with-param name="chopString"> |
481 |
<xsl:value-of select="text()"/> |
482 |
</xsl:with-param> |
483 |
<xsl:with-param name="punctuation"><xsl:text>.</xsl:text></xsl:with-param> |
484 |
</xsl:call-template> |
465 |
<xsl:if test="position() != last()">, </xsl:if> |
485 |
<xsl:if test="position() != last()">, </xsl:if> |
466 |
</xsl:for-each> |
486 |
</xsl:for-each> |
467 |
</xsl:otherwise> |
487 |
</xsl:otherwise> |
Lines 470-476
Link Here
|
470 |
</span> |
490 |
</span> |
471 |
</xsl:if> |
491 |
</xsl:if> |
472 |
<xsl:choose> |
492 |
<xsl:choose> |
473 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> |
493 |
<!-- Test to choose if we add a period at the end of the line or if there is already one --> |
|
|
494 |
<xsl:when test="position()=last()"> |
495 |
<xsl:choose> |
496 |
<xsl:when test="@tag=100 or @tag=700"> |
497 |
<xsl:choose> |
498 |
<xsl:when test="marc:subfield[@code='e']"> |
499 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:variable> |
500 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
501 |
<xsl:if test="$lastchar != '.'"> |
502 |
<xsl:text>.</xsl:text> |
503 |
</xsl:if> |
504 |
</xsl:when> |
505 |
<xsl:when test="marc:subfield[@code='4']"> |
506 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='4']"/></xsl:variable> |
507 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
508 |
<xsl:if test="$lastchar != '.'"> |
509 |
<xsl:text>.</xsl:text> |
510 |
</xsl:if> |
511 |
</xsl:when> |
512 |
<xsl:when test="marc:subfield[@code='d']"> |
513 |
<xsl:text>.</xsl:text> |
514 |
</xsl:when> |
515 |
<xsl:otherwise> |
516 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[last()]"/></xsl:variable> |
517 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
518 |
<xsl:if test="$lastchar != '.'"> |
519 |
<xsl:text>.</xsl:text> |
520 |
</xsl:if> |
521 |
</xsl:otherwise> |
522 |
</xsl:choose> |
523 |
</xsl:when> |
524 |
<xsl:when test="@tag=110 or @tag=710"> |
525 |
<xsl:choose> |
526 |
<xsl:when test="marc:subfield[@code='e']"> |
527 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:variable> |
528 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
529 |
<xsl:if test="$lastchar != '.'"> |
530 |
<xsl:text>.</xsl:text> |
531 |
</xsl:if> |
532 |
</xsl:when> |
533 |
<xsl:when test="marc:subfield[@code='4']"> |
534 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='4']"/></xsl:variable> |
535 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
536 |
<xsl:if test="$lastchar != '.'"> |
537 |
<xsl:text>.</xsl:text> |
538 |
</xsl:if> |
539 |
</xsl:when> |
540 |
<xsl:when test="marc:subfield[@code='t'] or marc:subfield[@code='n'] or marc:subfield[@code='d'] or marc:subfield[@code='c']"> |
541 |
<xsl:text>.</xsl:text> |
542 |
</xsl:when> |
543 |
<xsl:otherwise> |
544 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[last()]"/></xsl:variable> |
545 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
546 |
<xsl:if test="$lastchar != '.'"> |
547 |
<xsl:text>.</xsl:text> |
548 |
</xsl:if> |
549 |
</xsl:otherwise> |
550 |
</xsl:choose> |
551 |
</xsl:when> |
552 |
<xsl:otherwise> |
553 |
<xsl:choose> |
554 |
<xsl:when test="marc:subfield[@code='j']"> |
555 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:variable> |
556 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
557 |
<xsl:if test="$lastchar != '.'"> |
558 |
<xsl:text>.</xsl:text> |
559 |
</xsl:if> |
560 |
</xsl:when> |
561 |
<xsl:when test="marc:subfield[@code='4']"> |
562 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[@code='4']"/></xsl:variable> |
563 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
564 |
<xsl:if test="$lastchar != '.'"> |
565 |
<xsl:text>.</xsl:text> |
566 |
</xsl:if> |
567 |
</xsl:when> |
568 |
<xsl:when test="marc:subfield[@code='t'] or marc:subfield[@code='n'] or marc:subfield[@code='g'] or marc:subfield[@code='d'] or marc:subfield[@code='c']"> |
569 |
<xsl:text>.</xsl:text> |
570 |
</xsl:when> |
571 |
<xsl:otherwise> |
572 |
<xsl:variable name="lastchain"><xsl:value-of select="marc:subfield[last()]"/></xsl:variable> |
573 |
<xsl:variable name="lastchar"><xsl:value-of select="substring($lastchain, string-length($lastchain), 1)"/></xsl:variable> |
574 |
<xsl:if test="$lastchar != '.'"> |
575 |
<xsl:text>.</xsl:text> |
576 |
</xsl:if> |
577 |
</xsl:otherwise> |
578 |
</xsl:choose> |
579 |
</xsl:otherwise> |
580 |
</xsl:choose> |
581 |
</xsl:when> |
582 |
<xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> |
474 |
</xsl:choose> |
583 |
</xsl:choose> |
475 |
</xsl:for-each> |
584 |
</xsl:for-each> |
476 |
</p> |
585 |
</p> |