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

(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (-38 / +38 lines)
Lines 39-44 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
39
      <xslo:apply-templates mode="index_heading_conditional"/>
39
      <xslo:apply-templates mode="index_heading_conditional"/>
40
      <xslo:apply-templates mode="index_match_heading"/>
40
      <xslo:apply-templates mode="index_match_heading"/>
41
      <xslo:apply-templates mode="index_subject_thesaurus"/>
41
      <xslo:apply-templates mode="index_subject_thesaurus"/>
42
      <xslo:apply-templates mode="index_all"/>
42
    </z:record>
43
    </z:record>
43
  </xslo:template>
44
  </xslo:template>
44
  <xslo:template match="marc:controlfield[@tag='001']">
45
  <xslo:template match="marc:controlfield[@tag='001']">
Lines 457-519 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
457
    <xslo:for-each select="marc:subfield">
458
    <xslo:for-each select="marc:subfield">
458
      <xslo:if test="contains('a', @code)">
459
      <xslo:if test="contains('a', @code)">
459
        <z:index name="tpubdate:s">
460
        <z:index name="tpubdate:s">
460
          <xslo:value-of select="substring(., 8, 1)"/>
461
          <xslo:value-of select="substring(., 9, 1)"/>
461
        </z:index>
462
        </z:index>
462
      </xslo:if>
463
      </xslo:if>
463
    </xslo:for-each>
464
    </xslo:for-each>
464
    <xslo:for-each select="marc:subfield">
465
    <xslo:for-each select="marc:subfield">
465
      <xslo:if test="contains('a', @code)">
466
      <xslo:if test="contains('a', @code)">
466
        <z:index name="ta:w">
467
        <z:index name="ta:w">
467
          <xslo:value-of select="substring(., 17, 1)"/>
468
          <xslo:value-of select="substring(., 18, 1)"/>
468
        </z:index>
469
        </z:index>
469
      </xslo:if>
470
      </xslo:if>
470
    </xslo:for-each>
471
    </xslo:for-each>
471
    <xslo:for-each select="marc:subfield">
472
    <xslo:for-each select="marc:subfield">
472
      <xslo:if test="contains('a', @code)">
473
      <xslo:if test="contains('a', @code)">
473
        <z:index name="ta:w">
474
        <z:index name="ta:w">
474
          <xslo:value-of select="substring(., 18, 1)"/>
475
          <xslo:value-of select="substring(., 19, 1)"/>
475
        </z:index>
476
        </z:index>
476
      </xslo:if>
477
      </xslo:if>
477
    </xslo:for-each>
478
    </xslo:for-each>
478
    <xslo:for-each select="marc:subfield">
479
    <xslo:for-each select="marc:subfield">
479
      <xslo:if test="contains('a', @code)">
480
      <xslo:if test="contains('a', @code)">
480
        <z:index name="ta:w">
481
        <z:index name="ta:w">
481
          <xslo:value-of select="substring(., 19, 1)"/>
482
          <xslo:value-of select="substring(., 20, 1)"/>
482
        </z:index>
483
        </z:index>
483
      </xslo:if>
484
      </xslo:if>
484
    </xslo:for-each>
485
    </xslo:for-each>
485
    <xslo:for-each select="marc:subfield">
486
    <xslo:for-each select="marc:subfield">
486
      <xslo:if test="contains('a', @code)">
487
      <xslo:if test="contains('a', @code)">
487
        <z:index name="Modified-code:n">
488
        <z:index name="Modified-code:n">
488
          <xslo:value-of select="substring(., 21, 1)"/>
489
          <xslo:value-of select="substring(., 22, 1)"/>
489
        </z:index>
490
        </z:index>
490
      </xslo:if>
491
      </xslo:if>
491
    </xslo:for-each>
492
    </xslo:for-each>
492
    <xslo:for-each select="marc:subfield">
493
    <xslo:for-each select="marc:subfield">
493
      <xslo:if test="contains('a', @code)">
494
      <xslo:if test="contains('a', @code)">
494
        <z:index name="char-encoding:n">
495
        <z:index name="char-encoding:n">
495
          <xslo:value-of select="substring(., 26, 2)"/>
496
          <xslo:value-of select="substring(., 27, 2)"/>
496
        </z:index>
497
        </z:index>
497
      </xslo:if>
498
      </xslo:if>
498
    </xslo:for-each>
499
    </xslo:for-each>
499
    <xslo:for-each select="marc:subfield">
500
    <xslo:for-each select="marc:subfield">
500
      <xslo:if test="contains('a', @code)">
501
      <xslo:if test="contains('a', @code)">
501
        <z:index name="char-encoding:n">
502
        <z:index name="char-encoding:n">
502
          <xslo:value-of select="substring(., 28, 2)"/>
503
          <xslo:value-of select="substring(., 29, 2)"/>
503
        </z:index>
504
        </z:index>
504
      </xslo:if>
505
      </xslo:if>
505
    </xslo:for-each>
506
    </xslo:for-each>
506
    <xslo:for-each select="marc:subfield">
507
    <xslo:for-each select="marc:subfield">
507
      <xslo:if test="contains('a', @code)">
508
      <xslo:if test="contains('a', @code)">
508
        <z:index name="char-encoding:n">
509
        <z:index name="char-encoding:n">
509
          <xslo:value-of select="substring(., 30, 2)"/>
510
          <xslo:value-of select="substring(., 31, 2)"/>
510
        </z:index>
511
        </z:index>
511
      </xslo:if>
512
      </xslo:if>
512
    </xslo:for-each>
513
    </xslo:for-each>
513
    <xslo:for-each select="marc:subfield">
514
    <xslo:for-each select="marc:subfield">
514
      <xslo:if test="contains('a', @code)">
515
      <xslo:if test="contains('a', @code)">
515
        <z:index name="script-Title:n">
516
        <z:index name="script-Title:n">
516
          <xslo:value-of select="substring(., 34, 2)"/>
517
          <xslo:value-of select="substring(., 35, 2)"/>
517
        </z:index>
518
        </z:index>
518
      </xslo:if>
519
      </xslo:if>
519
    </xslo:for-each>
520
    </xslo:for-each>
Lines 540-552 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
540
    <xslo:for-each select="marc:subfield">
541
    <xslo:for-each select="marc:subfield">
541
      <xslo:if test="contains('a', @code)">
542
      <xslo:if test="contains('a', @code)">
542
        <z:index name="ff8-18-21:w">
543
        <z:index name="ff8-18-21:w">
543
          <xslo:value-of select="substring(., 0, 1)"/>
544
        </z:index>
545
      </xslo:if>
546
    </xslo:for-each>
547
    <xslo:for-each select="marc:subfield">
548
      <xslo:if test="contains('a', @code)">
549
        <z:index name="ff8-18-21:w">
550
          <xslo:value-of select="substring(., 1, 1)"/>
544
          <xslo:value-of select="substring(., 1, 1)"/>
551
        </z:index>
545
        </z:index>
552
      </xslo:if>
546
      </xslo:if>
Lines 567-573 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
567
    </xslo:for-each>
561
    </xslo:for-each>
568
    <xslo:for-each select="marc:subfield">
562
    <xslo:for-each select="marc:subfield">
569
      <xslo:if test="contains('a', @code)">
563
      <xslo:if test="contains('a', @code)">
570
        <z:index name="ctype:w">
564
        <z:index name="ff8-18-21:w">
571
          <xslo:value-of select="substring(., 4, 1)"/>
565
          <xslo:value-of select="substring(., 4, 1)"/>
572
        </z:index>
566
        </z:index>
573
      </xslo:if>
567
      </xslo:if>
Lines 595-638 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
595
    </xslo:for-each>
589
    </xslo:for-each>
596
    <xslo:for-each select="marc:subfield">
590
    <xslo:for-each select="marc:subfield">
597
      <xslo:if test="contains('a', @code)">
591
      <xslo:if test="contains('a', @code)">
598
        <z:index name="ff8-29:w">
592
        <z:index name="ctype:w">
599
          <xslo:value-of select="substring(., 8, 1)"/>
593
          <xslo:value-of select="substring(., 8, 1)"/>
600
        </z:index>
594
        </z:index>
601
      </xslo:if>
595
      </xslo:if>
602
    </xslo:for-each>
596
    </xslo:for-each>
603
    <xslo:for-each select="marc:subfield">
597
    <xslo:for-each select="marc:subfield">
604
      <xslo:if test="contains('a', @code)">
598
      <xslo:if test="contains('a', @code)">
605
        <z:index name="ff8-30:w">
599
        <z:index name="ff8-29:w">
606
          <xslo:value-of select="substring(., 9, 1)"/>
600
          <xslo:value-of select="substring(., 9, 1)"/>
607
        </z:index>
601
        </z:index>
608
      </xslo:if>
602
      </xslo:if>
609
    </xslo:for-each>
603
    </xslo:for-each>
610
    <xslo:for-each select="marc:subfield">
604
    <xslo:for-each select="marc:subfield">
611
      <xslo:if test="contains('a', @code)">
605
      <xslo:if test="contains('a', @code)">
612
        <z:index name="ff8-31:w">
606
        <z:index name="ff8-30:w">
613
          <xslo:value-of select="substring(., 10, 1)"/>
607
          <xslo:value-of select="substring(., 10, 1)"/>
614
        </z:index>
608
        </z:index>
615
      </xslo:if>
609
      </xslo:if>
616
    </xslo:for-each>
610
    </xslo:for-each>
617
    <xslo:for-each select="marc:subfield">
611
    <xslo:for-each select="marc:subfield">
618
      <xslo:if test="contains('a', @code)">
612
      <xslo:if test="contains('a', @code)">
619
        <z:index name="lf:w">
613
        <z:index name="ff8-31:w">
620
          <xslo:value-of select="substring(., 11, 1)"/>
614
          <xslo:value-of select="substring(., 11, 1)"/>
621
        </z:index>
615
        </z:index>
622
      </xslo:if>
616
      </xslo:if>
623
    </xslo:for-each>
617
    </xslo:for-each>
624
    <xslo:for-each select="marc:subfield">
618
    <xslo:for-each select="marc:subfield">
625
      <xslo:if test="contains('a', @code)">
619
      <xslo:if test="contains('a', @code)">
626
        <z:index name="bio:w">
620
        <z:index name="lf:w">
627
          <xslo:value-of select="substring(., 12, 1)"/>
621
          <xslo:value-of select="substring(., 12, 1)"/>
628
        </z:index>
622
        </z:index>
629
      </xslo:if>
623
      </xslo:if>
630
    </xslo:for-each>
624
    </xslo:for-each>
625
    <xslo:for-each select="marc:subfield">
626
      <xslo:if test="contains('a', @code)">
627
        <z:index name="bio:w">
628
          <xslo:value-of select="substring(., 13, 1)"/>
629
        </z:index>
630
      </xslo:if>
631
    </xslo:for-each>
631
  </xslo:template>
632
  </xslo:template>
632
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='106']">
633
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='106']">
633
    <xslo:for-each select="marc:subfield">
