Bug 8805 - Add a biblio-zebra-indexdefs.xsl for NORMARC
authorMagnus Enger <magnus@enger.priv.no>
Wed, 31 Oct 2012 08:06:31 +0000 (09:06 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 8 Nov 2012 17:35:49 +0000 (12:35 -0500)
This is required in order for Koha to support DOM indexing of the
NORMARC dialect, cf Bug "Bug 7818 - support DOM mode for Zebra
indexing of bibliographic records".

The two files in this patch were generated from the NORMARC
record.abs by doing the steps suggested at the bottom here:
http://wiki.koha-community.org/wiki/Switching_to_dom_indexing
No manual editing was involved.

To test:
- Do a fresh install, choosing NORMARC as the MARC dialect
- Run rebuild_zebra.pl and check it does not complain about missing
  files or other things
- Check that search works as expected. Using MARC21 records for
  the testing should be OK.

2012-10-31: New patch after an update to Bug 8665
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml [new file with mode: 0644]
etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl [new file with mode: 0644]

diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml
new file mode 100644 (file)
index 0000000..fd012c9
--- /dev/null
@@ -0,0 +1,954 @@
+<?xml version="1.0" encoding="utf-8"?>
+<kohaidx:index_defs xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs">
+  <!--record.abs line 64: xelm /record/leader llength:w:range(data,0,5),rtype:w:range(data,6,1),Bib-level:w:range(data,7,1)-->
+  <index_leader xmlns="http://www.koha-community.org/schemas/index-defs" offset="0" length="5">
+    <target_index>llength:w</target_index>
+  </index_leader>
+  <index_leader xmlns="http://www.koha-community.org/schemas/index-defs" offset="6" length="1">
+    <target_index>rtype:w</target_index>
+  </index_leader>
+  <index_leader xmlns="http://www.koha-community.org/schemas/index-defs" offset="7" length="1">
+    <target_index>Bib-level:w</target_index>
+  </index_leader>
+  <!--record.abs line 67: melm 001        Control-number-->
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="001">
+    <target_index>Control-number:w</target_index>
+  </index_control_field>
+  <!--record.abs line 71: melm 007        Microform-generation:n:range(data,11,1),Material-type,ff7-00:w:range(data,0,1),ff7-01:w:range(data,1,1),ff7-02:w:range(data,2,1),ff7-01-02:w:range(data,0,2)-->
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007" offset="11" length="1">
+    <target_index>Microform-generation:n</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007">
+    <target_index>Material-type:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007" offset="0" length="1">
+    <target_index>ff7-00:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007" offset="1" length="1">
+    <target_index>ff7-01:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007" offset="2" length="1">
+    <target_index>ff7-02:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="007" offset="0" length="2">
+    <target_index>ff7-01-02:w</target_index>
+  </index_control_field>
+  <!--record.abs line 74: melm 008        date-entered-on-file:n:range(data,0,5),date-entered-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate:s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1),lf:w:range(data,33,1),bio:w:range(data,34,1),ln:n:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range(data,39,0)-->
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="0" length="5">
+    <target_index>date-entered-on-file:n</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="0" length="5">
+    <target_index>date-entered-on-file:s</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="7" length="4">
+    <target_index>pubdate:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="7" length="4">
+    <target_index>pubdate:n</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="7" length="4">
+    <target_index>pubdate:y</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="7" length="4">
+    <target_index>pubdate:s</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="15" length="3">
+    <target_index>pl:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="22" length="1">
+    <target_index>ta:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="23" length="1">
+    <target_index>ff8-23:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="29" length="1">
+    <target_index>ff8-29:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="33" length="1">
+    <target_index>lf:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="34" length="1">
+    <target_index>bio:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="35" length="3">
+    <target_index>ln:n</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="24" length="4">
+    <target_index>ctype:w</target_index>
+  </index_control_field>
+  <index_control_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="008" offset="39" length="0">
+    <target_index>Record-source:w</target_index>
+  </index_control_field>
+  <!--record.abs line 76: melm 010        LC-card-number,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="010">
+    <target_index>LC-card-number:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 78: melm 015        BNB-card-number,BGF-number,Number-db,Number-natl-biblio,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="015">
+    <target_index>BNB-card-number:w</target_index>
+    <target_index>BGF-number:w</target_index>
+    <target_index>Number-db:w</target_index>
+    <target_index>Number-natl-biblio:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 81: melm 020$a      ISBN:w,Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="020" subfields="a">
+    <target_index>ISBN:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 82: melm 020        ISBN,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="020">
+    <target_index>ISBN:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 83: melm 022$a      ISSN:w,ISBN:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="022" subfields="a">
+    <target_index>ISSN:w</target_index>
+    <target_index>ISBN:w</target_index>
+  </index_subfields>
+  <!--record.abs line 84: melm 022        ISSN,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="022">
+    <target_index>ISSN:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 86: melm 024        Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="024">
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 87: melm 025        Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="025">
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 88: melm 027        Report-number,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="027">
+    <target_index>Report-number:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 89: melm 028        Number-music-publisher,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="028">
+    <target_index>Number-music-publisher:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 90: melm 030        CODEN,Identifier-standard-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="030">
+    <target_index>CODEN:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_data_field>
+  <!--record.abs line 95: melm 040        Code-institution,Record-source-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="040">
+    <target_index>Code-institution:w</target_index>
+    <target_index>Record-source:w</target_index>
+  </index_data_field>
+  <!--record.abs line 96: melm 041        ln-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="041">
+    <target_index>ln:w</target_index>
+  </index_data_field>
+  <!--record.abs line 97: melm 043        Code-geographic-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="043">
+    <target_index>Code-geographic:w</target_index>
+  </index_data_field>
+  <!--record.abs line 102: melm 060        NLM-call-number-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="060">
+    <target_index>NLM-call-number:w</target_index>
+  </index_data_field>
+  <!--record.abs line 104: melm 080        UDC-classification-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="080">
+    <target_index>UDC-classification:w</target_index>
+  </index_data_field>
+  <!--record.abs line 105: melm 082        Dewey-classification:w,Dewey-classification:s-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="082">
+    <target_index>Dewey-classification:w</target_index>
+    <target_index>Dewey-classification:s</target_index>
+  </index_data_field>
+  <!--record.abs line 113: melm 100$9      Cross-Reference:w,Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="100" subfields="9">
+    <target_index>Cross-Reference:w</target_index>
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 114: melm 100$a      Author,Author:p,Author:s,Editor,Author-personal-bibliography,Author-personal-bibliography:p,Author-personal-bibliography:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="100" subfields="a">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+    <target_index>Author:s</target_index>
+    <target_index>Editor:w</target_index>
+    <target_index>Author-personal-bibliography:w</target_index>
+    <target_index>Author-personal-bibliography:p</target_index>
+    <target_index>Author-personal-bibliography:s</target_index>
+  </index_subfields>
+  <!--record.abs line 115: melm 100        Author,Author-title,Author-name-personal,Name,Name-and-title,Personal-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="100">
+    <target_index>Author:w</target_index>
+    <target_index>Author-title:w</target_index>
+    <target_index>Author-name-personal:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Personal-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 116: melm 110$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="110" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 117: melm 110        Author,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="110">
+    <target_index>Author:w</target_index>
+    <target_index>Author-title:w</target_index>
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Corporate-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 118: melm 111$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="111" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 119: melm 111        Author,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="111">
+    <target_index>Author:w</target_index>
+    <target_index>Author-title:w</target_index>
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Conference-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 120: melm 130$i      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="130" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 121: melm 130$n      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="130" subfields="n">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 122: melm 130$r      Music-key-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="130" subfields="r">
+    <target_index>Music-key:w</target_index>
+  </index_subfields>
+  <!--record.abs line 123: melm 130$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="130" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 124: melm 130        Title,Title-uniform-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="130">
+    <target_index>Title:w</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_data_field>
+  <!--record.abs line 126: melm 210        Title,Title-abbreviated-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="210">
+    <target_index>Title:w</target_index>
+    <target_index>Title-abbreviated:w</target_index>
+  </index_data_field>
+  <!--record.abs line 130: melm 222        Title,Title-key-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="222">
+    <target_index>Title:w</target_index>
+    <target_index>Title-key:w</target_index>
+  </index_data_field>
+  <!--record.abs line 131: melm 240$i      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="240" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 132: melm 240$r      Music-key-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="240" subfields="r">
+    <target_index>Music-key:w</target_index>
+  </index_subfields>
+  <!--record.abs line 133: melm 240$n      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="240" subfields="n">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 134: melm 240        Title:w,Title:p,Title-uniform-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="240">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_data_field>
+  <!--record.abs line 138: melm 245$a      Title-cover:w,Title-cover:p,Title-cover:s,Title:w,Title:p,Title:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="245" subfields="a">
+    <target_index>Title-cover:w</target_index>
+    <target_index>Title-cover:p</target_index>
+    <target_index>Title-cover:s</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+    <target_index>Title:s</target_index>
+  </index_subfields>
+  <!--record.abs line 139: melm 245$c      Author,Author-in-order:w,Author-in-order:p,Author-in-order:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="245" subfields="c">
+    <target_index>Author:w</target_index>
+    <target_index>Author-in-order:w</target_index>
+    <target_index>Author-in-order:p</target_index>
+    <target_index>Author-in-order:s</target_index>
+  </index_subfields>
+  <!--record.abs line 140: melm 245$9      Cross-Reference:w,Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="245" subfields="9">
+    <target_index>Cross-Reference:w</target_index>
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 141: melm 245        Title:w,Title:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="245">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_data_field>
+  <!--record.abs line 142: melm 246        Title,Title:p,Title-abbreviated,Title-expanded,Title-former-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="246">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+    <target_index>Title-abbreviated:w</target_index>
+    <target_index>Title-expanded:w</target_index>
+    <target_index>Title-former:w</target_index>
+  </index_data_field>
+  <!--record.abs line 144: melm 260$a      pl:w,pl:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="260" subfields="a">
+    <target_index>pl:w</target_index>
+    <target_index>pl:p</target_index>
+  </index_subfields>
+  <!--record.abs line 145: melm 260$b      Publisher:w,Publisher:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="260" subfields="b">
+    <target_index>Publisher:w</target_index>
+    <target_index>Publisher:p</target_index>
+  </index_subfields>
+  <!--record.abs line 146: melm 260$c      copydate,copydate:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="260" subfields="c">
+    <target_index>copydate:w</target_index>
+    <target_index>copydate:s</target_index>
+  </index_subfields>
+  <!--record.abs line 147: melm 260        pl-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="260">
+    <target_index>pl:w</target_index>
+  </index_data_field>
+  <!--record.abs line 148: melm 300        Extent:w,Extent:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="300">
+    <target_index>Extent:w</target_index>
+    <target_index>Extent:p</target_index>
+  </index_data_field>
+  <!--record.abs line 164: melm 440$a      Title-series:w,Title-series:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="440" subfields="a">
+    <target_index>Title-series:w</target_index>
+    <target_index>Title-series:p</target_index>
+  </index_subfields>
+  <!--record.abs line 165: melm 440$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="440" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 166: melm 440        Title-series:w,Title-series:p,Title,Title-series-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="440">
+    <target_index>Title-series:w</target_index>
+    <target_index>Title-series:p</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_data_field>
+  <!--record.abs line 167: melm 490$a      Title-series:w,Title-series:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="490" subfields="a">
+    <target_index>Title-series:w</target_index>
+    <target_index>Title-series:p</target_index>
+  </index_subfields>
+  <!--record.abs line 168: melm 490        Title,Title-series-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="490">
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_data_field>
+  <!--record.abs line 169: melm 490$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="490" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 171: melm 502        Material-type-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="502">
+    <target_index>Material-type:w</target_index>
+  </index_data_field>
+  <!--record.abs line 174: melm 505        Note:w,Note:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="505">
+    <target_index>Note:w</target_index>
+    <target_index>Note:p</target_index>
+  </index_data_field>
+  <!--record.abs line 175: melm 510        Indexed-by-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="510">
+    <target_index>Indexed-by:w</target_index>
+  </index_data_field>
+  <!--record.abs line 176: melm 520        Abstract:w,Abstract:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="520">
+    <target_index>Abstract:w</target_index>
+    <target_index>Abstract:p</target_index>
+  </index_data_field>
+  <!--record.abs line 180: melm 600$a      Name-and-title,Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="600" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Personal-name:w</target_index>
+    <target_index>Subject-name-personal:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 181: melm 600$t      Name-and-title,Title,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="600" subfields="t">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 182: melm 600$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="600" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 184: melm 600        Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="600">
+    <target_index>Name:w</target_index>
+    <target_index>Personal-name:w</target_index>
+    <target_index>Subject-name-personal:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 185: melm 610$a      Name-and-title,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="610" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 186: melm 610$t      Name-and-title,Title,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="610" subfields="t">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 187: melm 610$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="610" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 188: melm 610        Name,Subject,Corporate-name,Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="610">
+    <target_index>Name:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Corporate-name:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 189: melm 611        Conference-name,Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="611">
+    <target_index>Conference-name:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 190: melm 611$a      Name-and-title,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="611" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 191: melm 611$t      Name-and-title,Title,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="611" subfields="t">
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 192: melm 611$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="611" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 193: melm 611        Name,Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="611">
+    <target_index>Name:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 194: melm 630$i      Thematic-number,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="630" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 195: melm 630$n      Thematic-number,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="630" subfields="n">
+    <target_index>Thematic-number:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 196: melm 630$r      Music-key,Subject,Subject:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="630" subfields="r">
+    <target_index>Music-key:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_subfields>
+  <!--record.abs line 197: melm 630$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="630" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 198: melm 630        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="630">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 199: melm 650$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="650" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 200: melm 650        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="650">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 201: melm 651$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="651" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 202: melm 651        Name-geographic,Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="651">
+    <target_index>Name-geographic:w</target_index>
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 203: melm 652$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="652" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 205: melm 653$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="653" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 206: melm 653        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="653">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 207: melm 654$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="654" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 208: melm 654        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="654">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 209: melm 655$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="655" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 210: melm 655        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="655">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 211: melm 656$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="656" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 212: melm 656        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="656">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 213: melm 657$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="657" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 214: melm 657        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="657">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 215: melm 690$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="690" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 216: melm 690        Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="690">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 218: melm 700$9      Cross-Reference,Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="9">
+    <target_index>Cross-Reference:w</target_index>
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 219: melm 700$a      Author,Author:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="a">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_subfields>
+  <!--record.abs line 220: melm 700$i      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 221: melm 700$n      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="n">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 222: melm 700$r      Music-key-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="r">
+    <target_index>Music-key:w</target_index>
+  </index_subfields>
+  <!--record.abs line 224: melm 700$t      Author-title,Name-and-title,Title,Title-uniform-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="700" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_subfields>
+  <!--record.abs line 225: melm 700        Author,Author-name-corporate,Author-name-personal,Name,Editor,Personal-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="700">
+    <target_index>Author:w</target_index>
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Author-name-personal:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Editor:w</target_index>
+    <target_index>Personal-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 226: melm 710        Author,Corporate-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="710">
+    <target_index>Author:w</target_index>
+    <target_index>Corporate-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 228: melm 710$t      Author-title,Name-and-title,Title,Title-uniform-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_subfields>
+  <!--record.abs line 230: melm 710$a      Name-and-title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 231: melm 710$i      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 232: melm 710$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="710" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 234: melm 710        Author,Name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="710">
+    <target_index>Author:w</target_index>
+    <target_index>Name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 235: melm 711$a      Name-and-title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 237: melm 711$t      Author-title,Title,Title-uniform-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_subfields>
+  <!--record.abs line 238: melm 711$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="711" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 240: melm 711        Author-name-corporate,Name,Conference-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="711">
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Conference-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 241: melm 730$i      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="730" subfields="i">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 242: melm 730$n      Thematic-number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="730" subfields="n">
+    <target_index>Thematic-number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 243: melm 730$r      Music-key-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="730" subfields="r">
+    <target_index>Music-key:w</target_index>
+  </index_subfields>
+  <!--record.abs line 244: melm 730$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="730" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 245: melm 730        Title,Title-uniform-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="730">
+    <target_index>Title:w</target_index>
+    <target_index>Title-uniform:w</target_index>
+  </index_data_field>
+  <!--record.abs line 246: melm 740        Title,Title-other-variant-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="740">
+    <target_index>Title:w</target_index>
+    <target_index>Title-other-variant:w</target_index>
+  </index_data_field>
+  <!--record.abs line 247: melm 773$t      Host-item-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="773" subfields="t">
+    <target_index>Host-item:w</target_index>
+  </index_subfields>
+  <!--record.abs line 248: melm 780$t      Title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="780" subfields="t">
+    <target_index>Title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 249: melm 780        Title,Title-former,Related-periodical-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="780">
+    <target_index>Title:w</target_index>
+    <target_index>Title-former:w</target_index>
+    <target_index>Related-periodical:w</target_index>
+  </index_data_field>
+  <!--record.abs line 250: melm 785        Related-periodical-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="785">
+    <target_index>Related-periodical:w</target_index>
+  </index_data_field>
+  <!--record.abs line 252: melm 800$a      Name-and-title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="800" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 254: melm 800$t      Author-title,Name-and-title,Title,Title-series-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="800" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_subfields>
+  <!--record.abs line 255: melm 800$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="800" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 256: melm 800        Author,Author-name-personal,Name,Personal-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="800">
+    <target_index>Author:w</target_index>
+    <target_index>Author-name-personal:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Personal-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 257: melm 810$a      Name-and-title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="810" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 258: melm 810$t      Author-title,Name-and-title,Title,Title-series-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="810" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_subfields>
+  <!--record.abs line 259: melm 810$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="810" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 260: melm 810        Author,Corporate-name,Author-name-corporate,Name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="810">
+    <target_index>Author:w</target_index>
+    <target_index>Corporate-name:w</target_index>
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 261: melm 811$a      Name-and-title-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="811" subfields="a">
+    <target_index>Name-and-title:w</target_index>
+  </index_subfields>
+  <!--record.abs line 262: melm 811$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="811" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 264: melm 811$t      Author-title,Name-and-title,Title,Title-series-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="811" subfields="t">
+    <target_index>Author-title:w</target_index>
+    <target_index>Name-and-title:w</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_subfields>
+  <!--record.abs line 265: melm 811        Author,Author-name-corporate,Name,Conference-name-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="811">
+    <target_index>Author:w</target_index>
+    <target_index>Author-name-corporate:w</target_index>
+    <target_index>Name:w</target_index>
+    <target_index>Conference-name:w</target_index>
+  </index_data_field>
+  <!--record.abs line 266: melm 830$9      Koha-Auth-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="830" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 267: melm 830        Title,Title-series-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="830">
+    <target_index>Title:w</target_index>
+    <target_index>Title-series:w</target_index>
+  </index_data_field>
+  <!--record.abs line 272: melm 999$c      Local-Number:n,Local-Number:w,Local-Number:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="999" subfields="c">
+    <target_index>Local-Number:n</target_index>
+    <target_index>Local-Number:w</target_index>
+    <target_index>Local-Number:s</target_index>
+  </index_subfields>
+  <!--record.abs line 273: melm 999$d      biblioitemnumber:n,biblioitemnumber:w,biblioitemnumber:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="999" subfields="d">
+    <target_index>biblioitemnumber:n</target_index>
+    <target_index>biblioitemnumber:w</target_index>
+    <target_index>biblioitemnumber:s</target_index>
+  </index_subfields>
+  <!--record.abs line 274: melm 942$0      totalissues:n,totalissues:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="0">
+    <target_index>totalissues:n</target_index>
+    <target_index>totalissues:s</target_index>
+  </index_subfields>
+  <!--record.abs line 275: melm 942$2      cn-bib-source-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="2">
+    <target_index>cn-bib-source:w</target_index>
+  </index_subfields>
+  <!--record.abs line 276: melm 942$6      cn-bib-sort:n,cn-bib-sort:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="6">
+    <target_index>cn-bib-sort:n</target_index>
+    <target_index>cn-bib-sort:s</target_index>
+  </index_subfields>
+  <!--record.abs line 277: melm 942$c      itemtype:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="c">
+    <target_index>itemtype:w</target_index>
+  </index_subfields>
+  <!--record.abs line 278: melm 942$n      Suppress:w,Suppress:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="n">
+    <target_index>Suppress:w</target_index>
+    <target_index>Suppress:n</target_index>
+  </index_subfields>
+  <!--record.abs line 281: melm 942$h      cn-class-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="h">
+    <target_index>cn-class:w</target_index>
+  </index_subfields>
+  <!--record.abs line 282: melm 942$i      cn-item-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="i">
+    <target_index>cn-item:w</target_index>
+  </index_subfields>
+  <!--record.abs line 283: melm 942$k      cn-prefix-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="k">
+    <target_index>cn-prefix:w</target_index>
+  </index_subfields>
+  <!--record.abs line 284: melm 942$m      cn-suffix-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="942" subfields="m">
+    <target_index>cn-suffix:w</target_index>
+  </index_subfields>
+  <!--record.abs line 287: melm 952$0      withdrawn:n,withdrawn:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="0">
+    <target_index>withdrawn:n</target_index>
+    <target_index>withdrawn:w</target_index>
+  </index_subfields>
+  <!--record.abs line 288: melm 952$1      lost,lost:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="1">
+    <target_index>lost:w</target_index>
+    <target_index>lost:n</target_index>
+  </index_subfields>
+  <!--record.abs line 289: melm 952$2      classification-source-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="2">
+    <target_index>classification-source:w</target_index>
+  </index_subfields>
+  <!--record.abs line 290: melm 952$3      materials-specified-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="3">
+    <target_index>materials-specified:w</target_index>
+  </index_subfields>
+  <!--record.abs line 291: melm 952$4      damaged:n,damaged:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="4">
+    <target_index>damaged:n</target_index>
+    <target_index>damaged:w</target_index>
+  </index_subfields>
+  <!--record.abs line 292: melm 952$5      restricted:n,restricted:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="5">
+    <target_index>restricted:n</target_index>
+    <target_index>restricted:w</target_index>
+  </index_subfields>
+  <!--record.abs line 293: melm 952$6      cn-sort:n,cn-sort:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="6">
+    <target_index>cn-sort:n</target_index>
+    <target_index>cn-sort:s</target_index>
+  </index_subfields>
+  <!--record.abs line 294: melm 952$7      notforloan:n,notforloan:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="7">
+    <target_index>notforloan:n</target_index>
+    <target_index>notforloan:w</target_index>
+  </index_subfields>
+  <!--record.abs line 295: melm 952$8      ccode-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="8">
+    <target_index>ccode:w</target_index>
+  </index_subfields>
+  <!--record.abs line 296: melm 952$9      itemnumber:n,itemnumber:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="9">
+    <target_index>itemnumber:n</target_index>
+    <target_index>itemnumber:s</target_index>
+  </index_subfields>
+  <!--record.abs line 297: melm 952$a      homebranch-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="a">
+    <target_index>homebranch:w</target_index>
+  </index_subfields>
+  <!--record.abs line 298: melm 952$b      holdingbranch-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="b">
+    <target_index>holdingbranch:w</target_index>
+  </index_subfields>
+  <!--record.abs line 299: melm 952$c      location-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="c">
+    <target_index>location:w</target_index>
+  </index_subfields>
+  <!--record.abs line 302: melm 952$d      Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="d">
+    <target_index>Date-of-acquisition:w</target_index>
+    <target_index>Date-of-acquisition:d</target_index>
+    <target_index>Date-of-acquisition:s</target_index>
+  </index_subfields>
+  <!--record.abs line 303: melm 952$e      acqsource-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="e">
+    <target_index>acqsource:w</target_index>
+  </index_subfields>
+  <!--record.abs line 304: melm 952$f      coded-location-qualifier-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="f">
+    <target_index>coded-location-qualifier:w</target_index>
+  </index_subfields>
+  <!--record.abs line 305: melm 952$g      price-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="g">
+    <target_index>price:w</target_index>
+  </index_subfields>
+  <!--record.abs line 308: melm 952$j      stack:n,stack:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="j">
+    <target_index>stack:n</target_index>
+    <target_index>stack:w</target_index>
+  </index_subfields>
+  <!--record.abs line 310: melm 952$l      issues:n,issues:w,issues:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="l">
+    <target_index>issues:n</target_index>
+    <target_index>issues:w</target_index>
+    <target_index>issues:s</target_index>
+  </index_subfields>
+  <!--record.abs line 311: melm 952$m      renewals:n,renewals:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="m">
+    <target_index>renewals:n</target_index>
+    <target_index>renewals:w</target_index>
+  </index_subfields>
+  <!--record.abs line 312: melm 952$n      reserves:n,reserves:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="n">
+    <target_index>reserves:n</target_index>
+    <target_index>reserves:w</target_index>
+  </index_subfields>
+  <!--record.abs line 313: melm 952$o      Local-classification:w,Local-classification:p,Local-classification:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="o">
+    <target_index>Local-classification:w</target_index>
+    <target_index>Local-classification:p</target_index>
+    <target_index>Local-classification:s</target_index>
+  </index_subfields>
+  <!--record.abs line 314: melm 952$p      barcode,barcode:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="p">
+    <target_index>barcode:w</target_index>
+    <target_index>barcode:n</target_index>
+  </index_subfields>
+  <!--record.abs line 315: melm 952$q      onloan:n,onloan:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="q">
+    <target_index>onloan:n</target_index>
+    <target_index>onloan:w</target_index>
+  </index_subfields>
+  <!--record.abs line 316: melm 952$r      datelastseen-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="r">
+    <target_index>datelastseen:w</target_index>
+  </index_subfields>
+  <!--record.abs line 317: melm 952$s      datelastborrowed-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="s">
+    <target_index>datelastborrowed:w</target_index>
+  </index_subfields>
+  <!--record.abs line 318: melm 952$t      copynumber-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="t">
+    <target_index>copynumber:w</target_index>
+  </index_subfields>
+  <!--record.abs line 319: melm 952$u      uri:u-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="u">
+    <target_index>uri:u</target_index>
+  </index_subfields>
+  <!--record.abs line 320: melm 952$v      replacementprice-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="v">
+    <target_index>replacementprice:w</target_index>
+  </index_subfields>
+  <!--record.abs line 321: melm 952$w      replacementpricedate-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="w">
+    <target_index>replacementpricedate:w</target_index>
+  </index_subfields>
+  <!--record.abs line 323: melm 952$y      itype:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="952" subfields="y">
+    <target_index>itype:w</target_index>
+  </index_subfields>
+</kohaidx:index_defs>
diff --git a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl
new file mode 100644 (file)
index 0000000..7a8dcea
--- /dev/null
@@ -0,0 +1,1772 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+This file has been automatically generated from a Koha index definition file
+with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file,
+as it may be overwritten. To regenerate, edit the appropriate Koha index
+definition file (probably something like {biblio,authority}-koha-indexdefs.xml) and run:
+`xsltproc koha-indexdefs-to-zebra.xsl {biblio,authority}-koha-indexdefs.xml >
+{biblio,authority}-zebra-indexdefs.xsl` (substituting the appropriate file names).
+-->
+<xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0">
+  <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+  <xslo:template match="text()"/>
+  <xslo:template match="text()" mode="index_subfields"/>
+  <xslo:template match="text()" mode="index_data_field"/>
+  <xslo:template match="text()" mode="index_heading"/>
+  <xslo:template match="text()" mode="index_heading_conditional"/>
+  <xslo:template match="text()" mode="index_match_heading"/>
+  <xslo:template match="text()" mode="index_subject_thesaurus"/>
+  <xslo:template match="/">
+    <xslo:if test="marc:collection">
+      <collection>
+        <xslo:apply-templates select="marc:collection/marc:record"/>
+      </collection>
+    </xslo:if>
+    <xslo:if test="marc:record">
+      <xslo:apply-templates select="marc:record"/>
+    </xslo:if>
+  </xslo:template>
+  <xslo:template match="marc:record">
+    <xslo:variable name="idfield" select="normalize-space()"/>
+    <z:record type="update">
+      <xslo:attribute name="z:id">
+        <xslo:value-of select="$idfield"/>
+      </xslo:attribute>
+      <xslo:apply-templates/>
+      <xslo:apply-templates mode="index_subfields"/>
+      <xslo:apply-templates mode="index_data_field"/>
+      <xslo:apply-templates mode="index_heading"/>
+      <xslo:apply-templates mode="index_heading_conditional"/>
+      <xslo:apply-templates mode="index_match_heading"/>
+      <xslo:apply-templates mode="index_subject_thesaurus"/>
+    </z:record>
+  </xslo:template>
+  <xslo:template match="marc:leader">
+    <z:index name="llength:w">
+      <xslo:value-of select="substring(., 1, 5)"/>
+    </z:index>
+    <z:index name="rtype:w">
+      <xslo:value-of select="substring(., 7, 1)"/>
+    </z:index>
+    <z:index name="Bib-level:w">
+      <xslo:value-of select="substring(., 8, 1)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template match="marc:controlfield[@tag='001']">
+    <z:index name="Control-number:w">
+      <xslo:value-of select="."/>
+    </z:index>
+  </xslo:template>
+  <xslo:template match="marc:controlfield[@tag='007']">
+    <z:index name="Microform-generation:n">
+      <xslo:value-of select="substring(., 12, 1)"/>
+    </z:index>
+    <z:index name="Material-type:w">
+      <xslo:value-of select="."/>
+    </z:index>
+    <z:index name="ff7-00:w">
+      <xslo:value-of select="substring(., 1, 1)"/>
+    </z:index>
+    <z:index name="ff7-01:w">
+      <xslo:value-of select="substring(., 2, 1)"/>
+    </z:index>
+    <z:index name="ff7-02:w">
+      <xslo:value-of select="substring(., 3, 1)"/>
+    </z:index>
+    <z:index name="ff7-01-02:w">
+      <xslo:value-of select="substring(., 1, 2)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template match="marc:controlfield[@tag='008']">
+    <z:index name="date-entered-on-file:n">
+      <xslo:value-of select="substring(., 1, 5)"/>
+    </z:index>
+    <z:index name="date-entered-on-file:s">
+      <xslo:value-of select="substring(., 1, 5)"/>
+    </z:index>
+    <z:index name="pubdate:w">
+      <xslo:value-of select="substring(., 8, 4)"/>
+    </z:index>
+    <z:index name="pubdate:n">
+      <xslo:value-of select="substring(., 8, 4)"/>
+    </z:index>
+    <z:index name="pubdate:y">
+      <xslo:value-of select="substring(., 8, 4)"/>
+    </z:index>
+    <z:index name="pubdate:s">
+      <xslo:value-of select="substring(., 8, 4)"/>
+    </z:index>
+    <z:index name="pl:w">
+      <xslo:value-of select="substring(., 16, 3)"/>
+    </z:index>
+    <z:index name="ta:w">
+      <xslo:value-of select="substring(., 23, 1)"/>
+    </z:index>
+    <z:index name="ff8-23:w">
+      <xslo:value-of select="substring(., 24, 1)"/>
+    </z:index>
+    <z:index name="ff8-29:w">
+      <xslo:value-of select="substring(., 30, 1)"/>
+    </z:index>
+    <z:index name="lf:w">
+      <xslo:value-of select="substring(., 34, 1)"/>
+    </z:index>
+    <z:index name="bio:w">
+      <xslo:value-of select="substring(., 35, 1)"/>
+    </z:index>
+    <z:index name="ln:n">
+      <xslo:value-of select="substring(., 36, 3)"/>
+    </z:index>
+    <z:index name="ctype:w">
+      <xslo:value-of select="substring(., 25, 4)"/>
+    </z:index>
+    <z:index name="Record-source:w">
+      <xslo:value-of select="substring(., 40, 0)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='020']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="ISBN:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='022']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="ISSN:w ISBN:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Author:w Author:p Author:s Editor:w Author-personal-bibliography:w Author-personal-bibliography:p Author-personal-bibliography:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='130']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="Music-key:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='240']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="Music-key:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='245']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Title-cover:w Title-cover:p Title-cover:s Title:w Title:p Title:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('c', @code)">
+        <z:index name="Author:w Author-in-order:w Author-in-order:p Author-in-order:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='260']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="pl:w pl:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('b', @code)">
+        <z:index name="Publisher:w Publisher:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('c', @code)">
+        <z:index name="copydate:w copydate:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='440']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Title-series:w Title-series:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='490']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Title-series:w Title-series:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='600']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w Name:w Personal-name:w Subject-name-personal:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='610']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='611']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Name-and-title:w Title:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='630']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Thematic-number:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="Music-key:w Subject:w Subject:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Author:w Author:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="Music-key:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Name-and-title:w Title:w Title-uniform:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Name-and-title:w Title:w Title-uniform:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Title:w Title-uniform:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='730']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Thematic-number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="Music-key:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='773']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Host-item:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='780']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='800']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='810']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='811']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Name-and-title:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Author-title:w Name-and-title:w Title:w Title-series:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='830']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='999']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('c', @code)">
+        <z:index name="Local-Number:n Local-Number:w Local-Number:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('d', @code)">
+        <z:index name="biblioitemnumber:n biblioitemnumber:w biblioitemnumber:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='942']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('0', @code)">
+        <z:index name="totalissues:n totalissues:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('2', @code)">
+        <z:index name="cn-bib-source:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('6', @code)">
+        <z:index name="cn-bib-sort:n cn-bib-sort:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('c', @code)">
+        <z:index name="itemtype:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="Suppress:w Suppress:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('h', @code)">
+        <z:index name="cn-class:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('i', @code)">
+        <z:index name="cn-item:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('k', @code)">
+        <z:index name="cn-prefix:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('m', @code)">
+        <z:index name="cn-suffix:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='952']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('0', @code)">
+        <z:index name="withdrawn:n withdrawn:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('1', @code)">
+        <z:index name="lost:w lost:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('2', @code)">
+        <z:index name="classification-source:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('3', @code)">
+        <z:index name="materials-specified:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('4', @code)">
+        <z:index name="damaged:n damaged:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('5', @code)">
+        <z:index name="restricted:n restricted:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('6', @code)">
+        <z:index name="cn-sort:n cn-sort:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('7', @code)">
+        <z:index name="notforloan:n notforloan:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('8', @code)">
+        <z:index name="ccode:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="itemnumber:n itemnumber:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="homebranch:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('b', @code)">
+        <z:index name="holdingbranch:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('c', @code)">
+        <z:index name="location:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('d', @code)">
+        <z:index name="Date-of-acquisition:w Date-of-acquisition:d Date-of-acquisition:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('e', @code)">
+        <z:index name="acqsource:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('f', @code)">
+        <z:index name="coded-location-qualifier:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('g', @code)">
+        <z:index name="price:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('j', @code)">
+        <z:index name="stack:n stack:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('l', @code)">
+        <z:index name="issues:n issues:w issues:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('m', @code)">
+        <z:index name="renewals:n renewals:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('n', @code)">
+        <z:index name="reserves:n reserves:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('o', @code)">
+        <z:index name="Local-classification:w Local-classification:p Local-classification:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('p', @code)">
+        <z:index name="barcode:w barcode:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('q', @code)">
+        <z:index name="onloan:n onloan:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('r', @code)">
+        <z:index name="datelastseen:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('s', @code)">
+        <z:index name="datelastborrowed:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="copynumber:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('u', @code)">
+        <z:index name="uri:u">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('v', @code)">
+        <z:index name="replacementprice:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('w', @code)">
+        <z:index name="replacementpricedate:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('y', @code)">
+        <z:index name="itype:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='010']">
+    <z:index name="LC-card-number:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='015']">
+    <z:index name="BNB-card-number:w BGF-number:w Number-db:w Number-natl-biblio:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='020']">
+    <z:index name="ISBN:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='022']">
+    <z:index name="ISSN:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='024']">
+    <z:index name="Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='025']">
+    <z:index name="Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='027']">
+    <z:index name="Report-number:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='028']">
+    <z:index name="Number-music-publisher:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='030']">
+    <z:index name="CODEN:w Identifier-standard:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='040']">
+    <z:index name="Code-institution:w Record-source:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='041']">
+    <z:index name="ln:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='043']">
+    <z:index name="Code-geographic:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='060']">
+    <z:index name="NLM-call-number:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='080']">
+    <z:index name="UDC-classification:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='082']">
+    <z:index name="Dewey-classification:w Dewey-classification:s">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='100']">
+    <z:index name="Author:w Author-title:w Author-name-personal:w Name:w Name-and-title:w Personal-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='110']">
+    <z:index name="Author:w Author-title:w Author-name-corporate:w Name:w Name-and-title:w Corporate-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='111']">
+    <z:index name="Author:w Author-title:w Author-name-corporate:w Name:w Name-and-title:w Conference-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='130']">
+    <z:index name="Title:w Title-uniform:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='210']">
+    <z:index name="Title:w Title-abbreviated:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='222']">
+    <z:index name="Title:w Title-key:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='240']">
+    <z:index name="Title:w Title:p Title-uniform:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='245']">
+    <z:index name="Title:w Title:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='246']">
+    <z:index name="Title:w Title:p Title-abbreviated:w Title-expanded:w Title-former:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='260']">
+    <z:index name="pl:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='300']">
+    <z:index name="Extent:w Extent:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='440']">
+    <z:index name="Title-series:w Title-series:p Title:w Title-series:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='490']">
+    <z:index name="Title:w Title-series:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='502']">
+    <z:index name="Material-type:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='505']">
+    <z:index name="Note:w Note:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='510']">
+    <z:index name="Indexed-by:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='520']">
+    <z:index name="Abstract:w Abstract:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
+    <z:index name="Name:w Personal-name:w Subject-name-personal:w Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='610']">
+    <z:index name="Name:w Subject:w Corporate-name:w Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='611']">
+    <z:index name="Conference-name:w Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+    <z:index name="Name:w Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='630']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='650']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='651']">
+    <z:index name="Name-geographic:w Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='653']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='654']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='655']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='656']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='657']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='690']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='700']">
+    <z:index name="Author:w Author-name-corporate:w Author-name-personal:w Name:w Editor:w Personal-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
+    <z:index name="Author:w Corporate-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+    <z:index name="Author:w Name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='711']">
+    <z:index name="Author-name-corporate:w Name:w Conference-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
+    <z:index name="Title:w Title-uniform:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='740']">
+    <z:index name="Title:w Title-other-variant:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='780']">
+    <z:index name="Title:w Title-former:w Related-periodical:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='785']">
+    <z:index name="Related-periodical:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='800']">
+    <z:index name="Author:w Author-name-personal:w Name:w Personal-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='810']">
+    <z:index name="Author:w Corporate-name:w Author-name-corporate:w Name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='811']">
+    <z:index name="Author:w Author-name-corporate:w Name:w Conference-name:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='830']">
+    <z:index name="Title:w Title-series:w">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template match="*">
+    <z:index name="Any:w Any:p">
+      <xslo:value-of select="."/>
+    </z:index>
+  </xslo:template>
+  <xslo:template name="chopPunctuation">
+    <xslo:param name="chopString"/>
+    <xslo:variable name="length" select="string-length($chopString)"/>
+    <xslo:choose>
+      <xslo:when test="$length=0"/>
+      <xslo:when test="contains('-,.:=;!%/', substring($chopString,$length,1))">
+        <xslo:call-template name="chopPunctuation">
+          <xslo:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+        </xslo:call-template>
+      </xslo:when>
+      <xslo:when test="not($chopString)"/>
+      <xslo:otherwise>
+        <xslo:value-of select="$chopString"/>
+      </xslo:otherwise>
+    </xslo:choose>
+    <xslo:text/>
+  </xslo:template>
+</xslo:stylesheet>