0d428601615fc3dc7f809d1bf2ff003613466dfb
[idzebra-moved-to-github.git] / examples / marcxml / MARC21slim2INDEX.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- 
3    Copyright (C) 1995-2006
4    Index Data ApS
5
6 This file is part of the Zebra server.
7
8 Zebra is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
11 version.
12
13 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Zebra; see the file LICENSE.zebra.  If not, write to the
20 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 02111-1307, USA.
22 -->
23
24 <xsl:stylesheet 
25     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
26     xmlns:z="http://indexdata.com/zebra-2.0" 
27     xmlns:marc="http://www.loc.gov/MARC21/slim" 
28     version="1.0">
29
30   <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
31
32   <!-- disable all default text node output -->
33   <xsl:template match="text()"/>
34
35   <xsl:template match="/">
36     <xsl:if test="marc:collection">
37       <collection>
38          <xsl:apply-templates select="marc:collection/marc:record"/>
39        </collection>
40     </xsl:if>
41     <xsl:if test="marc:record">
42        <xsl:apply-templates select="marc:record"/>
43     </xsl:if>
44   </xsl:template>
45
46
47   <!-- match on marcxml record -->
48   <xsl:template match="marc:record">                
49     <xsl:variable name="leader" select="marc:leader"/>
50     <xsl:variable name="leader5" select="substring($leader,6,1)"/>
51     <xsl:variable name="type">
52       <xsl:choose>
53          <xsl:when test="$leader5='d'">delete</xsl:when>
54          <xsl:otherwise>update</xsl:otherwise>
55       </xsl:choose>
56     </xsl:variable>
57     <xsl:variable name="leader6" select="substring($leader,7,1)"/>
58     <xsl:variable name="leader7" select="substring($leader,8,1)"/>
59     <xsl:variable name="controlField001" 
60                   select="normalize-space(marc:controlfield[@tag='001'])"/>
61     <xsl:variable name="controlField008" 
62                   select="normalize-space(marc:controlfield[@tag='008'])"/>
63
64      <xsl:variable name="typeOf008">
65        <xsl:choose>
66          <xsl:when test="$leader6='a'">
67            <xsl:choose>
68              <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d'
69                              or $leader7='m'">BK</xsl:when>
70              <xsl:when test="$leader7='b' or $leader7='i' 
71                              or $leader7='s'">SE</xsl:when>
72            </xsl:choose>
73          </xsl:when>
74          <xsl:when test="$leader6='t'">BK</xsl:when>
75          <xsl:when test="$leader6='p'">MM</xsl:when>
76          <xsl:when test="$leader6='m'">CF</xsl:when>
77          <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
78          <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' 
79                          or $leader6='r'">VM</xsl:when>
80          <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' 
81                          or $leader6='j'">MU</xsl:when>
82        </xsl:choose>
83      </xsl:variable>
84
85      <z:record z:id="{$controlField001}" type="{$type}">
86
87
88        <!-- <xsl:attribute name="id"></xsl:attribute> -->
89        <!-- <xsl:attribute name="type">update</xsl:attribute> -->
90        <!-- <xsl:attribute name="rank"></xsl:attribute> -->
91
92        <xsl:call-template name="bib1_rules"/>
93      </z:record>
94    </xsl:template>
95
96    <xsl:template name="bib1_rules">
97        <!-- att 1               Personal-name -->
98        <!-- att 2               Corporate-name -->
99        <!-- att 3               Conference-name -->
100        <!-- att 4               Title -->
101        <xsl:call-template name="Title"/>
102        <!-- att 5               Title-series -->
103        <!-- att 6               Title-uniform -->
104        <!-- att 7               ISBN -->
105        <xsl:call-template name="ISBN"/>
106        <!-- att 8               ISSN -->
107        <xsl:call-template name="ISSN"/>
108        <!-- att 9               LC-card-number -->
109        <!-- att 10              BNB-card-number -->
110        <!-- att 11              BGF-number -->
111        <!-- att 12              Local-number -->
112        <!-- att 13              Dewey-classification -->
113        <!-- att 14              UDC-classification -->
114        <!-- att 15              Bliss-classification -->
115        <!-- att 16              LC-call-number -->
116        <!-- att 17              NLM-call-number -->
117        <!-- att 18              NAL-call-number -->
118        <!-- att 19              MOS-call-number -->
119        <!-- att 20              Local-classification -->
120        <!-- att 21              Subject-heading -->
121        <xsl:call-template name="Subject-heading"/>
122        <!-- att 22              Subject-Rameau -->
123        <!-- att 23              BDI-index-subject -->
124        <!-- att 24              INSPEC-subject -->
125        <!-- att 25              MESH-subject -->
126        <!-- att 26              PA-subject -->
127        <!-- att 27              LC-subject-heading -->
128        <!-- att 28              RVM-subject-heading -->
129        <!-- att 29              Local-subject-index -->
130        <!-- att 30              Date -->
131        <!-- att 31              Date-of-publication -->
132        <!-- att 32              Date-of-acquisition -->
133        <!-- att 33              Title-key -->
134        <!-- att 34              Title-collective -->
135        <!-- att 35              Title-parallel -->
136        <!-- att 36              Title-cover -->
137        <!-- att 37              Title-added-title-page -->
138        <!-- att 38              Title-caption -->
139        <!-- att 39              Title-running -->
140        <!-- att 40              Title-spine -->
141        <!-- att 41              Title-other-variant -->
142        <!-- att 42              Title-former -->
143        <!-- att 43              Title-abbreviated -->
144        <!-- att 44              Title-expanded -->
145        <!-- att 45              Subject-precis -->
146        <!-- att 46              Subject-rswk -->
147        <!-- att 47              Subject-subdivision -->
148        <!-- att 48              Number-natl-biblio -->
149        <!-- att 49              Number-legal-deposit -->
150        <!-- att 50              Number-govt-pub -->
151        <!-- att 51              Number-music-publisher -->
152        <!-- att 52              Number-db -->
153        <!-- att 53              Number-local-call -->
154        <!-- att 54              Code-language -->
155        <!-- att 55              Code-geographic -->
156        <!-- att 56              Code-institution -->
157        <!-- att 57              Name-and-title -->      
158        <!-- att 58              Name-geographic -->
159        <!-- att 59              Place-publication -->
160        <!-- att 60              CODEN -->
161        <!-- att 61              Microform-generation -->
162        <!-- att 62              Abstract -->
163        <xsl:call-template name="Abstract"/>
164        <!-- att 63              Note -->
165        <!-- att 1000            Author-title -->
166        <xsl:call-template name="Author-title"/>
167        <!-- att 1001            Record-type -->
168        <!-- att 1002            Name -->
169        <!-- att 1003            Author -->
170        <xsl:call-template name="Author"/>
171        <!-- att 1004            Author-name-personal -->
172        <xsl:call-template name="Author-name-personal"/>
173        <!-- att 1005            Author-name-corporate -->
174        <xsl:call-template name="Author-name-corporate"/>
175        <!-- att 1006            Author-name-conference -->
176        <xsl:call-template name="Author-name-conference"/>
177        <!-- att 1007            Identifier-standard -->
178        <!-- att 1008            Subject-LC-childrens -->
179        <!-- att 1009            Subject-name-personal -->
180        <!-- att 1010            Body-of-text -->
181        <!-- att 1011            Date/time-added-to-db -->
182        <!-- att 1012            Date/time-last-modified -->
183        <!-- att 1013            Authority/format-id -->
184        <!-- att 1014            Concept-text -->
185        <!-- att 1015            Concept-reference -->
186        <!-- att 1016            Any -->
187        <!-- att 1017            Server-choice -->
188        <!-- att 1018            Publisher -->
189        <!-- att 1019            Record-source -->
190        <!-- att 1020            Editor -->
191        <!-- att 1021            Bib-level -->
192        <!-- att 1022            Geographic-class -->
193        <!-- att 1023            Indexed-by -->
194        <!-- att 1024            Map-scale -->
195        <!-- att 1025            Music-key -->
196        <!-- att 1026            Related-periodical -->
197        <!-- att 1027            Report-number -->
198        <!-- att 1028            Stock-number -->
199        <!-- att 1030            Thematic-number -->
200        <!-- att 1031            Material-type -->
201        <!-- att 1032            Doc-id -->
202        <!-- att 1033            Host-item -->
203        <!-- att 1034            Content-type -->
204        <!-- att 1035            Anywhere -->
205        <!-- att 1036            Author-Title-Subject -->
206    </xsl:template>
207
208    <!-- ATTRIBUTE SET BIB-1 (Z39.50-1995) SEMANTICS -->
209    <!-- TABLE 2:  USE ATTRIBUTES (CLASSIFIED AND DEFINED) -->
210    <!-- Use   Value  Definition  USMARC tag(s) -->
211
212    <!--
213        Abstract               62  An abbreviated, accurate        520
214                                   representation of a work,
215                                   usually without added
216                                  interpretation or criticism.
217    -->
218    <xsl:template name="Abstract">
219      <xsl:for-each select="marc:datafield[@tag='520']">
220        <z:index name="Abstract:w">
221          <xsl:value-of select="."/>
222        </z:index>
223      </xsl:for-each>
224    </xsl:template>
225    
226    <!--
227        Any                  1016  The record is selected if there
228                                   exists a Use attribute that the
229                                   target supports (and considers
230                                   appropriate - see note 1) such
231                                   that the record would be
232                                   selected if the target were to
233                                   substitute that attribute.
234        Notes:
235         (1) When the origin uses 'any' the intent is that the target
236             locate records via commonly used access points. The target
237             may define 'any' to refer to a selected set of Use
238             attributes corresponding to its commonly used access points.
239         (2) In set terminology: when Any is the Use attribute, the set
240             of records selected is the union of the sets of records
241             selected by each of the (appropriate) Use attributes that
242             the target supports.
243
244    -->
245
246    <!--
247        Anywhere             1035  The record is selected if the
248                                   term value (as qualified by the
249                                   other attributes) occurs anywhere
250                                  in the record.
251
252             Note: A target might choose to support 'Anywhere' only in
253             combination with specific (non-Use) attributes. For example, a
254             target might support 'Anywhere' only in combination with the
255             Relation attribute 'AlwaysMatches' (see below), to locate all
256             records in a database.
257
258        Notes on relationship of Any and Anywhere:
259         (1) A target may support Any but not Anywhere, or vice versa, or
260             both.  However, if a target supports both, then it should
261             exclude 'Anywhere' from the list of Use attributes
262             corresponding to 'Any' (if it does not do so, then the set
263             of records located by 'Any' will be a superset of those
264             located by 'Anywhere').
265         (2) A distinction between the two attributes may be informally
266             expressed as follows: 'anywhere' might result in more
267             expensive searching than 'any'; if the target (and origin)
268             support both 'any' and 'anywhere', if the origin uses 'Any'
269             (rather than 'Anywhere') it is asking the target to locate
270             the term only if it can do so relatively inexpensively.
271
272    -->
273
274    <!--
275        Author-name  1003  A personal or corporate author, 100, 110, 111, 400
276                            or a conference or meeting      410, 411, 700, 710,
277                            name.  (No subject name         711, 800, 810, 811
278                            headings are included.)
279
280    -->
281   <xsl:template name="Author">
282     <xsl:for-each select="marc:datafield[@tag='100']/marc:subfield[@code='a']
283                           | marc:datafield[@tag='110']
284                           | marc:datafield[@tag='111']
285                           | marc:datafield[@tag='400']
286                           | marc:datafield[@tag='410']
287                           | marc:datafield[@tag='700']
288                           | marc:datafield[@tag='710']
289                           | marc:datafield[@tag='711']
290                           | marc:datafield[@tag='800']
291                           | marc:datafield[@tag='810']
292                           | marc:datafield[@tag='811']">
293       <z:index name="Author:w">
294         <xsl:value-of select="."/>
295       </z:index>
296     </xsl:for-each>
297     <xsl:for-each select="marc:datafield[@tag='100']">
298       <z:index name="Author:p">
299         <xsl:value-of select="marc:subfield[@code='a']"/>
300         <xsl:text> </xsl:text>
301         <xsl:value-of select="marc:subfield[@code='d']"/>
302       </z:index>
303     </xsl:for-each>
304   </xsl:template>
305
306    <!--
307 Author-name-and-     1000  A personal or corporate author, 100/2XX, 110/2XX,
308 title                      or a conference or meeting      111/2XX, subfields
309                            name, and the title of the      $a & $t in
310                            item.  (No subject name         following: 400,410,
311                            headings are included.)  The    411, 700, 710, 711,
312                            syntax of the name-title        800, 810, 811
313                            combination is up to the
314                            target, unless used with the
315                            Structure attribute Key (see
316                            below).
317
318    -->
319   <xsl:template name="Author-title">
320     <xsl:if test="marc:datafield[@tag='100']
321                   and marc:datafield[@tag='245']">
322       <z:index name="Author-title:p">
323         <xsl:value-of 
324             select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
325         <xsl:text> </xsl:text>
326         <xsl:value-of 
327             select="marc:datafield[@tag='100']/marc:subfield[@code='d']"/>
328         <xsl:text> </xsl:text>
329         <xsl:value-of 
330             select="marc:datafield[@tag='245']/marc:subfield[@code='a']"/>
331       </z:index>
332     </xsl:if>
333   </xsl:template>
334
335
336    <!--
337 Author-name-         1005  An organization or a group      110, 410, 710, 810
338 corporate                  of persons that is identified
339                            by a particular name. (Differs
340                            from attribute "name-corporate
341                            (2)" in that corporate name
342                            subject headings are not
343                            included.)
344
345    -->
346   <xsl:template name="Author-name-corporate">
347     <xsl:for-each select="marc:datafield[@tag='110']">
348       <z:index name="Author-name-corporate:w">
349         <xsl:value-of select="."/>
350       </z:index>
351     </xsl:for-each>
352   </xsl:template>
353
354    <!--
355 Author-name-         1006  A meeting of individuals or     111, 411, 711, 811
356 conference                 representatives of various
357                            bodies for the purpose of
358                            discussing topics of common
359                            interest. (Differs from
360                            attribute "name-conference
361                            (3)" in that conference name
362                            subject headings are not
363                            included.)
364
365    -->
366   <xsl:template name="Author-name-conference">
367     <xsl:for-each select="marc:datafield[@tag='111']">
368       <z:index name="Author-name-conference:w">
369         <xsl:value-of select="."/>
370       </z:index>
371     </xsl:for-each>
372   </xsl:template>
373
374    <!--
375 Author-name-personal 1004  A person's real name,           100, 400, 700, 800
376                            pseudonym, title of nobility
377                            nickname, or initials.
378                            (Differs from attribute
379                            "name-personal (1)" in that
380                            personal name subject headings
381                            are not included.)
382
383    -->
384
385   <xsl:template name="Author-name-personal">
386     <xsl:for-each select="marc:datafield[@tag='100']">
387       <xsl:for-each select="marc:subfield[@code='a']">
388         <z:index name="Author-name-personal:w">
389           <xsl:value-of select="."/>
390         </z:index>
391       </xsl:for-each>
392     </xsl:for-each>
393     <xsl:for-each select="marc:datafield[@tag='100']">
394       <z:index name="Author-name-personal:p">
395         <xsl:value-of select="marc:subfield[@code='a']"/>
396         <xsl:text> </xsl:text>
397         <xsl:value-of select="marc:subfield[@code='d']"/>
398       </z:index>
399     </xsl:for-each>
400   </xsl:template>
401
402    <!--
403 Author-Title-Subject 1036  An author or a title or a        1XX, 2XX, 4XX,
404                            subject.                         6XX, 7XX, 8XX
405
406             Note: When the Use attribute is Author-name-and-title (1000)
407             the term contains both an author name and a title.  When the
408             Use attribute is Author-Title-Subject (1036), the term
409             contains an author name or a title or a subject.
410
411    -->
412    <!--
413 Body of text         1010  Used in full-text searching to
414                            indicate that the term is to
415                            be searched only in that
416                            portion of the record that the
417                            target considers the body of
418                            the text, as opposed to some
419                            other discriminated part such
420                            as a headline, title, or
421                            abstract.
422
423    -->
424    <!--
425 Classification-Bliss   15  A classification number from
426                            the Bliss Classification,
427                            developed by Henry Evelyn
428                            Bliss.
429
430    -->
431    <!--
432 Classification-Dewey   13  A classification number from    082
433                            the Dewey Decimal
434                            Classification, developed by
435                            Melvyl Dewey.
436
437    -->
438    <!--
439 Classification-        50  A classification number         086
440 government-publication     assigned to a government
441                            document by a government
442                            agency at any level (e.g.,
443                            state, national,
444                            international).
445
446    -->
447    <!--
448 Classification-LC      16  A classification number from    050
449                            the US Library of Congress
450                            Classification.
451
452    -->
453    <!--
454 Classification-local   20  A local classification
455                            number from a system not
456                            specified elsewhere in this
457                            list of attributes.
458
459    -->
460    <!--
461 Classification-NAL     18  A classification number from    070
462                            the US National Agriculture
463                            Library Classification.
464
465    -->
466    <!--
467 Classification-NLM     17  A classification number from    060
468                            the US National Library of
469                            Medicine Classification.
470
471    -->
472    <!--
473 Classification-MOS     19  A classification number from
474                            Mathematics Subject
475                            Classification, compiled
476                            in the Editorial Offices of
477                            Mathematical Reviews and
478                            Zentralblatt fur Mathematik.
479
480    -->
481    <!--
482 Classification-UDC     14  A classification number from    080
483                            Universal Decimal
484                            Classification, a system based
485                            on the Dewey Decimal
486                            Classification.
487
488    -->
489    <!--
490 Code-bib-level       1021  A one-character alphabetic       Leader/07
491                            code indicating the
492                            bibliographic level such as
493                            monograph, serial or collection
494                            of the record.
495
496    -->
497    <!--
498 Code-geographic-area   55  A code that indicates the       043
499                            geographic area(s) that appear
500                            or are implied in the headings
501                            assigned to the item during
502                            cataloging.
503
504    -->
505    <!--
506 Code-geographic-     1022  A code that represents the      052
507 class                      geographic area and if
508                            applicable the geographic
509                            subarea covered by an item.
510                            The codes are derived from
511                            the LC Classification-Class G
512                            and the expanded Cutter number
513                            list.
514
515    -->
516    <!--
517 Code-institution       56  An authoritative-agency         040, 852$a
518                            symbol for an institution
519                            that is the source of the
520                            record or the holding
521                            location.  The code space is
522                            defined by the target.
523
524    -->
525    <!--
526 Code-language          54  A code that indicates the       008/35-37, 041
527                            language of the item.
528                            The codes are defined by the
529                            target.
530
531    -->
532    <!--
533 Code-map-scale       1024  Coded form of cartographic      034
534                            mathematical data, including
535                            scale, projection and/or
536                            coordinates related to the
537                            item.
538
539    -->
540    <!--
541 Code-microform-        61  The code specifying the         007/11
542 generation                 generation of a microform.
543
544    -->
545    <!--
546 Code-record-type     1001  A code that specifies the       Leader/06
547                            characteristics and defines
548                            the components of the record.
549                            The codes are target-specific.
550
551    -->
552    <!--
553 Concept-reference    1015  Used within Z39.50-1988;
554                            included here for historical
555                            reasons but its use is
556                            deprecated.
557
558    -->
559    <!--
560 Concept-text         1014  Used within Z39.50-1988;
561                            included here for historical
562                            reasons but its use is
563                            deprecated.
564
565    -->
566    <!--
567 Content-type         1034  The type of materials           derived value
568                            contained in the item or        from 008/24-27
569                            publication.  For example:
570                            review, catalog, encyclopedia,
571                            directory.
572
573    -->
574    <!--
575 Control number-BNB     10  Character string that uniquely  015
576                            identifies a record in the
577                            British National Bibliography.
578
579    -->
580    <!--
581 Control number-BNF     11  Character string that uniquely  015
582                            identifies a record in the
583                            Bibliotheque Nationale Francais.
584
585    -->
586    <!--
587 Control number-DB      52  Character string that uniquely  015
588                            identifies a record in the
589                            Deutsche Bibliothek.
590
591    -->
592    <!--
593 Control number-LC       9  Character string that uniquely  010, 011
594                            identifies a record in the
595                            Library of Congress database.
596
597    -->
598    <!--
599 Control number-local   12  Character string that uniquely  001, 035
600                            identifies a record in a local
601                            system (i.e., any system that
602                            is not one of the four listed
603                            above).
604
605    -->
606    <!--
607 Date                   30  The point of time at which      005, 008/00-05,
608                            a transaction or event          008/07-10, 260$c,
609                            takes place.                    008/11-14, 033,etc.
610
611    -->
612    <!--
613 Date-publication       31  The date (usually year) in      008/07-10, 260$c
614                            which a document is published.  046, 533$d
615
616    -->
617    <!--
618 Date-acquisition       32  The date when a document was    541$d
619                            acquired.
620
621    -->
622    <!--
623 Date/time added to   1011  The date and time that a        008/00-05
624 database                   record was added to the
625                            database.
626
627    -->
628    <!--
629 Date/time last       1012  The date and time a record      005
630 modified                   was last updated.
631
632    -->
633    <!--
634 Identifier         1013  Used in full-text searching
635 authority/format           to indicate to the target
636                            system the format of the
637                            document that should be
638                            returned to the originating
639                            system.  The attribute carries
640                            not only the format code, but
641                            also the authority (e.g.,
642                            system) that assigned that
643                            code.
644
645    -->
646    <!--
647 Identifier-CODEN       60  A six-character, unique,        030
648                            alphanumeric code assigned
649                            to serial and monographic
650                            publications by the CODEN
651                            section of the Chemical
652                            Abstracts Service.
653
654    -->
655    <!--
656 Identifier-document  1032  A persistent identifier, or
657                            Doc-ID, assigned by a server,
658                            that uniquely identifies a
659                            document on that server.
660
661    -->
662    <!--
663 Identifier-ISBN         7  International Standard Book     020
664                            Number - internationally
665                            agreed upon number that
666                            identifies a book uniquely.
667                            Cf. ANSI/NISO Z39.21 and
668                            ISO 2108.
669
670    -->
671   <xsl:template name="ISBN">
672     <xsl:for-each select="marc:datafield[@tag='020']/marc:subfield[@code='a']">
673       <z:index name="ISBN:n">
674         <xsl:value-of select="."/>
675       </z:index>
676     </xsl:for-each>
677   </xsl:template>
678
679    <!--
680 Identifier-ISSN         8  International Standard Serial   022, 4XX$x,
681                            Number - internationally       7XX$x
682                            agreed upon number that
683                            identifies a serial uniquely.
684                            Cf. ANSI/NISO z39.9 and
685                            ISO 3297.
686
687    -->
688   <xsl:template name="ISSN">
689     <xsl:for-each select="marc:datafield[@tag='022']">
690       <z:index name="ISSN:n">
691         <xsl:value-of select="."/>
692       </z:index>
693     </xsl:for-each>
694   </xsl:template>
695
696    <!--
697 Identifier-legal-      49  The copyright registration      017
698 deposit                    number that is assigned to
699                            an item when the item is
700                            deposited for copyright.
701
702    -->
703    <!--
704 Identifier-local-call  53  Call number (e.g., shelf location)
705                            assigned by a local system
706                            (not a classification number).
707
708    -->
709    <!--
710 Identifier-national-   48  Character string that uniquely  015
711 bibliography               identifies a record in a
712                            national bibliography.
713
714    -->
715    <!--
716 Identifier-publisher-  51  A formatted number assigned     028
717 for-music                  by a publisher to a sound
718                            recording or to printed music.
719
720    -->
721    <!--
722 Identifier-report    1027  A report number assigned to     027, 088
723                            the item. This number could be
724                            the STRN (Standard Technical
725                            Report Number) or another
726                            report number.
727                            Cf. ANSI/NISO Z39.23 and
728                            ISO 10444.
729
730    -->
731    <!--
732 Identifier-standard  1007  Standard numbers such as ISBN,  010, 011, 015, 017,
733                            ISSN, music publishers          018, 020, 022, 023,
734                            numbers, CODEN, etc., that      024, 025, 027, 028,
735                            are indexed together in many    030, 035, 037
736                            online public-access catalogs.
737
738    -->
739    <!--
740 Identifier-stock     1028  A stock number that could be    037
741                            used for ordering the item.
742
743    -->
744    <!--
745 Identifier-thematic  1030  The numeric designation for a   $n in the following:
746                            part/section of a work such as  130, 240, 243, 630,
747                            the serial, opus or thematic    700, 730
748                            index number.
749
750    -->
751    <!--
752 Indexed-by           1023  For serials, a publication      510
753                            in which the serial has been
754                            indexed and/or abstracted.
755
756    -->
757    <!--
758 Material-type        1031  A free-form string, more        derived value from
759                            specific than the one-letter    Leader/06-07, 007,
760                            code in Leader/06, that         008, and 502
761                            describes the material type
762                            of the item, e.g., cassette,
763                            kit, computer database,
764                            computer file.
765
766    -->
767    <!--
768 Music-key            1025  A statement of the key in       $r in the following:
769                            which the music is written.     130, 240, 243, 630,
770                                                            700, 730
771
772    -->
773    <!--
774 Name                 1002  The name of a person, corporate 100, 110, 111, 400,
775                            body, conference, or meeting.   410, 411, 600, 610,
776                            (Subject name headings are      611, 700, 710, 711,
777                            included.)                      800, 810, 811
778
779    -->
780    <!--
781 Name-and-title         57  The name of a person, corporate 100/2XX, 110/2XX,
782                            body, conference, or meeting,   111/2XX, subfields
783                            and the title of an item.       $a & $t in
784                            (Subject name headings are      following: 400,410,
785                            included.)  The syntax of the   411, 600, 610, 611,
786                            name-title combination is up    700, 710, 711, 800,
787                            to the target, unless used      810, 811
788                            with the Structure attribute
789                            Key (see below).
790
791    -->
792    <!--
793 Name-corporate          2  An organization or a group      110, 410, 610, 710,
794                            of persons that is identified   810
795                            by a particular name. (Subject
796                            name headings are included.)
797
798    -->
799    <!--
800 Name-conference         3  A meeting of individuals or     111, 411, 611, 711
801                            representatives of various      811
802                            bodies for the purpose of
803                            discussing topics of common
804                            interest.  (Subject name
805                            headings are included.)
806
807    -->
808    <!--
809 Name-editor          1020  A person who prepared for       100 $a or 700 $a when
810                            publication an item that is     the corresponding $e
811                            not his or her own.             contains value 'ed.'
812
813    -->
814    <!--
815 Name-geographic        58  Name of a country,              651
816                            jurisdiction, region, or
817                            geographic feature.
818
819    -->
820    <!--
821 Name-geographic-place- 59  City or town where an item      008/15-17, 260$a
822 publication                was published.
823
824    -->
825    <!--
826 Name-personal           1  A person's real name,           100, 400, 600, 700,
827                            pseudonym, title of nobility    800
828                            nickname, or initials.
829
830    -->
831    <!--
832 Name-publisher       1018  The organization responsible    260$b
833                            for the publication of the
834                            item.
835
836    -->
837    <!--
838 Note                   63  A concise statement in which    5XX
839                            such information as extended
840                            physical description,
841                            relationship to other works,
842                            or contents may be recorded.
843
844    -->
845    <!--
846 Record-source        1019  The USMARC code or name of the  008/39, 040
847                            organization(s) that created
848                            the original record, assigned
849                            the USMARC content designation
850                            and transcribed the record into
851                            machine-readable form, or
852                            modified the existing USMARC
853                            record; the cataloging source.
854
855    -->
856    <!--
857 Server-choice        1017  The target substitutes one or
858                            more access points.  The origin
859                            leaves the choice to the target.
860
861        Notes on relationship of Any and Server-choice:
862         (1) When the origin uses 'Server-choice' it is asking the target
863             to select one or more access points, and to use its best
864             judgment in making that selection.  When 'Any' is used,
865             there is no selection process involved; the target is to
866             apply all of the (appropriate) supported Use attributes.
867             The origin is asking the target to make a choice of access
868             points.
869         (2) The target might support 'Any' and not 'Server-choice', or
870             vice versa, or both.  If the target supports both, when the
871             origin uses 'Server-choice', the target might choose 'Any';
872             however, it might choose any other Use attribute.
873
874    -->
875    <!--
876 Subject                21  The primary topic on which a    600, 610, 611, 630,
877                            work is focused.                650, 651, 653, 654,
878                                                            655, 656, 657, 69X
879
880    -->
881   <xsl:template name="Subject-heading">
882     <xsl:for-each select="marc:datafield[@tag='600']
883                           |marc:datafield[@tag='610']
884                           |marc:datafield[@tag='611']
885                           |marc:datafield[@tag='630']
886                           |marc:datafield[@tag='650']
887                           |marc:datafield[@tag='651']
888                           |marc:datafield[@tag='653']
889                           |marc:datafield[@tag='654']
890                           |marc:datafield[@tag='655']
891                           |marc:datafield[@tag='656']
892                           |marc:datafield[@tag='657']">
893       <z:index name="Subject-heading:w">
894         <xsl:value-of select="."/>
895       </z:index>
896     </xsl:for-each>
897     <xsl:for-each select="marc:datafield[@tag='600']
898                           |marc:datafield[@tag='650']
899                           |marc:datafield[@tag='651']
900                           |marc:datafield[@tag='653']">
901       <z:index name="Subject-heading:w">
902         <xsl:value-of select="."/>
903       </z:index>
904     </xsl:for-each>
905   </xsl:template>
906
907    <!--
908 Subject-BDI            23  Subject headings from
909                            Bibliotek Dokumentasjon
910                            Informasjon - a controlled
911                            subject vocabulary used and
912                            maintained by the five Nordic
913                            countries (Denmark, Finland,
914                            Iceland, Norway, and Sweden).
915
916    -->
917    <!--
918 Subject-INSPEC         24  Subject headings from           600i2, 610i2,
919                            Information Services for the    611i2, 630i2,
920                            Physics and Engineering         650i2, 651i2
921                            Communities - the Information
922                            Services Division of the
923                            Institution of Electrical
924                            Engineers.
925
926    -->
927    <!--
928 Subject-LC             27  Subject headings from           600i0, 610i0,
929                            US Library of Congress          611i0, 630i0,
930                            Subject Headings.               650i0, 651i0
931
932    -->
933    <!--
934 Subject-LC-          1008  Subject headings, for use       600i1, 610i1,
935 children's                 with children's literature,     611i1, 630i1,
936                            that conform to the             650i1, 651i1
937                            formulation guidelines in
938                            the "AC Subject Headings"
939                            section of the Library of
940                            Congress Subject Headings.
941
942    -->
943    <!--
944 Subject-local          29  Subjects headings defined
945                            locally.
946
947    -->
948    <!--
949 Subject-MESH           25  Subject headings from           600i2, 610i2,
950                            Medical Subject Headings -     611i2, 630i2,
951                            maintained by the US National   650i2, 651i2
952                            Library of Medicine.
953
954    -->
955    <!--
956 Subject-name-        1009  A person's real name,           600
957 personal                   pseudonym, title of nobility
958                            nickname, or initials that
959                            appears in a subject heading.
960
961    -->
962    <!--
963 Subject-PA             26  Subject headings from           600i2, 610i2,
964                            Thesaurus of Psychological      611i2, 630i2,
965                            Index Terms - maintained       650i2, 651i2
966                            by the Retrieval Services Unit
967                            of the American Psychological
968                            Association.
969
970    -->
971    <!--
972 Subject-PRECIS         45  Subject headings from
973                            PREserved Context Index
974                            System - a string of indexing
975                            terms set down in a prescribed
976                            order, each term being preceded
977                            by a manipulation code which
978                            governs the production of
979                            pre-coordinated subject index
980                            entries under selected terms -
981                            maintained by the British
982                            Library.
983
984    -->
985    <!--
986 Subject-RAMEAU         22  Subject headings from
987                            Repertoire d'authorite de
988                            matieres encyclopedique
989                            unifie - maintained by the
990                            Bibliotheque Nationale
991                            (France).
992    -->
993    <!--
994 Subject-RSWK           46  Subject headings from
995                            Regeln fur den
996                            Schlagwortkatalog -
997                            maintained by the Deutsches
998                            Bibliotheksinstitut.
999
1000    -->
1001    <!--
1002 Subject-RVM            28  Subject headings from           600i6, 610i6,
1003                            Repertoire des vedettes-        611i6, 630i6,
1004                            matiere - maintained by the    650i6, 651i6
1005                            Bibliotheque de l'Universite
1006                            de Laval.
1007
1008    -->
1009    <!--
1010 Subject-subdivision    47  An extension to a subject       6XX$x, 6XX$y,
1011                            heading indicating the form,    6XX$z
1012                            place, period of time treated,
1013                            or aspect of the subject
1014                            treated.
1015
1016    -->
1017    <!--
1018 Title                   4  A word, phrase, character,      130, 21X-24X, 440,
1019                            or group of characters,         490, 730, 740, 830,
1020                            normally appearing in an item,  840, subfield $t
1021                            that names the item or the      in the following:
1022                            work contained in it.           400, 410, 410, 600,
1023                                                            610, 611, 700, 710,
1024                                                            711, 800, 810, 811
1025
1026    -->
1027   <xsl:template name="Title">
1028     <xsl:for-each select="marc:datafield[@tag='245']/marc:subfield[@code='a']">
1029       <z:index name="Title:w">
1030         <xsl:value-of select="."/>
1031       </z:index>
1032     </xsl:for-each>
1033   </xsl:template>
1034
1035
1036    <!--
1037 Title-abbreviated      43  Shortened form of the title;    210, 211 (obs.),
1038                            either assigned by national     246
1039                            centers under the auspices of
1040                            the International Serials Data
1041                            System, or a title (such as an
1042                            acronym) that is popularly
1043                            associated with the item.
1044
1045    -->
1046    <!--
1047 Title-added-title-page 37  A title on a title page         246i5
1048                            preceding or following the
1049                            title page chosen as the basis
1050                            for the description of the
1051                            item.  It may be more general
1052                            (e.g., a series title page),
1053                            or equally general (e.g., a
1054                            title page in another
1055                            language).
1056
1057    -->
1058    <!--
1059 Title-caption          38  A title given at the beginning  246i6
1060                            of the first page of the text.
1061
1062    -->
1063    <!--
1064 Title-collective       34  A title proper that is an       243
1065                            inclusive title for an item
1066                            containing several works.
1067
1068    -->
1069    <!--
1070 Title-cover            36  The title printed on the        246i4
1071                            cover of an item as issued.
1072
1073    -->
1074    <!--
1075 Title-expanded         44  An expanded (or augmented)      214 (obs.), 246
1076                            title has been enlarged with
1077                            descriptive words by the
1078                            cataloger to provide
1079                            additional indexing and
1080                            searching capabilities.
1081
1082    -->
1083    <!--
1084 Title-former           42  A former title or title         247, 780
1085                            variation when one
1086                            bibliographic record
1087                            represents all issues of
1088                            a serial that has changed
1089                            title.
1090
1091    -->
1092    <!--
1093 Title-host-item      1033  The title of the item            773$t
1094                            containing the part
1095                            described in the record, for
1096                            example, a journal title
1097                            when the record describes an
1098                            article in the journal.
1099
1100    -->
1101    <!--
1102 Title-key              33  The unique name assigned to     222
1103                            a serial by the International
1104                            Serials Data System (ISDS).
1105
1106    -->
1107    <!--
1108 Title-other-variant    41  A variation from the title      212 (obs.), 246i3,
1109                            page title appearing elsewhere  247, 740
1110                            in the item (e.g., a variant
1111                            cover title, caption title,
1112                            running title, or title from
1113                            another volume) or in another
1114                            issue.
1115
1116    -->
1117    <!--
1118 Title-parallel         35  The title proper in another     246i1
1119                            language and/or script.
1120
1121    -->
1122    <!--
1123 Title-related-       1026  Serial titles related to this   247, 780, 785
1124 periodical                 item, either the immediate
1125                            predecessor or the immediate
1126                            successor.
1127
1128    -->
1129    <!--
1130 Title-running          39  A title, or abbreviated title,  246i7
1131                            that is repeated at the head
1132                            or foot of each page or leaf.
1133
1134    -->
1135    <!--
1136 Title-series            5  Collective title applying to    440, 490, 830, 840,
1137                            a group of separate, but        subfield $t in the
1138                            related, items.                 following: 400,410,
1139                                                            411, 800, 810, 811
1140
1141    -->
1142    <!--
1143 Title-spine            40  A title appearing on the        246i8
1144                            spine of an item.
1145
1146    -->
1147    <!--
1148 Title-uniform           6  The particular title by which   130, 240, 730,
1149                            a work is to be identified      subfield $t in the
1150                            for cataloging purposes.        following: 700,710,
1151                                                            711
1152 -->
1153
1154
1155
1156
1157 </xsl:stylesheet>