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