authorities indexing - MAJOR changes

For DOM indexing, added index_matching_heading option
to create indexes for matching an entire authority
heading -- the index works by indexing a heading
such

150 $aCars$xElectric$zEngland$vScience fiction

as something like

"cars generalsubdiv electric geographicsubdiv england
formsubdiv science fiction"

Also started adjust names of some indexes to conform
to languaged used in the MARC21 and UNIMARC standards, e.g.,

"See" => "See-from"
"See-also" => "See-also-from"
"Conference-name-heading" => "Meeting-name-heading"

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-02-07 00:11:33 -06:00 committed by Joshua Ferraro
parent 1c0401e867
commit 32cf2af700
7 changed files with 1117 additions and 151 deletions

View File

@ -3,169 +3,93 @@ name bib1
reference Bib-1
att 9000 authtype
att 12 Local-Number
att 9038 Descriptive-cataloging-rules
att 9039 Encoding-level
att 9040 Heading-use-main-or-added-entry
att 9041 Heading-use-series-added-entry
att 9042 Heading-use-subject-added-entry
att 9043 Kind-of-record
att 9046 Record-status
att 9050 Subject-heading-thesaurus
# Personal Name
att 1 Personal-name
att 9001 Personal-name-heading
att 9002 Personal-name-see
att 9003 Personal-name-seealso
att 9002 Personal-name-see-from
att 9003 Personal-name-see-also-from
# Corporate Name
att 2 Corporate-name
att 9004 Corporate-name-heading
att 9005 Corporate-name-see
att 9006 Corporate-name-seealso
att 9005 Corporate-name-see-from
att 9006 Corporate-name-see-also-from
# Meeting Name
att 3 Conference-name
att 9007 Conference-name-heading
att 9008 Conference-name-see
att 9009 Conference-name-seealso
att 4 Title
att 5 Title-series
att 3 Meeting-name
att 9007 Meeting-name-heading
att 9008 Meeting-name-see-from
att 9009 Meeting-name-see-also-from
# Uniform Title
att 6 Title-uniform
att 9010 Title-uniform-heading
att 9011 Title-uniform-see
att 9012 Title-uniform-seealso
att 9011 Title-uniform-see-from
att 9012 Title-uniform-see-also-from
att 7 ISBN
att 8 ISSN
att 9 LC-card-number
att 10 BNB-card-number
att 11 BGF-number
att 12 Local-number
att 13 Dewey-classification
att 14 UDC-classification
att 15 Bliss-classification
att 16 LC-call-number
att 17 NLM-call-number
att 18 NAL-call-number
att 19 MOS-call-number
att 20 Local-classification
att 21 Subject
att 22 Subject-Rameau
att 23 BDI-index-subject
att 24 INSPEC-subject
att 25 MESH-subject
att 26 PA-subject
att 27 LC-subject-heading
att 28 RVM-subject-heading
att 29 Local-subject-index
att 30 Date
att 31 pubdate
att 32 Date-of-acquisition
att 33 Title-key
att 34 Title-collective
att 35 Title-parallel
att 36 Title-cover
att 37 Title-added-title-page
att 38 Title-caption
att 39 Title-running
att 40 Title-spine
att 41 Title-other-variant
att 42 Title-former
att 43 Title-abbreviated
att 44 Title-expanded
att 45 Subject-precis
att 46 Subject-rswk
att 47 Subject-subdivision
att 48 Number-natl-biblio
att 49 Number-legal-deposit
att 50 Number-govt-pub
att 51 Number-music-publisher
att 52 Number-db
att 53 Number-local-call
att 54 ln
att 55 Code-geographic
att 56 Code-institution
att 57 Name-and-title
# Geographic Name
att 58 Name-geographic
att 9016 Name-geographic-heading
att 9017 Name-geographic-see
att 9018 Name-geographic-seealso
# Place-publication, reduced to two chars because limited line length for leader indexing
att 59 pl
att 60 CODEN
att 61 Microform-generation
att 62 Abstract
att 63 Note
att 1000 Author-title
# Record type, reduced to two chars because limited line length for leader indexing
att 1001 rtype
att 1002 Name
att 1003 Author
att 1004 Author-name-personal
att 1005 Author-name-corporate
att 1006 Author-name-conference
att 1007 Identifier-standard
att 1008 Subject-LC-childrens
att 1009 Subject-name-personal
att 1010 Body-of-text
att 1011 date-entered-on-file
att 1012 Date/time-last-modified
att 1013 Authority/format-id
att 1014 Concept-text
att 1015 Concept-reference
att 1016 Any
att 1017 Server-choice
att 1018 Publisher
att 1019 Record-source
att 1020 Editor
att 1021 Bib-level
att 1022 Geographic-class
att 1023 Indexed-by
att 1024 Map-scale
att 1025 Music-key
att 1026 Related-periodical
att 1027 Report-number
att 1028 Stock-number
att 1030 Thematic-number
att 1031 Material-type
att 1032 Doc-id
att 1033 Host-item
att 1034 ctype
att 1035 Anywhere
att 1036 Author-Title-Subject
# Genre form
att 1075 Term-genre-form
att 9027 Term-genre-form-heading
att 9028 Term-genre-form-see
att 9029 Term-genre-form-seealso
# Chronological Term
att 9038 Chronological-term
att 9019 Chronological-term-heading
att 9020 Chronological-term-see-from
att 9021 Chronological-term-see-also-from
# Topical Term
att 1079 Subject-topical
att 9013 Subject-topical-heading
att 9014 Subject-topical-see
att 9015 Subject-topical-seealso
att 9014 Subject-topical-see-from
att 9015 Subject-topical-see-also-from
# Geographic Name
att 58 Name-geographic
att 9016 Name-geographic-heading
att 9017 Name-geographic-see-from
att 9018 Name-geographic-see-also-from
# Genre form
att 1075 Term-genre-form
att 9027 Term-genre-form-heading
att 9028 Term-genre-form-see-from
att 9029 Term-genre-form-see-also-from
# Koha Local-Use Authority Indexes
att 8001 Heading
att 8002 See
att 8003 See-also
# Geographic Term
# non-standard bib1
att 9019 Term-geographic
att 9020 Term-geographic-heading
att 9021 Term-geographic-see
att 9022 Term-geographic-seealso
att 8002 See-from
att 8003 See-also-from
att 8804 Match-heading
att 8805 Match-subdivision
att 8806 Subdivision
att 8807 Subdivision-see-also-from
att 8808 Subdivision-see-from
att 8809 Match-heading-see-from
att 8810 Match-subdivision-see-from
# General Subdivision (defined in att 47)
# att 9023 Subject-subdivision
att 9023 General-subdivision
att 9030 General-subdivision-see-from
att 9031 General-subdivision-see-also-from
# Geographic Subdivision
att 9024 Geographic-subdivision
att 9032 Geographic-subdivision-see-from
att 9033 Geographic-subdivision-see-also-from
# Chronological Subdivision
att 9025 Chronological-subdivision
att 9034 Chronological-subdivision-see-from
att 9035 Chronological-subdivision-see-also-from
# Form Subdivision
att 9026 Form-subdivision
att 9036 Form-subdivision-see-from
att 9037 Form-subdivision-see-also-from