634
    <xslo:for-each select="marc:subfield">
634
      <xslo:if test="contains('a', @code)">
635
      <xslo:if test="contains('a', @code)">
635
        <z:index name="ff8-23:w iff8-23:p">
636
        <z:index name="ff8-23:w ff8-23:p">
636
          <xslo:value-of select="."/>
637
          <xslo:value-of select="."/>
637
        </z:index>
638
        </z:index>
638
      </xslo:if>
639
      </xslo:if>
Lines 642-704 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
642
    <xslo:for-each select="marc:subfield">
643
    <xslo:for-each select="marc:subfield">
643
      <xslo:if test="contains('a', @code)">
644
      <xslo:if test="contains('a', @code)">
644
        <z:index name="ff8-21:w">
645
        <z:index name="ff8-21:w">
645
          <xslo:value-of select="substring(., 0, 1)"/>
646
          <xslo:value-of select="substring(., 1, 1)"/>
646
        </z:index>
647
        </z:index>
647
      </xslo:if>
648
      </xslo:if>
648
    </xslo:for-each>
649
    </xslo:for-each>
649
    <xslo:for-each select="marc:subfield">
650
    <xslo:for-each select="marc:subfield">
650
      <xslo:if test="contains('a', @code)">
651
      <xslo:if test="contains('a', @code)">
