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