View File

@ -38,6 +38,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
<retrieve name="zebra">
<xslt stylesheet="zebra.xsl"/>
</retrieve>
<retrieve name="index">
<xslt stylesheet="authority-zebra-indexdefs.xsl"/>
</retrieve>
<input>
<marc inputcharset="utf-8"/>
</input>

View File

@ -1,5 +1,11 @@
<?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">v</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</kohaidx:target_index>
@ -47,6 +53,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="100" subfields="abcdefghjklmnopqrstvxyz" subdivisions="vxyz">
<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="vxyz">
<kohaidx:target_index>Personal-name-see-from:w</kohaidx:target_index>
@ -56,6 +66,10 @@
<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="vxyz">
<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="vxyz">
<kohaidx:target_index>Personal-name-see-also-from:w</kohaidx:target_index>
@ -79,6 +93,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="110" subfields="abcdefghklmnoprstvxyz" subdivisions="vxyz">
<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="vxyz">
<kohaidx:target_index>Corporate-name-see-from:w</kohaidx:target_index>
@ -88,6 +106,10 @@
<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="vxyz">
<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="vxyz">
<kohaidx:target_index>Corporate-name-see-also-from:w</kohaidx:target_index>
@ -111,6 +133,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="111" subfields="acdefghjklnpqstvxyz" subdivisions="vxyz">
<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="vxyz">
<kohaidx:target_index>Meeting-name-see-from:w</kohaidx:target_index>
@ -120,6 +146,10 @@
<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="vxyz">
<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="vxyz">
<kohaidx:target_index>Meeting-name-see-also-from:w</kohaidx:target_index>
@ -143,6 +173,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="130" subfields="adfghklmnoprstvxyz" subdivisions="vxyz">
<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="vxyz">
<kohaidx:target_index>Title-uniform-see-from:w</kohaidx:target_index>
@ -152,6 +186,10 @@
<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="vxyz">
<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="vxyz">
<kohaidx:target_index>Title-uniform-see-also-from:w</kohaidx:target_index>
@ -175,6 +213,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="148" subfields="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Chronological-term-see-from:w</kohaidx:target_index>
@ -184,6 +226,10 @@
<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="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Chronological-term-see-also-from:w</kohaidx:target_index>
@ -208,6 +254,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="150" subfields="abvxyz" subdivisions="vxyz">
<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="abvxyz" subdivisions="vxyz">
<kohaidx:target_index>Subject-topical-see-from:w</kohaidx:target_index>
@ -217,6 +267,10 @@
<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="abvxyz" subdivisions="vxyz">
<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="abvxyz" subdivisions="vxyz">
<kohaidx:target_index>Subject-topical-see-also-from:w</kohaidx:target_index>
@ -240,6 +294,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="151" subfields="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Name-geographic-see-from:w</kohaidx:target_index>
@ -249,6 +307,10 @@
<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="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Name-geographic-see-also-from:w</kohaidx:target_index>
@ -272,6 +334,10 @@
<kohaidx:target_index>Heading:p</kohaidx:target_index>
<kohaidx:target_index>Heading:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="155" subfields="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Term-genre-form-see-from:w</kohaidx:target_index>
@ -281,6 +347,10 @@
<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="avxyz" subdivisions="vxyz">
<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="avxyz" subdivisions="vxyz">
<kohaidx:target_index>Term-genre-form-see-also-from:w</kohaidx:target_index>
@ -300,6 +370,10 @@
<kohaidx:target_index>Subdivision:p</kohaidx:target_index>
<kohaidx:target_index>Subdivision:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="180" subfields="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>General-subdivision-see-from:w</kohaidx:target_index>
@ -309,6 +383,10 @@
<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="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>General-subdivision-see-also-from:w</kohaidx:target_index>
@ -328,6 +406,10 @@
<kohaidx:target_index>Subdivision:p</kohaidx:target_index>
<kohaidx:target_index>Subdivision:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="181" subfields="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Geographic-subdivision-see-from:w</kohaidx:target_index>
@ -337,6 +419,10 @@
<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="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Geographic-subdivision-see-also-from:w</kohaidx:target_index>
@ -356,6 +442,10 @@
<kohaidx:target_index>Subdivision:p</kohaidx:target_index>
<kohaidx:target_index>Subdivision:s</kohaidx:target_index>
</kohaidx:index_heading>
<kohaidx:index_match_heading tag="182" subfields="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Chronological-subdivision-see-from:w</kohaidx:target_index>
@ -365,6 +455,10 @@
<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="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Chronological-subdivision-see-also-from:w</kohaidx:target_index>
@ -384,6 +478,10 @@
<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="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Form-subdivision-see-from:w</kohaidx:target_index>
@ -393,6 +491,10 @@
<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="vxyz" subdivisions="vxyz">
<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="vxyz" subdivisions="vxyz">
<kohaidx:target_index>Form-subdivision-see-also-from:w</kohaidx:target_index>