651
        <z:index name="ff8-18:w">
652
        <z:index name="ff8-18:w">
652
          <xslo:value-of select="substring(., 1, 1)"/>
653
          <xslo:value-of select="substring(., 2, 1)"/>
653
        </z:index>
654
        </z:index>
654
      </xslo:if>
655
      </xslo:if>
655
    </xslo:for-each>
656
    </xslo:for-each>
656
    <xslo:for-each select="marc:subfield">
657
    <xslo:for-each select="marc:subfield">
657
      <xslo:if test="contains('a', @code)">
658
      <xslo:if test="contains('a', @code)">
658
        <z:index name="ff8-19:w">
659
        <z:index name="ff8-19:w">
659
          <xslo:value-of select="substring(., 2, 1)"/>
660
          <xslo:value-of select="substring(., 3, 1)"/>
660
        </z:index>
661
        </z:index>
661
      </xslo:if>
662
      </xslo:if>
662
    </xslo:for-each>
663
    </xslo:for-each>
663
    <xslo:for-each select="marc:subfield">
664
    <xslo:for-each select="marc:subfield">
664
      <xslo:if test="contains('a', @code)">
665
      <xslo:if test="contains('a', @code)">
665
        <z:index name="ctype:w">
666
        <z:index name="ctype:w">
