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