View File

@ -4,6 +4,7 @@
<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">
@ -24,6 +25,7 @@
<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>
@ -930,6 +932,850 @@
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
</xslo:template>
<xslo:template mode="index_match_heading" match="marc:datafield[@tag='100']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='110']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='111']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='130']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='148']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='150']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='151']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='155']">
<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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='180']">
<z:index name="Match-subdivision:p Match-subdivision:s">
<xslo:variable name="raw_heading">
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='181']">
<z:index name="Match-subdivision:p Match-subdivision:s">
<xslo:variable name="raw_heading">
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='182']">
<z:index name="Match-subdivision:p Match-subdivision:s">
<xslo:variable name="raw_heading">
<xslo:for-each select="marc:subfield">
<xslo:if test="contains('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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('vxyz', @code)" name="Match-subdivision:p Match-subdivision:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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='185']">
<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('vxyz', @code)" name="Match-subdivision-see-from:p Match-subdivision-see-from:s">
<xslo:if test="position() &gt; 1">
<xslo:choose>
<xslo:when test="contains('vxyz', @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">v</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">

View File

@ -15,6 +15,7 @@
<xsl:key name="index_control_field_tag" match="kohaidx:index_control_field" use="@tag"/>
<xsl:key name="index_subfields_tag" match="kohaidx:index_subfields" use="@tag"/>
<xsl:key name="index_heading_tag" match="kohaidx:index_heading" use="@tag"/>
<xsl:key name="index_match_heading_tag" match="kohaidx:index_match_heading" use="@tag"/>
<xsl:template match="kohaidx:index_defs">
<xslo:stylesheet version="1.0">
@ -22,6 +23,7 @@
<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">
@ -41,6 +43,7 @@
<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>
@ -49,10 +52,19 @@
<xsl:call-template name="handle-index-control-field"/>
<xsl:call-template name="handle-index-subfields"/>
<xsl:call-template name="handle-index-heading"/>
<xsl:call-template name="handle-index-match-heading"/>
<xsl:apply-templates/>
</xslo:stylesheet>
</xsl:template>
<!-- map kohaidx:var to stylesheet variables -->
<xsl:template match="kohaidx:var">
<xslo:variable>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:value-of select="."/>
</xslo:variable>
</xsl:template>
<xsl:template match="kohaidx:index_subject_thesaurus">
<xsl:variable name="tag"><xsl:value-of select="@tag"/></xsl:variable>
<xsl:variable name="offset"><xsl:value-of select="@offset"/></xsl:variable>
@ -273,6 +285,84 @@
</z:index>
</xsl:template>
<xsl:template name="handle-index-match-heading">
<xsl:for-each select="//kohaidx:index_match_heading[generate-id() = generate-id(key('index_match_heading_tag', @tag)[1])]">
<xslo:template mode="index_match_heading">
<xsl:attribute name="match">
<xsl:text>marc:datafield[@tag='</xsl:text>
<xsl:value-of select="@tag"/>
<xsl:text>']</xsl:text>
</xsl:attribute>
<xsl:for-each select="key('index_match_heading_tag', @tag)">
<xsl:call-template name="handle-one-index-match-heading"/>
</xsl:for-each>
</xslo:template>
</xsl:for-each>
</xsl:template>
<xsl:template name="handle-one-index-match-heading">
<xsl:variable name="indexes">
<xsl:call-template name="get-target-indexes"/>
</xsl:variable>
<z:index>
<xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
<xslo:variable name="raw_heading">
<xslo:for-each select="marc:subfield">
<xslo:if>
<xsl:attribute name="test">
<xsl:text>contains('</xsl:text>
<xsl:value-of select="@subfields"/>
<xsl:text>', @code)</xsl:text>
</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="normalize-space($indexes)"/></xsl:attribute>
<xslo:if test="position() > 1">
<xslo:choose>
<xslo:when>
<xsl:attribute name="test">
<xsl:text>contains('</xsl:text>
<xsl:value-of select="@subdivisions"/>
<xsl:text>', @code)</xsl:text>
</xsl:attribute>
<xslo:choose>
<xslo:when>
<xsl:attribute name="test">
<xsl:text>@code = $general_subdivision_subfield</xsl:text>
</xsl:attribute>
<xslo:text> generalsubdiv </xslo:text>
</xslo:when>
<xslo:when>
<xsl:attribute name="test">
<xsl:text>@code = $form_subdivision_subfield</xsl:text>
</xsl:attribute>
<xslo:text> formsubdiv </xslo:text>
</xslo:when>
<xslo:when>
<xsl:attribute name="test">
<xsl:text>@code = $chronological_subdivision_subfield</xsl:text>
</xsl:attribute>
<xslo:text> chronologicalsubdiv </xslo:text>
</xslo:when>
<xslo:when>
<xsl:attribute name="test">
<xsl:text>@code = $geographic_subdivision_subfield</xsl:text>
</xsl:attribute>
<xslo:text> geographicsubdiv </xslo:text>
</xslo:when>
</xslo:choose>
</xslo:when>
<xslo:otherwise>
<xslo:value-of select="substring(' ', 1, 1)"/> <!-- FIXME surely there's a better way to specify a space -->
</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>
</xsl:template>
<xsl:template name="get-target-indexes">
<xsl:for-each select="kohaidx:target_index">
<xsl:value-of select="." /><xsl:text> </xsl:text>

View File

@ -17,48 +17,48 @@ melm 942$a authtype
# Personal Name
melm 100 Personal-name:w,Personal-name:p,Personal-name:s,Heading:w,Heading:p,Heading:s
melm 100$a Personal-name-heading:w,Personal-name-heading:p,Personal-name-heading:s,Personal-name:w,Personal-name:p,Heading:w,Heading:p,Heading:s
melm 400 Personal-name-see:w,Personal-name-see:p,Personal-name-see:s,See:w,See:p,See:s
melm 500 Personal-name-see-also:w,Personal-name-see-also:p,Personal-name-see-also:s,See-also:w,See-also:p,See-also:s
melm 400 Personal-name-see-from:w,Personal-name-see-from:p,Personal-name-see-from:s,See-from:w,See-from:p,See-from:s
melm 500 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
# Corporate Name
melm 110$a Corporate-name-heading:w,Corporate-name-heading:p,Corporate-name-heading:s,Corporate-name:w,Corporate-name:p,Heading:w,Heading:p,Heading:s
melm 110 Corporate-name:w,Corporate-name:p,Corporate-name:s,Heading:w,Heading:p,Heading:s
melm 410 Corporate-name-see:w,Corporate-name-see:p,Corporate-name-see:s,See:w,See:p,See:s
melm 510 Corporate-name-see-also:w,Corporate-name-see-also:p,Corporate-name-see-also:s,See-also:w,See-also:p,See-also:s
melm 410 Corporate-name-see-from:w,Corporate-name-see-from:p,Corporate-name-see-from:s,See-from:w,See-from:p,See-from:s
melm 510 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
# Meeting Name
melm 111$a Conference-name-heading:w,Conference-name-heading:p,Conference-name-heading:s,Conference-name:w,Conference-name:p,Heading:w,Heading:p,Heading:s
melm 111 Conference-name:w,Conference-name:p,Conference-name:s,Heading:w,Heading:p,Heading:s
melm 411 Conference-name-see:w,Conference-name-see:p,Conference-name-see:s,See:w,See:p,See:s
melm 511 Conference-name-see-also:w,Conference-name-see-also:p,Conference-name-see-also:s,See-also:w,See-also:p,See-also:s
melm 111$a Meeting-name-heading:w,Meeting-name-heading:p,Meeting-name-heading:s,Meeting-name:w,Meeting-name:p,Heading:w,Heading:p,Heading:s
melm 111 Meeting-name:w,Meeting-name:p,Meeting-name:s,Heading:w,Heading:p,Heading:s
melm 411 Meeting-name-see-from:w,Meeting-name-see-from:p,Meeting-name-see-from:s,See-from:w,See-from:p,See-from:s
melm 511 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
# Uniform Title
melm 130$a Title-uniform-heading:w,Title-uniform-heading:p,Title-uniform-heading:s,Title-uniform:w,Title-uniform:p,Heading:w,Heading:p,Heading:s
melm 130 Title-uniform:w,Title-uniform:p,Title-uniform:s,Heading:w,Heading:p,Heading:s
melm 431 Title-uniform-see:w,Title-uniform-see:p,Title-uniform-see:s,See:w,See:p,See:s
melm 531 Title-uniform-see-also:w,Title-uniform-see-also:p,Title-uniform-see-also:s,See-also:w,See-also:p,See-also:s
melm 431 Title-uniform-see-from:w,Title-uniform-see-from:p,Title-uniform-see-from:s,See-from:w,See-from:p,See-from:s
melm 531 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
# Topical Term
melm 150$a Subject-topical-heading:w,Subject-topical-heading:p,Subject-topical-heading:s,Subject-topical:w,Subject-topical:p,Heading:w,Heading:p,Heading:s
melm 150 Subject-topical:w,Subject-topical:p,Subject-topical:s,Heading:w,Heading:p,Heading:s
melm 450 Subject-topical-see:w,Subject-topical-see:p,Subject-topical-see:s,See:w,See:p,See:s
melm 550 Subject-topical-see-also:w,Subject-topical-see-also:p,Subject-topical-see-also:s,See-also:w,See-also:p,See-also:s
melm 450 Subject-topical-see-from:w,Subject-topical-see-from:p,Subject-topical-see-from:s,See-from:w,See-from:p,See-from:s
melm 550 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
# Geographic Name
melm 151$a Name-geographic-heading:w,Name-geographic-heading:w,Name-geographic-heading:s,Name-geographic:w,Name-geographic:p,Heading:w,Heading:p,Heading:s
melm 151 Name-geographic:w,Name-geographic:p,Name-geographic:s,Heading:w,Heading:p,Heading:s
melm 451 Name-geographic-see:w,Name-geographic-see:p,Name-geographic-see:s,See:w,See:p,See:s
melm 551 Name-geographic-see-also:w,Name-geographic-see-also:p,Name-geographic-see-also:s,See-also:w,See-also:p,See-also:s
melm 451 Name-geographic-see-from:w,Name-geographic-see-from:p,Name-geographic-see-from:s,See-from:w,See-from:p,See-from:s
melm 551 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
# Genre/Form Term
melm 155$a Term-genre-form-heading:w,Term-genre-form-heading:p,Term-genre-form-heading:s,Term-genre-form:w,Term-genre-form:p,Heading:w,Heading:p,Heading:s
melm 155 Term-genre-form:w,Term-genre-form:p,Term-genre-form:s,Heading:w,Heading:p,Heading:s
melm 455 Term-genre-form-see:w,Term-genre-form-see:p,Term-genre-form-see:s,See:w,See:p,See:s
melm 555 Term-genre-form-see-also:w,Term-genre-form-see-also:p,Term-genre-form-see-also:s,See-also:w,See-also:p,See-also:s
melm 455 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
melm 555 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
# NOTE: subdivisions management missing from Koha
# General Subdivision
melm 180 Subject-topical-subdivision,Heading:w,Heading:p,Heading:s
melm 180 General-subdivision,Heading:w,Heading:p,Heading:s
# Geographic Subdivision
melm 181 Geographic-subdivision,Heading:w,Heading:p,Heading:s
# Chronological Subdivision

View File

@ -14,6 +14,7 @@
outputcharset="utf-8"/>
</backend>
</retrieval>
<retrieval syntax="xml" name="marcxml"
<retrieval syntax="xml" name="index"/> <!-- allow viewing index entries -->
<retrieval syntax="xml" name="marc"
identifier="info:srw/schema/1/marcxml-v1.1"/>
</retrievalinfo>