666
          <xslo:value-of select="substring(., 3, 1)"/>
667
          <xslo:value-of select="substring(., 4, 1)"/>
667
        </z:index>
668
        </z:index>
668
      </xslo:if>
669
      </xslo:if>
669
    </xslo:for-each>
670
    </xslo:for-each>
670
    <xslo:for-each select="marc:subfield">
671
    <xslo:for-each select="marc:subfield">
671
      <xslo:if test="contains('a', @code)">
672
      <xslo:if test="contains('a', @code)">
672
        <z:index name="ctype:w">
673
        <z:index name="ctype:w">
673
          <xslo:value-of select="substring(., 4, 1)"/>
674
          <xslo:value-of select="substring(., 5, 1)"/>
674
        </z:index>
675
        </z:index>
675
      </xslo:if>
676
      </xslo:if>
676
    </xslo:for-each>
677
    </xslo:for-each>
677
    <xslo:for-each select="marc:subfield">
678
    <xslo:for-each select="marc:subfield">
678
      <xslo:if test="contains('a', @code)">
679
      <xslo:if test="contains('a', @code)">
679
        <z:index name="ff8-29:w">
680
        <z:index name="ff8-29:w">
680
          <xslo:value-of select="substring(., 7, 1)"/>
681
          <xslo:value-of select="substring(., 8, 1)"/>
681
        </z:index>
682
        </z:index>
682
      </xslo:if>
683
      </xslo:if>
683
    </xslo:for-each>
684
    </xslo:for-each>
684
    <xslo:for-each select="marc:subfield">
685
    <xslo:for-each select="marc:subfield">
685
      <xslo:if test="contains('a', @code)">
686
      <xslo:if test="contains('a', @code)">
686
        <z:index name="Title-page-availability:w">
687
        <z:index name="Title-page-availability:w">
687
          <xslo:value-of select="substring(., 8, 1)"/>
688
          <xslo:value-of select="substring(., 9, 1)"/>
688
        </z:index>
689
        </z:index>
689
      </xslo:if>
690
      </xslo:if>
690
    </xslo:for-each>
691
    </xslo:for-each>
691
    <xslo:for-each select="marc:subfield">
692
    <xslo:for-each select="marc:subfield">
692
      <xslo:if test="contains('a', @code)">
693
      <xslo:if test="contains('a', @code)">
693
        <z:index name="ff8-31:w">
694
        <z:index name="ff8-31:w">
