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