From 485ef0bc5b20495a053c62f4ed872965ecec95e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> Date: Mon, 9 Jan 2012 08:58:20 +0100 Subject: [PATCH] Bug 7421 Add UNIMARC DOM Filter Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> --- .../authorities/authority-koha-indexdefs.xml | 511 ++++++ .../authorities/authority-zebra-indexdefs.xsl | 1829 ++++++++++++++++++++ 2 files changed, 2340 insertions(+) create mode 100644 etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml create mode 100644 etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl diff --git a/etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml new file mode 100644 index 0000000..7f2a48b --- /dev/null +++ b/etc/zebradb/marc_defs/unimarc/authorities/authority-koha-indexdefs.xml @@ -0,0 +1,511 @@ +<?xml version="1.0" encoding="UTF-8"?> +<kohaidx:index_defs xmlns:kohaidx="http://www.koha.org/schemas/index-defs"> + <!-- variables --> + <kohaidx:var name="form_subdivision_subfield">j</kohaidx:var> + <kohaidx:var name="general_subdivision_subfield">x</kohaidx:var> + <kohaidx:var name="chronological_subdivision_subfield">y</kohaidx:var> + <kohaidx:var name="geographic_subdivision_subfield">z</kohaidx:var> + + <!-- Leader --> + <kohaidx:index_leader offset="5" length="1"> + <kohaidx:target_index>Record-status:w</kohaidx:target_index> + </kohaidx:index_leader> + <kohaidx:index_leader offset="17" length="1"> + <kohaidx:target_index>Encoding-level:w</kohaidx:target_index> + </kohaidx:index_leader> + + <!-- Original record ID --> + <kohaidx:index_control_field tag="001"> + <kohaidx:target_index>Local-Number:w</kohaidx:target_index> + </kohaidx:index_control_field> + + <!-- 008 --> + <kohaidx:index_control_field tag="008" offset="9" length="1"> + <kohaidx:target_index>Kind-of-record:w</kohaidx:target_index> + </kohaidx:index_control_field> + <kohaidx:index_control_field tag="008" offset="10" length="1"> + <kohaidx:target_index>Descriptive-cataloging-rules:w</kohaidx:target_index> + </kohaidx:index_control_field> + <kohaidx:index_subject_thesaurus tag="008" offset="11" length="1" detail_tag="040" detail_subfields="f"> + <kohaidx:target_index>Subject-heading-thesaurus:w</kohaidx:target_index> + </kohaidx:index_subject_thesaurus> + <kohaidx:index_control_field tag="008" offset="14" length="1"> + <kohaidx:target_index>Heading-use-main-or-added-entry:w</kohaidx:target_index> + </kohaidx:index_control_field> + <kohaidx:index_control_field tag="008" offset="15" length="1"> + <kohaidx:target_index>Heading-use-subject-added-entry:w</kohaidx:target_index> + </kohaidx:index_control_field> + <kohaidx:index_control_field tag="008" offset="16" length="1"> + <kohaidx:target_index>Heading-use-series-added-entry:w</kohaidx:target_index> + </kohaidx:index_control_field> + + <!-- Personal name headings --> + <kohaidx:index_subfields tag="200" subfields="abcdefghjklmnopqrstvxyz"> + <kohaidx:target_index>Personal-name:w</kohaidx:target_index> + <kohaidx:target_index>Personal-name:p</kohaidx:target_index> + <kohaidx:target_index>Personal-name:s</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="200" subfields="abcdefghjklmnopqrstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Personal-name-heading:w</kohaidx:target_index> + <kohaidx:target_index>Personal-name-heading:p</kohaidx:target_index> + <kohaidx:target_index>Personal-name-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="200" subfields="abcdefghjklmnopqrstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="400" subfields="abcdefghjklmnopqrstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Personal-name-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Personal-name-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Personal-name-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="400" subfields="abcdefghjklmnopqrstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="500" subfields="abcdefghjklmnopqrstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Personal-name-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Personal-name-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Personal-name-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Corporate name headings --> + <kohaidx:index_subfields tag="210" subfields="abcdefghklmnoprstvxyz"> + <kohaidx:target_index>Corporate-name:w</kohaidx:target_index> + <kohaidx:target_index>Corporate-name:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="210" subfields="abcdefghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Corporate-name-heading:w</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-heading:p</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="210" subfields="abcdefghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="410" subfields="abcdefghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Corporate-name-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="410" subfields="abcdefghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="510" subfields="abcdefghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Corporate-name-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Corporate-name-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Meeting name --> + <kohaidx:index_subfields tag="211" subfields="acdefghjklnpqstvxyz"> + <kohaidx:target_index>Meeting-name:w</kohaidx:target_index> + <kohaidx:target_index>Meeting-name:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="211" subfields="acdefghjklnpqstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Meeting-name-heading:w</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-heading:p</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="211" subfields="acdefghjklnpqstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="411" subfields="acdefghjklnpqstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Meeting-name-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="411" subfields="acdefghjklnpqstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="511" subfields="acdefghjklnpqstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Meeting-name-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Meeting-name-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Uniform title --> + <kohaidx:index_subfields tag="230" subfields="adfghklmnoprstvxyz"> + <kohaidx:target_index>Title-uniform:w</kohaidx:target_index> + <kohaidx:target_index>Title-uniform:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="230" subfields="adfghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Title-uniform-heading:w</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-heading:p</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="230" subfields="adfghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="430" subfields="adfghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Title-uniform-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="430" subfields="adfghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="530" subfields="adfghklmnoprstvxyz" subdivisions="jxyz"> + <kohaidx:target_index>Title-uniform-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Title-uniform-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Chronological term --> + <kohaidx:index_subfields tag="248" subfields="ajxyz"> + <kohaidx:target_index>Chronological-term:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-term:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="248" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-term-heading:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-heading:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="248" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="448" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-term-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="448" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="548" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-term-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-term-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + + <!-- Topical term --> + <kohaidx:index_subfields tag="250" subfields="abjxyz"> + <kohaidx:target_index>Subject-topical:w</kohaidx:target_index> + <kohaidx:target_index>Subject-topical:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="250" subfields="abjxyz" subdivisions="jxyz"> + <kohaidx:target_index>Subject-topical-heading:w</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-heading:p</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="250" subfields="abjxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="450" subfields="abjxyz" subdivisions="jxyz"> + <kohaidx:target_index>Subject-topical-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="450" subfields="abjxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="550" subfields="abjxyz" subdivisions="jxyz"> + <kohaidx:target_index>Subject-topical-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Subject-topical-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Geographic name --> + <kohaidx:index_subfields tag="251" subfields="ajxyz"> + <kohaidx:target_index>Name-geographic:w</kohaidx:target_index> + <kohaidx:target_index>Name-geographic:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="251" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Name-geographic-heading:w</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-heading:p</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="251" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="451" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Name-geographic-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="451" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="551" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Name-geographic-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Name-geographic-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Genre/form term --> + <kohaidx:index_subfields tag="255" subfields="ajxyz"> + <kohaidx:target_index>Term-genre-form:w</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form:p</kohaidx:target_index> + </kohaidx:index_subfields> + <kohaidx:index_heading tag="255" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Term-genre-form-heading:w</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-heading:p</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-heading:s</kohaidx:target_index> + <kohaidx:target_index>Heading:w</kohaidx:target_index> + <kohaidx:target_index>Heading:p</kohaidx:target_index> + <kohaidx:target_index>Heading:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="255" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="455" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Term-genre-form-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-see-from:s</kohaidx:target_index> + <kohaidx:target_index>See-from:w</kohaidx:target_index> + <kohaidx:target_index>See-from:p</kohaidx:target_index> + <kohaidx:target_index>See-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="455" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-heading-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-heading-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="555" subfields="ajxyz" subdivisions="jxyz"> + <kohaidx:target_index>Term-genre-form-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Term-genre-form-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>See-also-from:w</kohaidx:target_index> + <kohaidx:target_index>See-also-from:p</kohaidx:target_index> + <kohaidx:target_index>See-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- General subdivision --> + <kohaidx:index_heading tag="280" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>General-subdivision:w</kohaidx:target_index> + <kohaidx:target_index>General-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>General-subdivision:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="280" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="480" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>General-subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>General-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>General-subdivision-see-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="480" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="580" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>General-subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>General-subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>General-subdivision-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Geographic subdivision --> + <kohaidx:index_heading tag="281" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Geographic-subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="281" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="481" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Geographic-subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision-see-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="481" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="581" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Geographic-subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Geographic-subdivision-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Chronological subdivision --> + <kohaidx:index_heading tag="282" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="282" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="482" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision-see-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="482" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="582" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Chronological-subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Chronological-subdivision-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <!-- Form subdivision --> + <kohaidx:index_heading tag="285" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Form-subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="485" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="485" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Form-subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision-see-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_heading> + <kohaidx:index_match_heading tag="185" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Match-subdivision-see-from:p</kohaidx:target_index> + <kohaidx:target_index>Match-subdivision-see-from:s</kohaidx:target_index> + </kohaidx:index_match_heading> + + <kohaidx:index_heading tag="585" subfields="jxyz" subdivisions="jxyz"> + <kohaidx:target_index>Form-subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Form-subdivision-see-also-from:s</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:w</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:p</kohaidx:target_index> + <kohaidx:target_index>Subdivision-see-also-from:s</kohaidx:target_index> + </kohaidx:index_heading> + + <kohaidx:index_subfields tag="152" subfields="a"> + <kohaidx:target_index>authtype:w</kohaidx:target_index> + </kohaidx:index_subfields> +</kohaidx:index_defs> diff --git a/etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl new file mode 100644 index 0000000..e5e128d --- /dev/null +++ b/etc/zebradb/marc_defs/unimarc/authorities/authority-zebra-indexdefs.xsl @@ -0,0 +1,1829 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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.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_heading"/> + <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="controlField001" select="normalize-space(marc:controlfield[@tag='001'])"/> + <z:record type="update"> + <xslo:attribute name="z:id"> + <xslo:value-of select="$controlField001"/> + </xslo:attribute> + <xslo:apply-templates/> + <xslo:apply-templates mode="index_subfields"/> + <xslo:apply-templates mode="index_heading"/> + <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="Record-status:w"> + <xslo:value-of select="substring(., 6, 1)"/> + </z:index> + <z:index name="Encoding-level:w"> + <xslo:value-of select="substring(., 18, 1)"/> + </z:index> + </xslo:template> + <xslo:template match="marc:controlfield[@tag='001']"> + <z:index name="Local-Number:w"> + <xslo:value-of select="."/> + </z:index> + </xslo:template> + <xslo:template match="marc:controlfield[@tag='008']"> + <z:index name="Kind-of-record:w"> + <xslo:value-of select="substring(., 10, 1)"/> + </z:index> + <z:index name="Descriptive-cataloging-rules:w"> + <xslo:value-of select="substring(., 11, 1)"/> + </z:index> + <z:index name="Heading-use-main-or-added-entry:w"> + <xslo:value-of select="substring(., 15, 1)"/> + </z:index> + <z:index name="Heading-use-subject-added-entry:w"> + <xslo:value-of select="substring(., 16, 1)"/> + </z:index> + <z:index name="Heading-use-series-added-entry:w"> + <xslo:value-of select="substring(., 17, 1)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)"> + <z:index name="Personal-name:w Personal-name:p Personal-name:s"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='210']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)"> + <z:index name="Corporate-name:w Corporate-name:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='211']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)"> + <z:index name="Meeting-name:w Meeting-name:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='230']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)"> + <z:index name="Title-uniform:w Title-uniform:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='248']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)"> + <z:index name="Chronological-term:w Chronological-term:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='250']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abjxyz', @code)"> + <z:index name="Subject-topical:w Subject-topical:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='251']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)"> + <z:index name="Name-geographic:w Name-geographic:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='255']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)"> + <z:index name="Term-genre-form:w Term-genre-form:p"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_subfields" match="marc:datafield[@tag='152']"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('a', @code)"> + <z:index name="authtype:w"> + <xslo:value-of select="."/> + </z:index> + </xslo:if> + </xslo:for-each> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='200']"> + <z:index name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-heading:w Personal-name-heading:p Personal-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='400']"> + <z:index name="Personal-name-see-from:w Personal-name-see-from:p Personal-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-see-from:w Personal-name-see-from:p Personal-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='500']"> + <z:index name="Personal-name-see-also-from:w Personal-name-see-also-from:p Personal-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Personal-name-see-also-from:w Personal-name-see-also-from:p Personal-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='210']"> + <z:index name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-heading:w Corporate-name-heading:p Corporate-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='410']"> + <z:index name="Corporate-name-see-from:w Corporate-name-see-from:p Corporate-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-see-from:w Corporate-name-see-from:p Corporate-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='510']"> + <z:index name="Corporate-name-see-also-from:w Corporate-name-see-also-from:p Corporate-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Corporate-name-see-also-from:w Corporate-name-see-also-from:p Corporate-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='211']"> + <z:index name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-heading:w Meeting-name-heading:p Meeting-name-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='411']"> + <z:index name="Meeting-name-see-from:w Meeting-name-see-from:p Meeting-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-see-from:w Meeting-name-see-from:p Meeting-name-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='511']"> + <z:index name="Meeting-name-see-also-from:w Meeting-name-see-also-from:p Meeting-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Meeting-name-see-also-from:w Meeting-name-see-also-from:p Meeting-name-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='230']"> + <z:index name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-heading:w Title-uniform-heading:p Title-uniform-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='430']"> + <z:index name="Title-uniform-see-from:w Title-uniform-see-from:p Title-uniform-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-see-from:w Title-uniform-see-from:p Title-uniform-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='530']"> + <z:index name="Title-uniform-see-also-from:w Title-uniform-see-also-from:p Title-uniform-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Title-uniform-see-also-from:w Title-uniform-see-also-from:p Title-uniform-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='248']"> + <z:index name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Chronological-term-heading:w Chronological-term-heading:p Chronological-term-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='448']"> + <z:index name="Chronological-term-see-from:w Chronological-term-see-from:p Chronological-term-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Chronological-term-see-from:w Chronological-term-see-from:p Chronological-term-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='548']"> + <z:index name="Chronological-term-see-also-from:w Chronological-term-see-also-from:p Chronological-term-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Chronological-term-see-also-from:w Chronological-term-see-also-from:p Chronological-term-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='250']"> + <z:index name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abjxyz', @code)" name="Subject-topical-heading:w Subject-topical-heading:p Subject-topical-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='450']"> + <z:index name="Subject-topical-see-from:w Subject-topical-see-from:p Subject-topical-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abjxyz', @code)" name="Subject-topical-see-from:w Subject-topical-see-from:p Subject-topical-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='550']"> + <z:index name="Subject-topical-see-also-from:w Subject-topical-see-also-from:p Subject-topical-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abjxyz', @code)" name="Subject-topical-see-also-from:w Subject-topical-see-also-from:p Subject-topical-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='251']"> + <z:index name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Name-geographic-heading:w Name-geographic-heading:p Name-geographic-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='451']"> + <z:index name="Name-geographic-see-from:w Name-geographic-see-from:p Name-geographic-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Name-geographic-see-from:w Name-geographic-see-from:p Name-geographic-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='551']"> + <z:index name="Name-geographic-see-also-from:w Name-geographic-see-also-from:p Name-geographic-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Name-geographic-see-also-from:w Name-geographic-see-also-from:p Name-geographic-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='255']"> + <z:index name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Term-genre-form-heading:w Term-genre-form-heading:p Term-genre-form-heading:s Heading:w Heading:p Heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='455']"> + <z:index name="Term-genre-form-see-from:w Term-genre-form-see-from:p Term-genre-form-see-from:s See-from:w See-from:p See-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Term-genre-form-see-from:w Term-genre-form-see-from:p Term-genre-form-see-from:s See-from:w See-from:p See-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='555']"> + <z:index name="Term-genre-form-see-also-from:w Term-genre-form-see-also-from:p Term-genre-form-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('ajxyz', @code)" name="Term-genre-form-see-also-from:w Term-genre-form-see-also-from:p Term-genre-form-see-also-from:s See-also-from:w See-also-from:p See-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='280']"> + <z:index name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="General-subdivision:w General-subdivision:p General-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='480']"> + <z:index name="General-subdivision-see-from:w General-subdivision-see-from:p General-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="General-subdivision-see-from:w General-subdivision-see-from:p General-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='580']"> + <z:index name="General-subdivision-see-also-from:w General-subdivision-see-also-from:p General-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="General-subdivision-see-also-from:w General-subdivision-see-also-from:p General-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='281']"> + <z:index name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Geographic-subdivision:w Geographic-subdivision:p Geographic-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='481']"> + <z:index name="Geographic-subdivision-see-from:w Geographic-subdivision-see-from:p Geographic-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Geographic-subdivision-see-from:w Geographic-subdivision-see-from:p Geographic-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='581']"> + <z:index name="Geographic-subdivision-see-also-from:w Geographic-subdivision-see-also-from:p Geographic-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Geographic-subdivision-see-also-from:w Geographic-subdivision-see-also-from:p Geographic-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='282']"> + <z:index name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Chronological-subdivision:w Chronological-subdivision:p Chronological-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='482']"> + <z:index name="Chronological-subdivision-see-from:w Chronological-subdivision-see-from:p Chronological-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Chronological-subdivision-see-from:w Chronological-subdivision-see-from:p Chronological-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='582']"> + <z:index name="Chronological-subdivision-see-also-from:w Chronological-subdivision-see-also-from:p Chronological-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Chronological-subdivision-see-also-from:w Chronological-subdivision-see-also-from:p Chronological-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='285']"> + <z:index name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Form-subdivision:w Form-subdivision:p Form-subdivision:s Subdivision:w Subdivision:p Subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='485']"> + <z:index name="Form-subdivision-see-from:w Form-subdivision-see-from:p Form-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Form-subdivision-see-from:w Form-subdivision-see-from:p Form-subdivision-see-from:s Subdivision-see-from:w Subdivision-see-from:p Subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_heading" match="marc:datafield[@tag='585']"> + <z:index name="Form-subdivision-see-also-from:w Form-subdivision-see-also-from:p Form-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Form-subdivision-see-also-from:w Form-subdivision-see-also-from:p Form-subdivision-see-also-from:s Subdivision-see-also-from:w Subdivision-see-also-from:p Subdivision-see-also-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:text>--</xslo:text> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='200']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='400']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghjklmnopqrstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='210']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='410']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abcdefghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='211']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='411']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('acdefghjklnpqstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='230']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='430']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('adfghklmnoprstvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='248']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='448']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='250']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abvxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='450']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('abvxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='251']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='451']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='255']"> + <z:index name="Match-heading:p Match-heading:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading:p Match-heading:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='455']"> + <z:index name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('avxyz', @code)" name="Match-heading-see-from:p Match-heading-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='280']"> + <z:index name="Match-subdivision:p Match-subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='480']"> + <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='281']"> + <z:index name="Match-subdivision:p Match-subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='481']"> + <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='282']"> + <z:index name="Match-subdivision:p Match-subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='482']"> + <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='485']"> + <z:index name="Match-subdivision:p Match-subdivision:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision:p Match-subdivision:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:template mode="index_match_heading" match="marc:datafield[@tag='285']"> + <z:index name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:variable name="raw_heading"> + <xslo:for-each select="marc:subfield"> + <xslo:if test="contains('jxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s"> + <xslo:if test="position() > 1"> + <xslo:choose> + <xslo:when test="contains('jxyz', @code)"> + <xslo:choose> + <xslo:when test="@code = $general_subdivision_subfield"> + <xslo:text> generalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $form_subdivision_subfield"> + <xslo:text> formsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $chronological_subdivision_subfield"> + <xslo:text> chronologicalsubdiv </xslo:text> + </xslo:when> + <xslo:when test="@code = $geographic_subdivision_subfield"> + <xslo:text> geographicsubdiv </xslo:text> + </xslo:when> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:value-of select="substring(' ', 1, 1)"/> + </xslo:otherwise> + </xslo:choose> + </xslo:if> + <xslo:value-of select="."/> + </xslo:if> + </xslo:for-each> + </xslo:variable> + <xslo:value-of select="normalize-space($raw_heading)"/> + </z:index> + </xslo:template> + <xslo:variable name="form_subdivision_subfield">j</xslo:variable> + <xslo:variable name="general_subdivision_subfield">x</xslo:variable> + <xslo:variable name="chronological_subdivision_subfield">y</xslo:variable> + <xslo:variable name="geographic_subdivision_subfield">z</xslo:variable> + <xslo:template mode="index_subject_thesaurus" match="marc:controlfield[@tag='008']"> + <xslo:variable name="thesaurus_code1" select="substring(., 12, 1)"/> + <xslo:variable name="full_thesaurus_code"> + <xslo:choose> + <xslo:when test="$thesaurus_code1 = 'a'"> + <xslo:text>lcsh</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'b'"> + <xslo:text>lcac</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'c'"> + <xslo:text>mesh</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'd'"> + <xslo:text>nal</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'k'"> + <xslo:text>cash</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'n'"> + <xslo:text>notapplicable</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'r'"> + <xslo:text>aat</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 's'"> + <xslo:text>sears</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'v'"> + <xslo:text>rvm</xslo:text> + </xslo:when> + <xslo:when test="$thesaurus_code1 = 'z'"> + <xslo:choose> + <xslo:when test="//marc:datafield[@tag='040']/marc:subfield[@code='f']"> + <xslo:value-of select="//marc:datafield[@tag='040']/marc:subfield[@code='f']"/> + </xslo:when> + <xslo:otherwise> + <xslo:text>notdefined</xslo:text> + </xslo:otherwise> + </xslo:choose> + </xslo:when> + <xslo:otherwise> + <xslo:text>notdefined</xslo:text> + </xslo:otherwise> + </xslo:choose> + </xslo:variable> + <z:index name="Subject-heading-thesaurus:w"> + <xslo:value-of select="$full_thesaurus_code"/> + </z:index> + </xslo:template> +</xslo:stylesheet> -- 1.7.10