694
          <xslo:value-of select="substring(., 9, 1)"/>
695
          <xslo:value-of select="substring(., 10, 1)"/>
695
        </z:index>
696
        </z:index>
696
      </xslo:if>
697
      </xslo:if>
697
    </xslo:for-each>
698
    </xslo:for-each>
698
    <xslo:for-each select="marc:subfield">
699
    <xslo:for-each select="marc:subfield">
699
      <xslo:if test="contains('a', @code)">
700
      <xslo:if test="contains('a', @code)">
700
        <z:index name="Cumulative-index-availability:w">
701
        <z:index name="Cumulative-index-availability:w">
701
          <xslo:value-of select="substring(., 10, 1)"/>
702
          <xslo:value-of select="substring(., 11, 1)"/>
702
        </z:index>
703
        </z:index>
703
      </xslo:if>
704
      </xslo:if>
704
    </xslo:for-each>
705
    </xslo:for-each>
Lines 707-713 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
707
    <xslo:for-each select="marc:subfield">
708
    <xslo:for-each select="marc:subfield">
708
      <xslo:if test="contains('a', @code)">
709
      <xslo:if test="contains('a', @code)">
709
        <z:index name="Video-mt:w">
710
        <z:index name="Video-mt:w">
710
          <xslo:value-of select="substring(., 0, 1)"/>
711
          <xslo:value-of select="substring(., 1, 1)"/>
711
        </z:index>
712
        </z:index>
712
      </xslo:if>
713
      </xslo:if>
713
    </xslo:for-each>
714
    </xslo:for-each>
Lines 716-736 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
716
    <xslo:for-each select="marc:subfield">
717
    <xslo:for-each select="marc:subfield">
717
      <xslo:if test="contains('a', @code)">
718
      <xslo:if test="contains('a', @code)">
718
        <z:index name="Graphics-type:w">
719
        <z:index name="Graphics-type:w">
719
          <xslo:value-of select="substring(., 0, 1)"/>
720
          <xslo:value-of select="substring(., 1, 1)"/>
720
        </z:index>
721
        </z:index>
721
      </xslo:if>
722
      </xslo:if>
722
    </xslo:for-each>
723
    </xslo:for-each>
723
    <xslo:for-each select="marc:subfield">
724
    <xslo:for-each select="marc:subfield">
724
      <xslo:if test="contains('a', @code)">
725
      <xslo:if test="contains('a', @code)">
725
        <z:index name="Graphics-support:w">
726
        <z:index name="Graphics-support:w">
726
          <xslo:value-of select="substring(., 1, 1)"/>
727
          <xslo:value-of select="substring(., 2, 1)"/>
727
        </z:index>
728
        </z:index>
728
      </xslo:if>
729
      </xslo:if>
729
    </xslo:for-each>
730
    </xslo:for-each>
730
    <xslo:for-each select="marc:subfield">
731
    <xslo:for-each select="marc:subfield">
731
      <xslo:if test="contains('a', @code)">
732
      <xslo:if test="contains('a', @code)">
732
        <z:index name="Graphics-support:w">
733
        <z:index name="Graphics-support:w">
733
          <xslo:value-of select="substring(., 2, 1)"/>
734
          <xslo:value-of select="substring(., 3, 1)"/>
734
        </z:index>
735
        </z:index>
735
      </xslo:if>
736
      </xslo:if>
736
    </xslo:for-each>
737
    </xslo:for-each>
Lines 3090-3096 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
3090
      <xslo:value-of select="normalize-space($raw_heading)"/>
3091
      <xslo:value-of select="normalize-space($raw_heading)"/>
3091
    </z:index>
3092
    </z:index>
3092
  </xslo:template>
3093
  </xslo:template>
3093
  <xslo:template match="*">
3094
  <xslo:template mode="index_all" match="text()">
3094
    <z:index name="Any:w Any:p">
3095
    <z:index name="Any:w Any:p">
3095
      <xslo:value-of select="."/>
3096
      <xslo:value-of select="."/>
3096
    </z:index>
3097
    </z:index>
3097
- 

Return to bug 8252