WARNING: Updates to Index Defs for Authorities
authorJoshua Ferraro <jmf@liblime.com>
Thu, 3 Jan 2008 06:27:32 +0000 (01:27 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 3 Jan 2008 06:28:40 +0000 (00:28 -0600)
This commit is a partial fix to authority control for MARC21,
and better authority handling in general (for UNIMARC too).
Before this patch, authority searching, editing, saving, was
not functioning, or was extremely buggy.

WARNING: You will need to re-index your authority database after
applying this commit.

The following changes have been made:

  * Normalizing record.abs index names (in both MARC21 and UNIMARC)
  * Synching authorities/bib1.att, ccl.properties, AuthoritiesMarc.pm
    with new indexes (UNIMARC too)
  * Clean up biblios/bib1.att (remove duplicate att defs)
  * Clean up authorities-* templates to conform to new styles
  * Fixed search failure when using Default framework (now searches
    All)

Also included are several fixes to the built-in SRU server for
Authority and Biblio, it's recommended that you update your
koha-conf.xml file:

  * adding explain-authorities.xml and explain-biblios.xml
  * adding necessary info to koha-conf.xml to enable SRU/W
  * adding several example XSLT stylesheets, that can be used
    for SRU on-the-fly transformations (to MODS, DC, RDF, etc.)

Still remaining for 3.0 are the following tasks:

  * update MARC21 frameworks (authority and cross-reference bib)
  * update display code/templates in authority results list
  * update search code/templates to utilize index points
  * implement 'grouping' of authtypes for searching (Name, Title, Subject)
  * repair utility to import auths and perform matching
  * repair bibliographic import to match auths and warn if no match

Signed-off-by: Joshua Ferraro <jmf@liblime.com>

19 files changed:
C4/AuthoritiesMarc.pm
etc/koha-conf.xml
etc/zebradb/authorities/etc/bib1.att
etc/zebradb/biblios/etc/bib1.att
etc/zebradb/ccl.properties
etc/zebradb/explain-authorities.xml [new file with mode: 0644]
etc/zebradb/explain-biblios.xml [new file with mode: 0644]
etc/zebradb/marc_defs/marc21/authorities/record.abs
etc/zebradb/marc_defs/unimarc/authorities/record.abs
etc/zebradb/zebra-authorities.cfg
etc/zebradb/zebra-biblios.cfg
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tmpl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl [new file with mode: 0644]

index 26c3640..b353d15 100644 (file)
@@ -199,7 +199,7 @@ sub SearchAuthorities {
         my @authtypecode;
         my @auths=split / /,$authtypecode ;
         foreach my  $auth (@auths){
-            $query .=" \@attr 1=Authority/format-id \@attr 5=100 ".$auth; ##No truncation on authtype
+            $query .=" \@attr 1=authtype \@attr 5=100 ".$auth; ##No truncation on authtype
             push @authtypecode ,$auth;
             $n++;
         }
@@ -217,7 +217,7 @@ sub SearchAuthorities {
                 if (@$tags[$i] eq "mainmainentry") {
                 $attr =" \@attr 1=Heading ";
                 }elsif (@$tags[$i] eq "mainentry") {
-                $attr =" \@attr 1=Heading-Entity ";
+                $attr =" \@attr 1=Heading ";
                 }else{
                 $attr =" \@attr 1=Any ";
                 }
@@ -243,9 +243,7 @@ sub SearchAuthorities {
           $query=$q2;    
         }         
         ## Adding order
-       # I get an error 207 from zebra 'cannot sort according to sequence', so I'm modifying as below - JF
-        #$query=' @or  @attr 7=1 @attr 1=Heading 0 @or  @attr 7=1 @attr 1=Heading-Entity 1'.$query if ($sortby eq "HeadingAsc");
-        #$query=' @or  @attr 7=2 @attr 1=Heading 0 @or  @attr 7=1 @attr 1=Heading-Entity 1'.$query if ($sortby eq "HeadingDsc");
+        #$query=' @or  @attr 7=2 @attr 1=Heading 0 @or  @attr 7=1 @attr 1=Heading 1'.$query if ($sortby eq "HeadingDsc");
        $query=' @or  @attr 7=1 @attr 1=Heading 0'.$query if ($sortby eq "HeadingAsc");
        $query=' @or  @attr 7=2 @attr 1=Heading 0'.$query if ($sortby eq "HeadingDsc");
         
@@ -784,8 +782,13 @@ sub BuildSummary{
 ## give this a Marc record to return summary
   my ($record,$authid,$authtypecode)=@_;
   my $dbh=C4::Context->dbh;
-  my $authref = GetAuthType($authtypecode);
-  my $summary = $authref->{summary};
+  my $summary;
+  # handle $authtypecode is NULL or eq ""
+  if ($authtypecode) {
+       my $authref = GetAuthType($authtypecode);
+       $summary = $authref->{summary};
+  }
+  # FIXME: should use I18N.pm
   my %language;
   $language{'fre'}="Français";
   $language{'eng'}="Anglais";
index a59b9c4..2e671ca 100644 (file)
     <directory>__ZEBRA_DATA_DIR__/biblios</directory>
     <config>__ZEBRA_CONF_DIR__/zebra-biblios.cfg</config>
     <cql2rpn>__ZEBRA_CONF_DIR__/pqf.properties</cql2rpn>
+     <!-- <docpath>xsl</docpath> -->
+     <!-- <stylesheet>xsl/default.xsl</stylesheet> -->
+     <!-- <maximumrecordsize>2000000</maximumrecordsize> -->
+     <retrievalinfo>
+       <retrieval syntax="usmarc" name="F"/>
+       <retrieval syntax="usmarc" name="B"/>
+       </retrieval>
+       <retrieval syntax="xml" name="marcxml"
+                  identifier="info:srw/schema/1/marcxml-v1.1">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="dc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="mods">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="rdfdc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="utils">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/>
+         </backend>
+       </retrieval>
+     </retrievalinfo>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude">
+      <xi:fallback>
+      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+          <serverInfo>
+            <host>__DB_HOST__</host>
+            <port>9999</port>
+            <database>biblios</database>
+          </serverInfo>
+        </explain>
+      </xi:fallback>
+    </xi:include>
 </server>
 <serverinfo id="biblioserver">
         <ccl2rpn>__ZEBRA_CONF_DIR__/ccl.properties</ccl2rpn>
 <server id="authorityserver"  listenref="authorityserver" >
     <directory>__ZEBRA_DATA_DIR__/authorities</directory>
     <config>__ZEBRA_CONF_DIR__/zebra-authorities.cfg</config>
+    <cql2rpn>__ZEBRA_CONF_DIR__/pqf.properties</cql2rpn>
+     <!-- <docpath>xsl</docpath> -->
+     <!-- <stylesheet>xsl/default.xsl</stylesheet> -->
+     <!-- <maximumrecordsize>2000000</maximumrecordsize> -->
+     <retrievalinfo>
+       <retrieval syntax="usmarc" name="F"/>
+       <retrieval syntax="usmarc" name="B"/>
+       </retrieval>
+       <retrieval syntax="xml" name="marcxml"
+                  identifier="info:srw/schema/1/marcxml-v1.1">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="dc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2DC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="mods">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2MODS.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="rdfdc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="utils">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="__INTRANET_TMPL_DIR__/prog/en/xslt/MARC21slimUtils.xsl"/>
+         </backend>
+       </retrieval>
+     </retrievalinfo>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude">
+      <xi:fallback>
+      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+          <serverInfo>
+            <host>__DB_HOST__</host>
+            <port>9999</port>
+            <database>authorities</database>
+          </serverInfo>
+        </explain>
+      </xi:fallback>
+    </xi:include>
 </server>
 <serverinfo id="authorityserver">
     <ccl2rpn>__ZEBRA_CONF_DIR__/ccl.properties</ccl2rpn>
  <opacdir>__OPAC_CGI_DIR__/opac</opacdir>
  <opachtdocs>__OPAC_TMPL_DIR__</opachtdocs>
  <intrahtdocs>__INTRANET_TMPL_DIR__</intrahtdocs>
- <includes>__INTRANET_TMPL_DIR__/default/en/includes/</includes>
+ <includes>__INTRANET_TMPL_DIR__/prog/en/includes/</includes>
  <logdir>__LOG_DIR__</logdir>
 </config>
 </yazgfs>
index 26f5c29..c6777dc 100644 (file)
-# $Id: bib1.att,v 1.1 2002/10/22 12:51:09 adam Exp $
-# Bib-1 Attribute Set
+# Bib-1 Attribute Set for Authority records
 name bib1
 reference Bib-1
-#include gils.att
-
-
-att 1               Personal-name
-att 2               Corporate-name
-att 3               Conference-name
-att 4               Title
-att 5               Title-series
-att 6               Title-uniform
-att 7               ISBN
-att 8               ISSN
-att 9               LC-card-number
-att 10              BNB-card-number
-att 11              BGF-number
-att 12              Local-number
-att 13              Dewey-classification
-att 14              UDC-classification
-att 15              Bliss-classification
-att 16              LC-call-number
-att 17              NLM-call-number
-att 18              NAL-call-number
-att 19              MOS-call-number
-att 20              Local-classification
-att 21              Subject
-att 22              Subject-Rameau
-att 23              BDI-index-subject
-att 24              INSPEC-subject
-att 25              MESH-subject
-att 26              PA-subject
-att 27              LC-subject-heading
-att 28              RVM-subject-heading
-att 29              Local-subject-index
-att 30              Date
-att 31              pubdate
-att 32              Date-of-acquisition
-att 33              Title-key
-att 34              Title-collective
-att 35              Title-parallel
-att 36              Title-cover
-att 37              Title-added-title-page
-att 38              Title-caption
-att 39              Title-running
-att 40              Title-spine
-att 41              Title-other-variant
-att 42              Title-former
-att 43              Title-abbreviated
-att 44              Title-expanded
-att 45              Subject-precis
-att 46              Subject-rswk
-att 47              Subject-subdivision
-att 48              Number-natl-biblio
-att 49              Number-legal-deposit
-att 50              Number-govt-pub
-att 51              Number-music-publisher
-att 52              Number-db
-att 53              Number-local-call
-att 54              ln
-att 55              Code-geographic
-att 56              Code-institution
-att 57              Name-and-title
-att 58              Name-geographic
-att 59              pl
-att 60              CODEN
-att 61              Microform-generation
-att 62              Abstract
-att 63              Note
-att 1000            Author-title
-# Record-type
-att 1001            rtype
-att 1002            Name
-att 1003            Author
-att 1004            Author-name-personal
-att 1005            Author-name-corporate
-att 1006            Author-name-conference
-att 1007            Identifier-standard
-att 1008            Subject-LC-childrens
-att 1009            Subject-name-personal
-att 1010            Body-of-text
-att 1011            dateaddeddb
-att 1012            Date/time-last-modified
-att 1013            Authority/format-id
-att 1014            Concept-text
-att 1015            Concept-reference
-att 1016            Any 
-att 1017            Server-choice
-att 1018            Publisher
-att 1019            Record-source
-att 1020            Editor
-att 1021            Bib-level
-att 1022            Geographic-class
-att 1023            Indexed-by
-att 1024            Map-scale
-att 1025            Music-key
-att 1026            Related-periodical
-att 1027            Report-number
-att 1028            Stock-number
-att 1030            Thematic-number
-att 1031            Material-type
-att 1032            Doc-id
-att 1033            Host-item
-att 1034            ctype
-att 1035            Anywhere
-att 1036            Author-Title-Subject
-
-# Koha Specific Stuff
-att 8001                       Extent
-att 8910                       Koha-Auth-Number
-
-# record length according to the leader
-att 8005                       llength
-#att 8002                      Summary 
-#att 8900                      Call-Number
-
-# Usually Target Audience 008/22
-att 8822                       ta
-
-# Usually Form of item 008/23
-att 8823                       ff8-23
-
-# Usually Nature of contents 008/24-27
-att 8824                       ff8-24-27
-
-# Usually Content-type, also Form of item for maps 008/29
-att 8829                       ff8-29
-
-# Usually Literary Form 008/33
-att 8833                       lf
-#att 8833                      ff8-33
-
-# Usually Biography, also Special format characteristics for maps 008/34
-att 8834                       bio
-#att 8834                      ff8-34
-
-att 8700                       ff7-00
-att 8701                       ff7-01
-att 8702                       ff7-02
-att 8703                       ff7-01-02
-
-att 9100                       dynixbib-id
-att 9520                       withdrawn
-att 9521                       lost
-att 9522                       onloan
-
-att 9523                       popularity
-# Author-personal-bibliography - lastname,firstname in 100$a
-att 8900               Author-personal-bibliography
-# Author-in-order - firstname lastname in 245$c statement of responsibility
-att 8901               Author-in-order
-
-
-# Koha Specific Stuff
-
-att 8900                       Call-Number
-att 8800                       date-entered-on-file
-att 8801                       date1
-att 8802                       date2
-att 8805                       language
-att 8822                       ff8-22
-att 8833                       ff8-33
-att 8834                       ff8-34
-
-att 8700                       ff7-00
-att 8701                       ff7-01
-att 8702                       ff7-02
-
-######################################################################
-######################################################################
-#Authorities
-######################################################################
-######################################################################
-
-#######################################
-#Coded Entries
-#######################################
-
-#used in $5 for relationships
-#Coded field
-
-att 9200               Auth-RelationShip
-
-#used in $2 should contain authtypecode if authority is an other type
-#Coded field
-att 9210               Auth-Internal-authtype
-
-#used in $3 should contain authid if authority is an other type
-#Coded field
-att 9220               Auth-Internal-LN
-
-#used in $7 should contain Script language 
-#Coded field (Greek, and other alphabets)
-att 9230               Auth-Script
-
-#used in $8 should contain Entity language 
-#Coded field (Greek, and other alphabets)
-att 9240               Auth-Language
-
-#BUGFIX ??
-# Maybe there could be a problem to define so few types.
-# We could have MANY undesired results not to have a specialization by Authtype
-# It can be added
-
-#used in $2 should contain authtypecode if authority is an other type
-#Coded field
-#Can be found also by Authority/format-id
-att 9250               Authority/format-id
-
-
-######################################################
-# Global search (Any AuthorityType)
-######################################################
-att 9001               Heading
-att 9002               See
-att 9003               See-also
-att 9004               Parallel
-att 9005               Heading-entity
-att 9006               See-Entity
-att 9007               See-also-Entity
-att 9008               Parallel-Entity
-att 9009               Subject-heading
-att 9000               Name-geographic
-
-######################################################
-# Main Entries
-######################################################
-
-att 9011               Personal-heading
-att 9012               Corporate-heading
-att 9013               Conference-heading
-att 9014               Place-heading
-att 9015               Trademark-heading
-att 9016               Title-uniform
-att 9017               Collective-Title-uniform
-att 9018               Place-Access
-#att 9019               Subject-heading is already defined
-#att 9010               Name-geographic
-
-att 9021               Personal-see
-att 9022               Corporate-see
-att 9023               Conference-see
-att 9024               Place-see
-att 9025               Trademark-see
-att 9026               Title-uniform-see
-att 9027               Collective-Title-uniform-see
-att 9028               Place-Access-see
-att 9029               Subject-see
-att 9020               Name-geographic-see
-
-att 9031               Personal-see-also
-att 9032               Corporate-see-also
-att 9033               Conference-see-also
-att 9034               Place-see-also
-att 9035               Trademark-see-also
-att 9036               Title-uniform-see-also
-att 9037               Collective-Title-uniform-see-also
-att 9038               Place-Access-see-also
-att 9039               Subject-see-also
-att 9030               Name-geographic-see-also
-
-att 9041               Personal-parallel
-att 9042               Corporate-parallel
-att 9043               Conference-parallel
-att 9044               Place-parallel
-att 9045               Trademark-parallel
-att 9046               Title-uniform-parallel
-att 9047               Collective-Title-uniform-parallel
-att 9048               Place-Access-parallel
-att 9049               Subject-parallel
-att 9040               Name-geographic-parallel
-
-
-######################################
-#Whole record
-######################################
-att 9101               Personal-heading-entity
-att 9102               Corporate-heading-entity
-att 9103               Conference-heading-entity
-att 9104               Place-heading-entity
-att 9105               Trademark-heading-entity
-att 9106               Title-uniform-entity
-att 9107               Collective-Title-uniform-entity
-att 9108               Place-Access-entity
-att 9109               Subject-heading-entity
-att 9130               Name-geographic-entity
-
-att 9111               Personal-see-entity
-att 9112               Corporate-see-entity
-att 9113               Conference-see-entity
-att 9114               Place-see-entity
-att 9115               Trademark-see-entity
-att 9116               Title-see-entity
-att 9117               Collective-Title-uniform-see-entity
-att 9118               Place-Access-see-entity
-att 9119               Subject-see-entity
-
-att 9121               Personal-see-also-entity
-att 9122               Corporate-see-also-entity
-att 9123               Conference-see-also-entity
-att 9124               Place-see-also-entity
-att 9125               Trademark-see-also-entity
-att 9126               Title-see-also-entity
-att 9127               Collective-Title-uniform-see-also-entity
-att 9128               Place-Access-see-also-entity
-att 9129               Subject-see-also-entity
-
-att 9131               Personal-parallel-entity
-att 9132               Corporate-parallel-entity
-att 9133               Conference-parallel-entity
-att 9134               Place-parallel-entity
-att 9135               Trademark-parallel-entity
-att 9136               Title-parallel-entity
-att 9137               Collective-Title-uniform-parallel-entity
-att 9138               Place-Access-parallel-entity
-att 9139               Subject-parallel-entity
-
 
+att 9000    authtype
+# Personal Name
+att 1       Personal-name
+att 9001    Personal-name-heading
+att 9002    Personal-name-see
+att 9003    Personal-name-seealso
+
+# Corporate Name
+att 2       Corporate-name
+att 9004    Corporate-name-heading
+att 9005    Corporate-name-see
+att 9006    Corporate-name-seealso
+
+# Meeting Name
+att 3       Conference-name
+att 9007    Conference-name-heading
+att 9008    Conference-name-see
+att 9009    Conference-name-seealso
+
+att 4       Title
+att 5       Title-series
+
+# Uniform Title
+att 6       Title-uniform
+att 9010    Title-uniform-heading
+att 9011    Title-uniform-see
+att 9012    Title-uniform-seealso
+
+att 7       ISBN
+att 8       ISSN
+att 9       LC-card-number
+att 10      BNB-card-number
+att 11      BGF-number
+att 12      Local-number
+att 13      Dewey-classification
+att 14      UDC-classification
+att 15      Bliss-classification
+att 16      LC-call-number
+att 17      NLM-call-number
+att 18      NAL-call-number
+att 19      MOS-call-number
+att 20      Local-classification
+
+# Topical Term
+att 21      Subject
+att 9013    Subject-heading
+att 9014    Subject-see
+att 9015    Subject-seealso
+
+att 22      Subject-Rameau
+att 23      BDI-index-subject
+att 24      INSPEC-subject
+att 25      MESH-subject
+att 26      PA-subject
+att 27      LC-subject-heading
+att 28      RVM-subject-heading
+att 29      Local-subject-index
+att 30      Date
+att 31      pubdate
+att 32      Date-of-acquisition
+att 33      Title-key
+att 34      Title-collective
+att 35      Title-parallel
+att 36      Title-cover
+att 37      Title-added-title-page
+att 38      Title-caption
+att 39      Title-running
+att 40      Title-spine
+att 41      Title-other-variant
+att 42      Title-former
+att 43      Title-abbreviated
+att 44      Title-expanded
+att 45      Subject-precis
+att 46      Subject-rswk
+att 47      Subject-subdivision
+att 48      Number-natl-biblio
+att 49      Number-legal-deposit
+att 50      Number-govt-pub
+att 51      Number-music-publisher
+att 52      Number-db
+att 53      Number-local-call
+att 54      ln
+att 55      Code-geographic
+att 56      Code-institution
+att 57      Name-and-title
+
+# Geographic Name
+att 58      Name-geographic
+att 9016    Name-geographic-heading
+att 9017    Name-geographic-see
+att 9018    Name-geographic-seealso
+
+# Geographic Term
+# non-standard bib1
+att 9019    Term-geographic
+att 9020    Term-geographic-heading
+att 9021    Term-geographic-see
+att 9022    Term-geographic-seealso
+
+# General Subdivision (defined in att 47)
+# att 9023    Subject-subdivision
+
+# Geographic Subdivision
+att 9024    Geographic-subdivision
+
+# Chronological Subdivision
+att 9025    Chronological-subdivision
+
+# Form Subdivision
+att 9026    Form-subdivision
+
+# Place-publication, reduced to two chars because limited line length for leader indexing
+att 59      pl
+att 60      CODEN
+att 61      Microform-generation
+att 62      Abstract
+att 63      Note
+att 1000    Author-title
+
+# Record type, reduced to two chars because limited line length for leader indexing
+att 1001    rtype
+att 1002    Name
+att 1003    Author
+att 1004    Author-name-personal
+att 1005    Author-name-corporate
+att 1006    Author-name-conference
+att 1007    Identifier-standard
+att 1008    Subject-LC-childrens
+att 1009    Subject-name-personal
+att 1010    Body-of-text
+att 1011    date-entered-on-file
+att 1012    Date/time-last-modified
+att 1013    Authority/format-id
+att 1014    Concept-text
+att 1015    Concept-reference
+att 1016    Any 
+att 1017    Server-choice
+att 1018    Publisher
+att 1019    Record-source
+att 1020    Editor
+att 1021    Bib-level
+att 1022    Geographic-class
+att 1023    Indexed-by
+att 1024    Map-scale
+att 1025    Music-key
+att 1026    Related-periodical
+att 1027    Report-number
+att 1028    Stock-number
+att 1030    Thematic-number
+att 1031    Material-type
+att 1032    Doc-id
+att 1033    Host-item
+att 1034    ctype
+att 1035    Anywhere
+att 1036    Author-Title-Subject
+
+# Koha Local-Use Authority Indexes
+att 8001    Heading
+att 8002    See
+att 8003    See-also
index e4c584b..9b1fe87 100644 (file)
 name bib1
 reference Bib-1
 
-att 1               Personal-name
-att 2               Corporate-name
-att 3               Conference-name
-att 4               Title
-att 5               Title-series
-att 6               Title-uniform
-att 7               ISBN
-att 8               ISSN
-att 9               LC-card-number
-att 10              BNB-card-number
-att 11              BGF-number
-att 12              Local-number
-att 13              Dewey-classification
-att 14              UDC-classification
-att 15              Bliss-classification
-att 16              LC-call-number
-att 17              NLM-call-number
-att 18              NAL-call-number
-att 19              MOS-call-number
-att 20              Local-classification
-att 21              Subject
-att 22              Subject-Rameau
-att 23              BDI-index-subject
-att 24              INSPEC-subject
-att 25              MESH-subject
-att 26              PA-subject
-att 27              LC-subject-heading
-att 28              RVM-subject-heading
-att 29              Local-subject-index
-att 30              copydate
-att 31              pubdate
-att 32              Date-of-acquisition
-att 33              Title-key
-att 34              Title-collective
-att 35              Title-parallel
-att 36              Title-cover
-att 37              Title-added-title-page
-att 38              Title-caption
-att 39              Title-running
-att 40              Title-spine
-att 41              Title-other-variant
-att 42              Title-former
-att 43              Title-abbreviated
-att 44              Title-expanded
-att 45              Subject-precis
-att 46              Subject-rswk
-att 47              Subject-subdivision
-att 48              Number-natl-biblio
-att 49              Number-legal-deposit
-att 50              Number-govt-pub
-att 51              Number-music-publisher
-att 52              Number-db
-att 53              Number-local-call
-att 54              ln
-att 55              Code-geographic
-att 56              Code-institution
-att 57              Name-and-title
-att 58              Name-geographic
-att 59              pl
-att 60              CODEN
-att 61              Microform-generation
-att 62              Abstract
-att 63              Note
-att 1000            Author-title
-# Record-type
-att 1001            rtype
-att 1002            Name
-att 1003            Author
-att 1004            Author-name-personal
-att 1005            Author-name-corporate
-att 1006            Author-name-conference
-att 1007            Identifier-standard
-att 1008            Subject-LC-childrens
-att 1009            Subject-name-personal
-att 1010            Body-of-text
-att 1011            date-entered-on-file
-att 1012            Date/time-last-modified
-att 1013            Authority/format-id
-att 1014            Concept-text
-att 1015            Concept-reference
-att 1016            Any 
-att 1017            Server-choice
-att 1018            Publisher
-att 1019            Record-source
-att 1020            Editor
-att 1021            Bib-level
-att 1022            Geographic-class
-att 1023            Indexed-by
-att 1024            Map-scale
-att 1025            Music-key
-att 1026            Related-periodical
-att 1027            Report-number
-att 1028            Stock-number
-att 1030            Thematic-number
-att 1031            Material-type
-att 1032            Doc-id
-att 1033            Host-item
-att 1034            ctype
-att 1035            Anywhere
-att 1036            Author-Title-Subject
+att 1    Personal-name
+att 2    Corporate-name
+att 3    Conference-name
+att 4    Title
+att 5    Title-series
+att 6    Title-uniform
+att 7    ISBN
+att 8    ISSN
+att 9    LC-card-number
+att 10    BNB-card-number
+att 11    BGF-number
+att 12    Local-number
+att 13    Dewey-classification
+att 14    UDC-classification
+att 15    Bliss-classification
+att 16    LC-call-number
+att 17    NLM-call-number
+att 18    NAL-call-number
+att 19    MOS-call-number
+att 20    Local-classification
+att 21    Subject
+att 22    Subject-Rameau
+att 23    BDI-index-subject
+att 24    INSPEC-subject
+att 25    MESH-subject
+att 26    PA-subject
+att 27    LC-subject-heading
+att 28    RVM-subject-heading
+att 29    Local-subject-index
+att 30    copydate
+att 31    pubdate
+att 32    Date-of-acquisition
+att 33    Title-key
+att 34    Title-collective
+att 35    Title-parallel
+att 36    Title-cover
+att 37    Title-added-title-page
+att 38    Title-caption
+att 39    Title-running
+att 40    Title-spine
+att 41    Title-other-variant
+att 42    Title-former
+att 43    Title-abbreviated
+att 44    Title-expanded
+att 45    Subject-precis
+att 46    Subject-rswk
+att 47    Subject-subdivision
+att 48    Number-natl-biblio
+att 49    Number-legal-deposit
+att 50    Number-govt-pub
+att 51    Number-music-publisher
+att 52    Number-db
+att 53    Number-local-call
+att 54    ln
+att 55    Code-geographic
+att 56    Code-institution
+att 57    Name-and-title
+att 58    Name-geographic
+# Place-publication, reduced to two chars because limited line length for leader indexing
+att 59    pl
+att 60    CODEN
+att 61    Microform-generation
+att 62    Abstract
+att 63    Note
+att 1000    Author-title
+# Record-type, reduced in size because limited line length for leader indexing
+att 1001    rtype
+att 1002    Name
+att 1003    Author
+att 1004    Author-name-personal
+att 1005    Author-name-corporate
+att 1006    Author-name-conference
+att 1007    Identifier-standard
+att 1008    Subject-LC-childrens
+att 1009    Subject-name-personal
+att 1010    Body-of-text
+att 1011    date-entered-on-file
+att 1012    Date/time-last-modified
+att 1013    Authority/format-id
+att 1014    Concept-text
+att 1015    Concept-reference
+att 1016    Any 
+att 1017    Server-choice
+att 1018    Publisher
+att 1019    Record-source
+att 1020    Editor
+att 1021    Bib-level
+att 1022    Geographic-class
+att 1023    Indexed-by
+att 1024    Map-scale
+att 1025    Music-key
+att 1026    Related-periodical
+att 1027    Report-number
+att 1028    Stock-number
+att 1030    Thematic-number
+att 1031    Material-type
+att 1032    Doc-id
+att 1033    Host-item
+att 1034    ctype
+att 1035    Anywhere
+att 1036    Author-Title-Subject
 
 # Koha Local-Use Biblio Indexes
-att 9001                       Control-number
-att 9002                       biblioitemnumber
-att 9003                       totalissues
-att 9004                       cn-bib-source
-att 9005                       cn-bib-sort
-att 9006                       itemtype
-att 9007                       cn-class
-att 9008                       cn-item
-att 9009                       cn-prefix
-att 9010                       cn-suffix
-att 9011                       Suppress
+att 9001    Control-number
+att 9002    biblioitemnumber
+att 9003    totalissues
+att 9004    cn-bib-source
+att 9005    cn-bib-sort
+att 9006    itemtype
+att 9007    cn-class
+att 9008    cn-item
+att 9009    cn-prefix
+att 9010    cn-suffix
+att 9011    Suppress
 
 # Items Index
-att 8001                       withdrawn
-att 8002                       lost
-att 8003                       classification-source
-att 8004                       materials-specified
-att 8005                       damaged
-att 8006                       restricted
-att 8007                       cn-sort
-att 8008                       notforloan
-att 8009                       ccode
-att 8010                       itemnumber
-att 8011                       homebranch
-att 8012                       holdingbranch
-att 8013                       location
+att 8001    withdrawn
+att 8002    lost
+att 8003    classification-source
+att 8004    materials-specified
+att 8005    damaged
+att 8006    restricted
+att 8007    cn-sort
+att 8008    notforloan
+att 8009    ccode
+att 8010    itemnumber
+att 8011    homebranch
+att 8012    holdingbranch
+att 8013    location
 # handled in bib1 attr 1=32
-#att 8014                      Date-of-acquisition
-att 8015                       acqsource
-att 8016                       coded-location-qualifier
-att 8017                       price
-att 8018                       stack
-att 8019                       issues
-att 8020                       renewals
-att 8021                       reserves
-att 8022                       Local-classification
-att 8023                       barcode
-att 8024                       onloan
-att 8025                       datelastseen
-att 8026                       datelastborrowed
-att 8027                       copynumber
-att 8028                       uri
-att 8029                       replacementprice
-att 8030                       replacementpricedate
-att 8031                       itype
+#att 8014    Date-of-acquisition
+att 8015    acqsource
+att 8016    coded-location-qualifier
+att 8017    price
+att 8018    stack
+att 8019    issues
+att 8020    renewals
+att 8021    reserves
+att 8022    Local-classification
+att 8023    barcode
+att 8024    onloan
+att 8025    datelastseen
+att 8026    datelastborrowed
+att 8027    copynumber
+att 8028    uri
+att 8029    replacementprice
+att 8030    replacementpricedate
+att 8031    itype
 
 ## Fixed Fields and other special indexes
-att 9901                       Extent
-att 8910                       Koha-Auth-Number
+att 9901    Extent
+att 8910    Koha-Auth-Number
 # record length according to the leader
-att 9905                       llength
-att 9902                       Summary 
-att 9990                       Call-Number
+att 9905    llength
+att 9902    Summary 
+att 9990    Call-Number
 # Usually Target Audience 008/22
-att 8822                       ta
+att 8822    ta
 # Usually Form of item 008/23
-att 8823                       ff8-23
+att 8823    ff8-23
 # Usually Nature of contents 008/24-27
-att 8824                       ff8-24-27
+att 8824    ff8-24-27
 # Usually Content-type, also Form of item for maps 008/29
-att 8829                       ff8-29
+att 8829    ff8-29
 # Usually Literary Form 008/33
-att 8833                       lf
-#att 8833                      ff8-33
+att 8833    lf
+#att 8833    ff8-33
 # Usually Biography, also Special format characteristics for maps 008/34
-att 8834                       bio
-#att 8834                      ff8-34
-att 8700                       ff7-00
-att 8701                       ff7-01
-att 8702                       ff7-02
-att 8703                       ff7-01-02
+att 8834    bio
+#att 8834    ff8-34
+att 8700    ff7-00
+att 8701    ff7-01
+att 8702    ff7-02
+att 8703    ff7-01-02
 # Author-personal-bibliography - lastname,firstname in 100$a
-att 9900               Author-personal-bibliography
+att 9900    Author-personal-bibliography
 # Author-in-order - firstname lastname in 245$c statement of responsibility
-att 9902               Author-in-order
+att 9902    Author-in-order
index 2fb866c..4fc6b09 100644 (file)
@@ -1,16 +1,16 @@
 # CCL field mappings
 # There are four types of lines in a CCL profile: 
 #  1. qualifier specification
-#      qualifier-name   [  attributeset   ,]  type   =   val   [  attributeset   ,]  type   =   val   ...
+#   qualifier-name   [  attributeset   ,]  type   =   val   [  attributeset   ,]  type   =   val   ...
 # 
 #  2. qualifier alias
-#      q q1 q2 q3
+#   q q1 q2 q3
 #
 #  3. comments
-#      comments begin with #
+#   comments begin with #
 #
 #  4. directives
-#      @   directive    value
+#   @   directive    value
 #
 # see http://indexdata.dk/yaz/doc/tools.tkl#CCL for more details
 #
@@ -20,6 +20,7 @@ term t=l,r  s=al
 # Simple rule for a field called "clean"
 clean t=l,r
 
+###################################################
 ### 1. BIB1 USE ATTRIBUTES MAPPED TO CCL QUALIFIERS
 #
 # SEE http://www.loc.gov/z3950/agency/bib1.html
@@ -244,14 +245,13 @@ callnum Local-classification
 #                           location.  The code space is
 #                           defined by the target.
 Code-institution 1=56
-homebranch Code-institution
 
 #
 #Code-language          54  A code that indicates the       008/35-37, 041
 #                           language of the item.
 #                           The codes are defined by the
 #                           target.
-language          1=54
+language 1=54
 ln language
 
 #Code-map-scale       1024  Coded form of cartographic      034
@@ -273,7 +273,7 @@ ln language
 Record-type 1=1001
 rtype Record-type
 mc-rtype Record-type
-mus 1=1001
+mus Record-type
 
 #Concept-reference    1015  Used within Z39.50-1988;
 #                           included here for historical
@@ -292,7 +292,7 @@ mus 1=1001
 #                           publication.  For example:
 #                           review, catalog, encyclopedia,
 #                           directory.
-Content-type         1=1034 t=b
+Content-type 1=1034 t=b
 ctype Content-type
 
 #Control number-BNB     10  Character string that uniquely  015
@@ -322,6 +322,7 @@ ctype Content-type
 #                           is not one of the four listed
 #                           above).
 Local-number 1=12
+sn Local-number
 
 #Date                   30  The point of time at which      005, 008/00-05,
 #                           a transaction or event          008/07-10, 260$c,
@@ -386,7 +387,7 @@ acqdate Date-of-acquisition
 #                           identifies a book uniquely.
 #                           Cf. ANSI/NISO Z39.21 and
 #                           ISO 2108.
-ISBN         1=7
+ISBN 1=7
 nb ISBN
 
 #Identifier-ISSN         8  International Standard Serial   022, 4XX$x,
@@ -395,7 +396,7 @@ nb ISBN
 #                           identifies a serial uniquely.
 #                           Cf. ANSI/NISO z39.9 and
 #                           ISO 3297.
-ISSN         1=8
+ISSN 1=8
 ns ISSN
 
 #Identifier-legal-      49  The copyright registration      017
@@ -434,9 +435,6 @@ ns ISSN
 #                           are indexed together in many    030, 035, 037
 #                           online public-access catalogs.
 #Identifier-standard  1=1007 4=6
-Local-number  1=12
-#sn Identifier-standard
-sn Local-number
 #
 #Identifier-stock     1028  A stock number that could be    037
 #                           used for ordering the item.
@@ -460,12 +458,7 @@ Stock-number 1=1028
 #                           of the item, e.g., cassette,
 #                           kit, computer database,
 #                           computer file.
-Material-type  1=1031
-#collection Material-type
-#collection-code Material-type
-#mt Material-type
-#mc-collection Material-type
-#dt-lh Material-type
+Material-type 1=1031
 
 #Music-key            1025  A statement of the key in       $r in the following:
 #                           which the music is written.     130, 240, 243, 630,
@@ -493,18 +486,26 @@ Material-type     1=1031
 #                           of persons that is identified   810
 #                           by a particular name. (Subject
 #                           name headings are included.)
-Corporate-name 1=2
+Corporate-name 1=Corporate-name
 cpn Corporate-name
 
+Corporate-name-heading 1=Corporate-name-heading
+Corporate-name-see 1=Corporate-name-see
+Corporate-name-seealso 1=Corporate-name-seealso
+
 #Name-conference         3  A meeting of individuals or     111, 411, 611, 711
 #                           representatives of various      811
 #                           bodies for the purpose of
 #                           discussing topics of common
 #                           interest.  (Subject name
 #                           headings are included.)
-Conference-name 1=3
+Conference-name 1=Conference-name
 cfn Conference-name
 
+Conference-name-heading 1=Conference-name-heading
+Conference-name-see 1=Conference-name-see
+Conference-name-seealso 1=Conference-name-seealso
+
 #Name-editor          1020  A person who prepared for       100 $a or 700 $a when
 #                           publication an item that is     the corresponding $e
 #                           not his or her own.             contains value 'ed.'
@@ -513,17 +514,32 @@ cfn Conference-name
 #Name-geographic        58  Name of a country,              651
 #                           jurisdiction, region, or
 #                           geographic feature.
-#Name-geographic        1=58
+Name-geographic 1=Name-geographic
+Name-geographic-heading 1=Name-geographic-heading
+Name-geographic-see 1=Name-geographic-see
+Name-geographic-seealso 1=Name-geographic-seealso
+
+# Term-geographic       9019 Geographic Term
+Term-geographic 1=Term-geographic
+Term-geographic-heading 1=Term-geographic-heading
+Term-geographic-see 1=Term-geographic-see
+Term-geographic-seealso 1=Term-geographic-seealso
 
 #Name-geographic-place- 59  City or town where an item      008/15-17, 260$a
 #publication                was published.
+Place-publication 1=59
+pl Place-publication
 
 #Name-personal           1  A person's real name,           100, 400, 600, 700,
 #                           pseudonym, title of nobility    800
 #                           nickname, or initials.
-Personal-name 1=1
+Personal-name 1=Personal-name
 pn Personal-name
 
+Personal-name-heading 1=Personal-name-heading
+Personal-name-see 1=Personal-name-see
+Personal-name-seealso 1=Personal-name-seealso
+
 #Name-publisher       1018  The organization responsible    260$b
 #                           for the publication of the
 #                           item.
@@ -535,7 +551,7 @@ pb Publisher
 #                           physical description,
 #                           relationship to other works,
 #                           or contents may be recorded.
-Note                   1=63
+Note 1=63
 nt Note
 
 #Record-source        1019  The USMARC code or name of the  008/39, 040
@@ -570,7 +586,7 @@ nt Note
 #Subject                21  The primary topic on which a    600, 610, 611, 630,
 #                           work is focused.                650, 651, 653, 654,
 #                                                           655, 656, 657, 69X
-Subject                1=21
+Subject 1=21
 su Subject
 su-to Subject
 su-geo Subject
@@ -672,7 +688,7 @@ su-na 1=1009
 #                           place, period of time treated,
 #                           or aspect of the subject
 #                           treated.
-#Subject-subdivision 1=47
+Subject-subdivision 1=47
 
 #Title                   4  A word, phrase, character,      130, 21X-24X, 440,
 #                           or group of characters,         490, 730, 740, 830,
@@ -682,8 +698,6 @@ su-na 1=1009
 #                                                           610, 611, 700, 710,
 #                                                           711, 800, 810, 811
 Title 1=4
-#5=1 1=4 s=pw
-#1=4
 ti Title
 
 #Title-abbreviated      43  Shortened form of the title;    210, 211 (obs.),
@@ -717,7 +731,7 @@ ti Title
 
 #Title-cover            36  The title printed on the        246i4
 #                           cover of an item as issued. 
-Title-cover            1=36
+Title-cover 1=36
 
 #Title-expanded         44  An expanded (or augmented)      214 (obs.), 246
 #                           title has been enlarged with
@@ -741,7 +755,7 @@ Title-cover            1=36
 #                           example, a journal title
 #                           when the record describes an
 #                           article in the journal.
-Host-item      1=1033
+Host-item 1=1033
 
 #Title-key              33  The unique name assigned to     222
 #                           a serial by the International
@@ -775,7 +789,7 @@ Host-item      1=1033
 #                           a group of separate, but        subfield $t in the
 #                           related, items.                 following: 400,410,
 #                                                           411, 800, 810, 811
-Title-series            1=5
+Title-series 1=5
 #series Title-series
 se Title-series
 
@@ -787,30 +801,38 @@ se Title-series
 #                           a work is to be identified      subfield $t in the
 #                           for cataloging purposes.        following: 700,710,
 #                                                           711
-Title-uniform           1=6
+Title-uniform 1=Title-uniform
 ut Title-uniform
-#Authority-number           Koha-Auth-Number  The Number   
-#                           for an authority to be searched subfield $9 in the
-#                           for cataloging purposes.        following: 700,701,702,710,
-#                                                           711,712 and some 6XX fields (Unimarc)
-# 8910
-Authority-Number           1=Koha-Auth-Number
+
+Title-uniform-heading 1=Title-uniform-heading
+Title-uniform-see 1=Title-uniform-see
+Title-uniform-seealso 1=Title-uniform-seealso
+
+#Authority-number           Koha-Auth-Number  The identifier of the the authority
+#                           record, stored in 001 in the authority record, and $9/$0 in the
+#                           field that record is linked to in the bib record
+Authority-Number 1=Koha-Auth-Number
 an Authority-Number
 Koha-Auth-Number Authority-Number
 
-#Authority/format-id        authtypecode  The Code 
-#                           associated to an authority type
-#                                                            152$b in authority records
-Authority/format-id           1=Authority/format-id
-at Authority/format-id
+#authtype                   A coded value representing the authority type
+#                                                            942$a in auth records
+authtype        1=authtype
+at authtype
 
-#Heading-Entity             Information for Heading in an 
-#                           authority record 
-#                                                             usually 2.. fields
-Heading-Entity           1=Heading-Entity
-he Heading-Entity
+# Subdivisions
 
+Geographic-subdivision 1=Geographic-subdivision
+Chronological-subdivision 1=Chronological-subdivision
+Form-subdivision 1=Form-subdivision
 
+# Koha Local-Use Authority Indexes
+Heading 1=Heading
+he Heading
+See 1=See
+See-also 1=See-also
+
+###################################################
 ### 2. BIB1 RELATION ATTRIBUTES
 lt 2=1
 le 2=2
@@ -828,6 +850,7 @@ AlwaysMatches 2=103
 
 Within 2=104
 
+###################################################
 ### 3. BIB1 POSITION ATTRIBUTES
 first-in-field 3=1
 
@@ -841,59 +864,60 @@ startswithnt 3=1 5=101 6=3
 first-in-subfield 3=2
 any-position-in-field 3=3
 
+###################################################
 ### 4. BIB1 STRUCTURE ATTRIBUTES
 st-phrase 4=1
 phr st-phrase
-st-word        4=2
-st-key         4=3
-st-year        4=4
-st-date-normalized     4=5
-st-word-list   4=6
+st-word     4=2
+st-key  4=3
+st-year     4=4
+st-date-normalized  4=5
+st-word-list    4=6
 wrdl st-word-list
 #st-word
-st-date-un-normalized  4=100
-st-name-normalized     4=101
-st-name-un-normalized  4=102
-st-structure   4=103
-st-urx         4=104
-st-free-form-text      4=105
-st-document-text       4=106
+st-date-un-normalized   4=100
+st-name-normalized  4=101
+st-name-un-normalized   4=102
+st-structure    4=103
+st-urx  4=104
+st-free-form-text   4=105
+st-document-text    4=106
 st-local-number 4=107
-st-string      4=108
+st-string   4=108
 # http://indexdata.dk/yaz/doc/tools.tkl#ccl.special.attribute.combos
-st-numeric     4=109 r=o
+st-numeric  4=109 r=o
 #string 109
 
+###################################################
 ### 5. BIB1 TRUNCATION ATTRIBUTES
 right-Truncation 5=1
 rt right-Truncation
 rtrn right-Truncation
-left-Truncation        5=2
+left-Truncation     5=2
 ltrn left-Truncation
-left-and-right         5=3
+left-and-right  5=3
 rltrn left-and-right
-do-not-truncate        5=100
-process-in-search-term         5=101
-regExpr-1      5=102
+do-not-truncate     5=100
+process-in-search-term 5=101
+regExpr-1 5=102
 fuzzy 5=103
-regExpr-2      5=103
-Z39-58 5=104
+regExpr-2 5=103
+Z39-58  5=104
 
+###################################################
 ### 6. BIB1 STRUCTURE ATTRIBUTES
-incomplete-subfield    6=1
-complete-subfield      6=2
-complete-field         6=3
+incomplete-subfield 6=1
+complete-subfield 6=2
+complete-field 6=3
 
-### COMBINATIONS OF THE ABOVE
+###################################################
+### SPECIAL COMBINATIONS OF THE ABOVE
 ext 4=1 6=3
 
-## ATTRIBUTES NOT IN BIB1 OR ELSE ONES I DON"T KNOW WHERE IN BIB1 THEY BELONG
-#Language
-#ln 1=8805
-#language 1=8805
-#Musical Composition
-#mc
+###################################################
+## ATTRIBUTES NOT IN BIB1
 
+###
 # Koha Local-Use Biblio Indexes
 Control-number 1=9001
 biblionumber 1=9002
@@ -907,7 +931,11 @@ cn-prefix 1=9009
 cn-suffix 1=9010
 Suppress 1=9011
 date-entered-on-file 1=date-entered-on-file
+extent 1=Extent
+llength 1=llength
+Summary 1=Summary
 
+###
 # Items Index
 withdrawn 1=8001
 lost 1=8002
@@ -919,9 +947,12 @@ cn-sort 1=8007
 notforloan 1=8008
 ccode 1=8009
 itemnumber 1=8010
-Code-institution 1=8011
+# homebranch 1=8011
+homebranch 1=homebranch
+branch homebranch
 holdingbranch 1=8012
 location 1=8013
+# defined as 1=32 above
 #Date-of-acquisition 1=8014
 acqsource 1=8015
 coded-location-qualifier 1=8016
@@ -942,20 +973,9 @@ replacementprice 1=8029
 replacementpricedate 1=8030
 itype 1=8031
 mc itype
-# Publisher Location
-
-Place-publication 1=59
-pl Place-publication
-#pl 1=59
-
-# Extent
-#Extent 1=8001
 
-#att 8900            
-#Call-Number 1=8900
 #date1 1=8801
 #date2 1=8802
-#language 8805
 ff8-22 1=8822
 ff8-23 1=8823
 ff8-34 1=8834
@@ -978,46 +998,33 @@ ff8-34 1=8834
 # lastname,firstname entry in $100$a
 Author-personal-bibliography 1=8900
 aub Author-personal-bibliography
+
 # Author-in-order - firstname lastname in 245$c statement of responsibility
 Author-in-order 1=8901
 auo Author-in-order
 
-### LIMITS
-# AUDIENCE
+# Audience
 audience 1=8822
 aud audience
 
-# CONTENT and Literary form
+# Content and Literary form
 fiction 1=8833
 fic fiction
-#mystery 1=
+#mystery 1=?
 biography 1=8834
 bio biography
 
-# FORMAT
+# Format
 format 1=8823
-
-# format limit
+# format used as a limit FIXME: needed?
 l-format 1=8703
 
-#fmt format
-
-# BRANCH (of local library)
-branch 1=homebranch
-#1033
-
 Illustration-code 1=Illustration-code 
-# Item Type
-
-# Year limit
-#yr 1=8801 4=109 r=r
 
-## STATUSES
+## Statuses
 popularity 1=issues
 
-# Material Category
-#mc 1=8700
-## TYPE LIMITS
+## Type Limits
 dt-bks 1=8700
 dt-vis 1=8700
 dt-sr 1=8700
@@ -1043,6 +1050,7 @@ sort1 7=1
 sort2 7=2
 sort3 7=3
 
+###################################################
 # CCL DIRECTIVES
 # Truncation characters (it seems to take multiple arguments)
 @truncation ? *
@@ -1071,6 +1079,7 @@ sort3 7=3
 # a !n b
 # Integer n may be omitted - in which case distance is 1.
 
+###################################################
 # Rules for a few GILS fields
 #north  gils-attset,u=2040 r=o
 #south  gils-attset,u=2041 r=o
@@ -1079,6 +1088,7 @@ sort3 7=3
 #distributor gils-attset,u=2000 s=pw
 #distributorname gils-attset,u=2001 s=pw
 
+###################################################
 # Explain fields
 ExplainCategory      exp1,1=1
 HumanStringLanguage  exp1,1=2
diff --git a/etc/zebradb/explain-authorities.xml b/etc/zebradb/explain-authorities.xml
new file mode 100644 (file)
index 0000000..475b23a
--- /dev/null
@@ -0,0 +1,636 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: explain.xml,v 1.14 2006/09/27 13:35:09 marc Exp $ -->
+
+<!-- this file configures the SRU/SRW explain response -->
+<!-- see: http://explain.z3950.org/dtd/commentary.html -->
+<!-- validate this using zeerex-2.0.xsd -->
+<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
+
+<explain xmlns="http://explain.z3950.org/dtd/2.0/">
+
+  <!-- try stylesheet url: http://./?stylesheet=docpath/sru2.xsl -->
+  <serverInfo protocol="SRW/SRU/Z39.50">
+
+    <host>__DB_HOST__</host>
+
+    <port>9999</port>
+    <!-- <database numRecs="1314" lastUpdate="2006-03-15 09-05-33">
+         Default</database> -->
+    <database>authorities</database>
+        <!--<authentication>
+      <user>kohauser</user>
+      <group>kohagroup</group>
+      <password>zebrastripes</password>
+    </authentication>-->
+  </serverInfo>
+
+  <databaseInfo>
+
+    <title lang="en" primary="true">Koha 3 Authority SRU/SRW/Z39.50 server</title>
+
+    <description lang="en" primary="true">
+      Koha 3 Authority Server
+    </description>
+
+    <author>Joshua Ferraro, LibLime, http://liblime.com,
+            Marc Cromme, Mike Taylor, Index Data Aps, 
+            http://www.indexdata.dk</author>
+
+    <contact>Joshua Ferraro, jmf(at)liblime(dot)com</contact>
+
+    <!--<langUsage codes="en fr">
+        The records are in English and French.
+        </langUsage>  -->
+    <!-- <extend>Partially crawled web data</extend> -->
+   
+    <history>
+      Created for Koha 3
+      http://koha.org
+    </history>
+
+    <implementation  identifier="zebra" version="1.4">
+      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
+    </implementation>
+    
+    <links> 
+      <!--<link type="www">http://foo.indexdata.dk:80</link>-->
+      <link type="z39.50">http://__DB_HOST__:9999</link>
+      <link type="srw">http://__DB_HOST__:9999</link>
+      <link type="sru">http://__DB_HOST__:9999</link>
+      <!--<link type="oai"></link>
+      <link type="rss"></link>
+      <link type="icon"></link> -->
+    </links>
+    
+  </databaseInfo>
+
+  <!--
+  <metaInfo>
+    <dateModified>2002-03-29 19:00:00</dateModified>
+    <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
+                   id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
+    <dateAggregated>2002-03-30 06:30:00</dateAggregated>
+  </metaInfo>
+  -->
+
+
+  <indexInfo>
+    <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
+      <title>CQL Standard Set</title>
+    </set>
+    <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
+      <title>Record Standard Set</title>
+    </set>
+    <set name="alvis" identifier="http://indexdata.dk/zebra/xslt/1">
+      <title>Alvis Set</title>
+    </set>
+    <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
+      <title>Dublin Core Set</title>
+    </set>
+    <set name="bib1" identifier="1.2.840.10003.3.1">
+      <title>BIB-1 Z39.50 Standard Set</title>
+    </set>
+
+
+    <!-- CQL standard index -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">CQL Server Choice</title>
+      <map><name set="cql">serverChoice</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">CQL All</title>
+      <map><name set="cql">all</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+      </map>
+    </index>
+
+    <!-- Record ID index -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Record ID</title>
+      <map><name set="rec">id</name></map>
+      <map>
+        <attr type="1" set="bib1">rec:id</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+
+    <!-- Alvis indexes -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Text Relevance Ranked</title>
+      <map><name set="alvis">text</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+        <attr type="2" set="bib1">102</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Anchor Text</title>
+      <map><name set="alvis">anchortext</name></map>
+      <map>
+        <attr type="1" set="bib1">anchortext</attr>
+        <attr type="2" set="bib1">102</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Date Modified</title>
+      <map><name set="alvis">date-modified</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:date-modified</attr>
+        <attr type="4" set="bib1">5</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Date Checked</title>
+      <map><name set="alvis">date-checked</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:date-checked</attr>
+        <attr type="4" set="bib1">5</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Identifier Url</title>
+      <map><name set="alvis">identifier-url</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:identifier-url</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!--<index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Identifier Server</title>
+      <map><name set="alvis">identifier-server</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:identifier-server</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Topic Class</title>
+      <map><name set="alvis">topic-class</name></map>
+      <map>
+        <attr type="1" set="bib1">an:topic-class</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Language</title>
+      <map><name set="alvis">language</name></map>
+      <map>
+        <attr type="1" set="bib1">an:language</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Date</title>
+      <map><name set="alvis">entity-date</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-date</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Disease</title>
+      <map><name set="alvis">entity-disease</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-disease</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Gene</title>
+      <map><name set="alvis">entity-gene</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-gene</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Location</title>
+      <map><name set="alvis">entity-location</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-location</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!--<index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Mail</title>
+      <map><name set="alvis">entity-mail</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-mail</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>-->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Person</title>
+      <map><name set="alvis">entity-person</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-person</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Protein</title>
+      <map><name set="alvis">entity-protein</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-protein</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Species</title>
+      <map><name set="alvis">entity-species</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-species</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity URL</title>
+      <map><name set="alvis">entity-url</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-url</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Organism</title>
+      <map><name set="alvis">entity-organism</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-organism</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Symptom</title>
+      <map><name set="alvis">entity-symptom</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-symptom</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Chemical</title>
+      <map><name set="alvis">entity-chemical</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-chemical</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Drug</title>
+      <map><name set="alvis">entity-drug</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-drug</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Lemma Canonical </title>
+      <map><name set="alvis">lemma-canonical</name></map>
+      <map>
+        <attr type="1" set="bib1">la:lemma-canonical</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Noun</title>
+      <map><name set="alvis">syntactic-noun</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-noun</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Verb</title>
+      <map><name set="alvis">syntactic-verb</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-verb</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Adjective</title>
+      <map><name set="alvis">syntactic-adjective</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-adjective</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Word Form</title>
+      <map><name set="alvis">word-form</name></map>
+      <map>
+        <attr type="1" set="bib1">la:word-form</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Term Form</title>
+      <map><name set="alvis">term-form</name></map>
+      <map>
+        <attr type="1" set="bib1">la:term-form</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Wpcats</title>
+      <map><name set="alvis">wpcats</name></map>
+      <map>
+        <attr type="1" set="bib1">wpcats</attr>
+      </map>
+    </index> -->
+
+    <!-- Dublin Core Indexes -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Title</title>
+      <map><name set="dc">title</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:title</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Creator</title>
+      <map><name set="dc">creator</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:creator</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Subject</title>
+      <map><name set="dc">subject</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:subject</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Description</title>
+      <map><name set="dc">description</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:description</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Publisher</title>
+      <map><name set="dc">publisher</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:publisher</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Contributor</title>
+      <map><name set="dc">contributor</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:contributor</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Date</title>
+      <map><name set="dc">date</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:date</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Type</title>
+      <map><name set="dc">type</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:type</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Format</title>
+      <map><name set="dc">format</name></map>
+      <map>
+        <attr type="1" set="bib1"></attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Identifier</title>
+      <map><name set="dc">identifier</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:identifier</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Source</title>
+      <map><name set="dc">source</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:source</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Language</title>
+      <map><name set="dc">language</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:language</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Relation</title>
+      <map><name set="dc">relation</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:relation</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Coverage</title>
+      <map><name set="dc">coverage</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:coverage</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Rights</title>
+      <map><name set="dc">rights</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:rights</attr>
+      </map>
+    </index>
+
+  </indexInfo>
+
+  <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
+       <schemaInfo>, sic ..
+  <recordInfo>
+    <recordSyntax identifier="1.2.840.10003.5.109.10">
+      <elementSet name="F">
+        <title lang="en" primary="true">Full XML Record</title>
+      </elementSet>
+    </recordSyntax>
+  </recordInfo>
+  -->
+
+  <schemaInfo>
+
+    <schema identifier="http://www.loc.gov/zing/srw/dcschema/v1.0/"
+            location="http://www.loc.gov/zing/srw/dc.xsd" 
+            name="dc"
+            retrieve="true">
+      <title lang="en">Dublin Core</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/dc-short"
+            location="" 
+            name="dc-short"
+            retrieve="true">
+      <title lang="en">Dublin Core Short Form</title>
+    </schema>
+
+    <!--<schema identifier="http://indexdata.dk/snippet"
+            location="" 
+            name="snippet"
+            retrieve="true">
+      <title lang="en">Snippet - Not Implemented</title>
+    </schema> -->
+
+    <!--<schema identifier="http://indexdata.dk/help"
+            location="" 
+            name="help"
+            retrieve="true">
+      <title lang="en">Help - Not Implemented</title>
+    </schema> -->
+
+    <schema identifier="http://indexdata.dk/pretty"
+            location="" 
+            name="pretty"
+            retrieve="true">
+      <title lang="en">Pretty</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/D9.1"
+            location="" 
+            name="D9.1"
+            retrieve="true">
+      <title lang="en">Alvis D9.1 Schema</title>
+    </schema>
+
+    <schema identifier="http://alvis.info/enriched/"
+            location="http://project.alvis.info/alvis_docs/alvis-document.xsd" 
+            name="alvis"
+            retrieve="true">
+      <title lang="en">Alvis Enriched</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/zebra/xslt/1"
+            location="" 
+            name="index"
+            retrieve="true">
+      <title lang="en">Zebra Indexing</title>
+    </schema>
+
+  </schemaInfo>
+  <configInfo>
+
+    <!-- searchRetrieve settings -->
+
+    <!-- default context set -->
+    <default type="contextSet">cql</default>
+
+    <default type="index">all</default>
+
+    <!-- default relation -->
+    <default type="relation">=</default>
+
+    <!-- relation supported by the server or index -->
+    <supports type="relation">&lt;</supports> <!-- 2=1 OK -->
+    <supports type="relation">&lt;=</supports> <!-- 2=2 OK -->
+    <supports type="relation">=</supports> <!-- 2=3 OK -->
+    <supports type="relation">&gt;=</supports> <!-- 2=4 OK -->
+    <supports type="relation">&gt;</supports> <!-- 2=5 OK -->
+    <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
+    <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
+    <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
+
+    <!-- relation modifier supported by the server or index -->
+    <!-- <supports type="relationModifier">relevant</supports> --><!-- 2=102 OK, makes no difference .. sic -->
+    <!-- <supports type="relationModifier">phonetic</supports> --> <!-- 2=100 DEAD -->
+    <!-- <supports type="relationModifier">stem</supports> --> <!-- 2=101 DEAD !! -->
+
+    <!-- support proximity (Empty) -->
+    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
+
+    <!-- proximity modifier supported by the server or index 
+         (relation, distance, unit, ordering) -->
+    <!-- <supports type="proximityModifier"></supports> -->
+
+    <!-- boolean modifier supported by the server or index -->
+    <!-- <supports type="booleanModifier"></supports> -->
+
+    <!-- masking character supported (* or ?) -->
+    <supports type="maskingCharacter">*</supports>
+    <supports type="maskingCharacter">?</supports>
+
+    <!-- anchoring supported? (^ character) -->
+    <!-- empty terms supported (Empty) -->
+    <supports type="emptyTerm"></supports>
+
+    <!-- sorting settings -->
+
+    <!-- default schema used in sorting, in short name form -->
+    <!-- <default type="sortSchema"></default> -->
+    <!-- MIKE: deprecated -->
+
+    <!-- server support sort -->
+
+    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
+    <!-- <supports type="sortModifier"></supports> -->
+
+    <!-- presentation settings --> 
+
+    <!-- default number of records that a server will return at once  -->
+    <default type="numberOfRecords">0</default>
+
+    <!-- default schema used for retrieved records -->
+    <default type="retrieveSchema">index</default>
+    <!-- default stylesheet URL, or if stylesheets are supported -->
+    <setting type="stylesheet">docpath/sru.xsl</setting>
+
+    <!-- default record packing returned (string or xml) -->
+    <default type="recordPacking">xml</default>
+
+    <!-- maximum number of records that a server will return at once -->
+    <!-- <setting type="maximumRecords">1000</setting> -->
+
+    <!-- support result sets (Empty) -->
+    <!-- <supports type="resultSets"></supports>  --> 
+
+    <!-- XPath retrieval supported -->
+    <!-- <supports type="recordXPath"></supports> -->
+
+    <!-- scan settings -->
+
+    <!-- scan operation supported -->
+    <supports type="scan"></supports>
+
+    <!-- default number of terms to be returned in scan -->
+    <default type="numberOfTerms">20</default>
+
+    <!-- other server settings -->
+
+    <!-- older version of the protocol supported  -->
+    <!-- <supports type="version">1.1</supports> -->
+
+    <!-- number of seconds that a result set will be maintained for -->
+    <setting type="resultSetTTL">0</setting>
+
+    <!-- A type of extraRequestData available in the
+         searchRetrieveRequest. The extra*Data fields are represented as two
+         space separated words, the first the identifier for the extension and
+         the second the individual element name from the extension. If there is
+         only one word, then it is the extension id and all elements from
+         within are supported. -->
+    <!-- <supports type="extraSearchData"></supports> -->
+
+    <!-- A type of extraRequestData available in the explainRequest -->
+    <!-- <supports type="extraExplainData"></supports> -->
+
+    <!-- A type of extraRequestData available in the scanRequest -->
+    <!-- <supports type="extraScanData"></supports> -->
+    <!-- The URI identifier of a supported profile -->
+    <!-- <supports type="profile"></supports> -->
+  </configInfo>
+   
+</explain>
diff --git a/etc/zebradb/explain-biblios.xml b/etc/zebradb/explain-biblios.xml
new file mode 100644 (file)
index 0000000..db802b2
--- /dev/null
@@ -0,0 +1,636 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: explain.xml,v 1.14 2006/09/27 13:35:09 marc Exp $ -->
+
+<!-- this file configures the SRU/SRW explain response -->
+<!-- see: http://explain.z3950.org/dtd/commentary.html -->
+<!-- validate this using zeerex-2.0.xsd -->
+<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->
+
+<explain xmlns="http://explain.z3950.org/dtd/2.0/">
+
+  <!-- try stylesheet url: http://./?stylesheet=docpath/sru2.xsl -->
+  <serverInfo protocol="SRW/SRU/Z39.50">
+
+    <host>__DB_HOST__</host>
+
+    <port>9999</port>
+    <!-- <database numRecs="1314" lastUpdate="2006-03-15 09-05-33">
+         Default</database> -->
+    <database>biblios</database>
+        <!--<authentication>
+      <user>kohauser</user>
+      <group>kohagroup</group>
+      <password>zebrastripes</password>
+    </authentication>-->
+  </serverInfo>
+
+  <databaseInfo>
+
+    <title lang="en" primary="true">Koha 3 Bibliographic SRU/SRW/Z39.50 server</title>
+
+    <description lang="en" primary="true">
+      Koha 3 Bibliographic Server
+    </description>
+
+    <author>Joshua Ferraro, LibLime, http://liblime.com,
+            Marc Cromme, Mike Taylor, Index Data Aps, 
+            http://www.indexdata.dk</author>
+
+    <contact>Joshua Ferraro, jmf(at)liblime(dot)com</contact>
+
+    <!--<langUsage codes="en fr">
+        The records are in English and French.
+        </langUsage>  -->
+    <!-- <extend>Partially crawled web data</extend> -->
+   
+    <history>
+      Created for Koha 3
+      http://koha.org
+    </history>
+
+    <implementation  identifier="zebra" version="1.4">
+      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
+    </implementation>
+    
+    <links> 
+      <!--<link type="www">http://foo.indexdata.dk:80</link>-->
+      <link type="z39.50">http://__DB_HOST__:9999</link>
+      <link type="srw">http://__DB_HOST__:9999</link>
+      <link type="sru">http://__DB_HOST__:9999</link>
+      <!--<link type="oai"></link>
+      <link type="rss"></link>
+      <link type="icon"></link> -->
+    </links>
+    
+  </databaseInfo>
+
+  <!--
+  <metaInfo>
+    <dateModified>2002-03-29 19:00:00</dateModified>
+    <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
+                   id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
+    <dateAggregated>2002-03-30 06:30:00</dateAggregated>
+  </metaInfo>
+  -->
+
+
+  <indexInfo>
+    <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
+      <title>CQL Standard Set</title>
+    </set>
+    <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
+      <title>Record Standard Set</title>
+    </set>
+    <set name="alvis" identifier="http://indexdata.dk/zebra/xslt/1">
+      <title>Alvis Set</title>
+    </set>
+    <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
+      <title>Dublin Core Set</title>
+    </set>
+    <set name="bib1" identifier="1.2.840.10003.3.1">
+      <title>BIB-1 Z39.50 Standard Set</title>
+    </set>
+
+
+    <!-- CQL standard index -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">CQL Server Choice</title>
+      <map><name set="cql">serverChoice</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">CQL All</title>
+      <map><name set="cql">all</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+      </map>
+    </index>
+
+    <!-- Record ID index -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Record ID</title>
+      <map><name set="rec">id</name></map>
+      <map>
+        <attr type="1" set="bib1">rec:id</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+
+    <!-- Alvis indexes -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Text Relevance Ranked</title>
+      <map><name set="alvis">text</name></map>
+      <map>
+        <attr type="1" set="bib1">text</attr>
+        <attr type="2" set="bib1">102</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Anchor Text</title>
+      <map><name set="alvis">anchortext</name></map>
+      <map>
+        <attr type="1" set="bib1">anchortext</attr>
+        <attr type="2" set="bib1">102</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Date Modified</title>
+      <map><name set="alvis">date-modified</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:date-modified</attr>
+        <attr type="4" set="bib1">5</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Date Checked</title>
+      <map><name set="alvis">date-checked</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:date-checked</attr>
+        <attr type="4" set="bib1">5</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Identifier Url</title>
+      <map><name set="alvis">identifier-url</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:identifier-url</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!--<index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Identifier Server</title>
+      <map><name set="alvis">identifier-server</name></map>
+      <map>
+        <attr type="1" set="bib1">ac:identifier-server</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Topic Class</title>
+      <map><name set="alvis">topic-class</name></map>
+      <map>
+        <attr type="1" set="bib1">an:topic-class</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Language</title>
+      <map><name set="alvis">language</name></map>
+      <map>
+        <attr type="1" set="bib1">an:language</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Date</title>
+      <map><name set="alvis">entity-date</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-date</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Disease</title>
+      <map><name set="alvis">entity-disease</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-disease</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Gene</title>
+      <map><name set="alvis">entity-gene</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-gene</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Location</title>
+      <map><name set="alvis">entity-location</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-location</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!--<index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Mail</title>
+      <map><name set="alvis">entity-mail</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-mail</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>-->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Person</title>
+      <map><name set="alvis">entity-person</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-person</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Protein</title>
+      <map><name set="alvis">entity-protein</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-protein</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Species</title>
+      <map><name set="alvis">entity-species</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-species</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity URL</title>
+      <map><name set="alvis">entity-url</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-url</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Organism</title>
+      <map><name set="alvis">entity-organism</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-organism</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Symptom</title>
+      <map><name set="alvis">entity-symptom</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-symptom</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Chemical</title>
+      <map><name set="alvis">entity-chemical</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-chemical</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Entity Drug</title>
+      <map><name set="alvis">entity-drug</name></map>
+      <map>
+        <attr type="1" set="bib1">la:entity-drug</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Lemma Canonical </title>
+      <map><name set="alvis">lemma-canonical</name></map>
+      <map>
+        <attr type="1" set="bib1">la:lemma-canonical</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Noun</title>
+      <map><name set="alvis">syntactic-noun</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-noun</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Verb</title>
+      <map><name set="alvis">syntactic-verb</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-verb</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Syntactic Adjective</title>
+      <map><name set="alvis">syntactic-adjective</name></map>
+      <map>
+        <attr type="1" set="bib1">la:syntactic-adjective</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Word Form</title>
+      <map><name set="alvis">word-form</name></map>
+      <map>
+        <attr type="1" set="bib1">la:word-form</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index>
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis NLP Term Form</title>
+      <map><name set="alvis">term-form</name></map>
+      <map>
+        <attr type="1" set="bib1">la:term-form</attr>
+        <attr type="4" set="bib1">3</attr>
+      </map>
+    </index> -->
+    <!-- <index search="true" scan="true" sort="false">
+      <title lang="en">Alvis Wpcats</title>
+      <map><name set="alvis">wpcats</name></map>
+      <map>
+        <attr type="1" set="bib1">wpcats</attr>
+      </map>
+    </index> -->
+
+    <!-- Dublin Core Indexes -->
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Title</title>
+      <map><name set="dc">title</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:title</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Creator</title>
+      <map><name set="dc">creator</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:creator</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Subject</title>
+      <map><name set="dc">subject</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:subject</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Description</title>
+      <map><name set="dc">description</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:description</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Publisher</title>
+      <map><name set="dc">publisher</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:publisher</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Contributor</title>
+      <map><name set="dc">contributor</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:contributor</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Date</title>
+      <map><name set="dc">date</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:date</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Type</title>
+      <map><name set="dc">type</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:type</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Format</title>
+      <map><name set="dc">format</name></map>
+      <map>
+        <attr type="1" set="bib1"></attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Identifier</title>
+      <map><name set="dc">identifier</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:identifier</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Source</title>
+      <map><name set="dc">source</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:source</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Language</title>
+      <map><name set="dc">language</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:language</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Relation</title>
+      <map><name set="dc">relation</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:relation</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Coverage</title>
+      <map><name set="dc">coverage</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:coverage</attr>
+      </map>
+    </index>
+    <index search="true" scan="true" sort="false">
+      <title lang="en">DC Rights</title>
+      <map><name set="dc">rights</name></map>
+      <map>
+        <attr type="1" set="bib1">dc:rights</attr>
+      </map>
+    </index>
+
+  </indexInfo>
+
+  <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
+       <schemaInfo>, sic ..
+  <recordInfo>
+    <recordSyntax identifier="1.2.840.10003.5.109.10">
+      <elementSet name="F">
+        <title lang="en" primary="true">Full XML Record</title>
+      </elementSet>
+    </recordSyntax>
+  </recordInfo>
+  -->
+
+  <schemaInfo>
+
+    <schema identifier="http://www.loc.gov/zing/srw/dcschema/v1.0/"
+            location="http://www.loc.gov/zing/srw/dc.xsd" 
+            name="dc"
+            retrieve="true">
+      <title lang="en">Dublin Core</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/dc-short"
+            location="" 
+            name="dc-short"
+            retrieve="true">
+      <title lang="en">Dublin Core Short Form</title>
+    </schema>
+
+    <!--<schema identifier="http://indexdata.dk/snippet"
+            location="" 
+            name="snippet"
+            retrieve="true">
+      <title lang="en">Snippet - Not Implemented</title>
+    </schema> -->
+
+    <!--<schema identifier="http://indexdata.dk/help"
+            location="" 
+            name="help"
+            retrieve="true">
+      <title lang="en">Help - Not Implemented</title>
+    </schema> -->
+
+    <schema identifier="http://indexdata.dk/pretty"
+            location="" 
+            name="pretty"
+            retrieve="true">
+      <title lang="en">Pretty</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/D9.1"
+            location="" 
+            name="D9.1"
+            retrieve="true">
+      <title lang="en">Alvis D9.1 Schema</title>
+    </schema>
+
+    <schema identifier="http://alvis.info/enriched/"
+            location="http://project.alvis.info/alvis_docs/alvis-document.xsd" 
+            name="alvis"
+            retrieve="true">
+      <title lang="en">Alvis Enriched</title>
+    </schema>
+
+    <schema identifier="http://indexdata.dk/zebra/xslt/1"
+            location="" 
+            name="index"
+            retrieve="true">
+      <title lang="en">Zebra Indexing</title>
+    </schema>
+
+  </schemaInfo>
+  <configInfo>
+
+    <!-- searchRetrieve settings -->
+
+    <!-- default context set -->
+    <default type="contextSet">cql</default>
+
+    <default type="index">all</default>
+
+    <!-- default relation -->
+    <default type="relation">=</default>
+
+    <!-- relation supported by the server or index -->
+    <supports type="relation">&lt;</supports> <!-- 2=1 OK -->
+    <supports type="relation">&lt;=</supports> <!-- 2=2 OK -->
+    <supports type="relation">=</supports> <!-- 2=3 OK -->
+    <supports type="relation">&gt;=</supports> <!-- 2=4 OK -->
+    <supports type="relation">&gt;</supports> <!-- 2=5 OK -->
+    <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
+    <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
+    <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->
+
+    <!-- relation modifier supported by the server or index -->
+    <!-- <supports type="relationModifier">relevant</supports> --><!-- 2=102 OK, makes no difference .. sic -->
+    <!-- <supports type="relationModifier">phonetic</supports> --> <!-- 2=100 DEAD -->
+    <!-- <supports type="relationModifier">stem</supports> --> <!-- 2=101 DEAD !! -->
+
+    <!-- support proximity (Empty) -->
+    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->
+
+    <!-- proximity modifier supported by the server or index 
+         (relation, distance, unit, ordering) -->
+    <!-- <supports type="proximityModifier"></supports> -->
+
+    <!-- boolean modifier supported by the server or index -->
+    <!-- <supports type="booleanModifier"></supports> -->
+
+    <!-- masking character supported (* or ?) -->
+    <supports type="maskingCharacter">*</supports>
+    <supports type="maskingCharacter">?</supports>
+
+    <!-- anchoring supported? (^ character) -->
+    <!-- empty terms supported (Empty) -->
+    <supports type="emptyTerm"></supports>
+
+    <!-- sorting settings -->
+
+    <!-- default schema used in sorting, in short name form -->
+    <!-- <default type="sortSchema"></default> -->
+    <!-- MIKE: deprecated -->
+
+    <!-- server support sort -->
+
+    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
+    <!-- <supports type="sortModifier"></supports> -->
+
+    <!-- presentation settings --> 
+
+    <!-- default number of records that a server will return at once  -->
+    <default type="numberOfRecords">0</default>
+
+    <!-- default schema used for retrieved records -->
+    <default type="retrieveSchema">index</default>
+    <!-- default stylesheet URL, or if stylesheets are supported -->
+    <setting type="stylesheet">docpath/sru.xsl</setting>
+
+    <!-- default record packing returned (string or xml) -->
+    <default type="recordPacking">xml</default>
+
+    <!-- maximum number of records that a server will return at once -->
+    <!-- <setting type="maximumRecords">1000</setting> -->
+
+    <!-- support result sets (Empty) -->
+    <!-- <supports type="resultSets"></supports>  --> 
+
+    <!-- XPath retrieval supported -->
+    <!-- <supports type="recordXPath"></supports> -->
+
+    <!-- scan settings -->
+
+    <!-- scan operation supported -->
+    <supports type="scan"></supports>
+
+    <!-- default number of terms to be returned in scan -->
+    <default type="numberOfTerms">20</default>
+
+    <!-- other server settings -->
+
+    <!-- older version of the protocol supported  -->
+    <!-- <supports type="version">1.1</supports> -->
+
+    <!-- number of seconds that a result set will be maintained for -->
+    <setting type="resultSetTTL">0</setting>
+
+    <!-- A type of extraRequestData available in the
+         searchRetrieveRequest. The extra*Data fields are represented as two
+         space separated words, the first the identifier for the extension and
+         the second the individual element name from the extension. If there is
+         only one word, then it is the extension id and all elements from
+         within are supported. -->
+    <!-- <supports type="extraSearchData"></supports> -->
+
+    <!-- A type of extraRequestData available in the explainRequest -->
+    <!-- <supports type="extraExplainData"></supports> -->
+
+    <!-- A type of extraRequestData available in the scanRequest -->
+    <!-- <supports type="extraScanData"></supports> -->
+    <!-- The URI identifier of a supported profile -->
+    <!-- <supports type="profile"></supports> -->
+  </configInfo>
+   
+</explain>
index 5cde34e..8f1ab67 100644 (file)
@@ -1,19 +1,6 @@
-# $Id: record_authorities_unimarc.abs,v 1.1.2.1 2006/11/28 10:11:56 tipaul Exp $
-
-# indexing rules. It
-# results in a server which provides a passable Bath level 0 and 1 service
-############################################################################
-# IMPORTANT : this file MUST be renamed record.abs : this name is "hardcoded" in zebra
-# the default record.abs is designed for MARC21.
-############################################################################
-# NOTE: This is designed to be used with the grs.marcxml input filter
-# for ISO2709 (ANSI Z39.2) or grs.xml for MARCXML-formatted records. It
-# won't work for the old grs.marc input filter, which yields a different
-# internal structure.
-
+# This is a fairly simple set of MARC21 Authority indexing rules
 encoding utf-8
 name authorities
-#attset auth1.att
 attset bib1.att
 attset gils.att
 esetname F @
@@ -21,166 +8,62 @@ esetname B @
 
 marc usmarc.mar
 systag sysno rank
-xpath disable
+xpath enable
 
 all any
-melm 001               Local-Number
-melm 152$b             Authority/format-id
-#melm 005        Version-id
-#melm 015        IASDN
+melm 001 Local-Number
+#melm 942$a authtype
+melm 152$b authtype
+
+# Personal Name
+melm 100 Personal-name:w,Personal-name:p,Personal-name:s,Heading:w,Heading:p,Heading:s
+melm 100$a Personal-name-heading:w,Personal-name-heading:p,Personal-name-heading:s,Personal-name:w,Personal-name:p,Heading:w,Heading:p,Heading:s
+melm 400 Personal-name-see:w,Personal-name-see:p,Personal-name-see:s,See:w,See:p,See:s
+melm 500 Personal-name-see-also:w,Personal-name-see-also:p,Personal-name-see-also:s,See-also:w,See-also:p,See-also:s
 
+# Corporate Name
+melm 110$a Corporate-name-heading:w,Corporate-name-heading:p,Corporate-name-heading:s,Corporate-name:w,Corporate-name:p,Heading:w,Heading:p,Heading:s
+melm 110 Corporate-name:w,Corporate-name:p,Corporate-name:s,Heading:w,Heading:p,Heading:s
+melm 410 Corporate-name-see:w,Corporate-name-see:p,Corporate-name-see:s,See:w,See:p,See:s
+melm 510 Corporate-name-see-also:w,Corporate-name-see-also:p,Corporate-name-see-also:s,See-also:w,See-also:p,See-also:s
 
-########################
-# Coded fields
-########################
-#melm 100$a      date-entered-on-file:n:range(data,0,8),date-entered-on-file:s:range(data,0,8),auth-status:n:range(data,8,1),auth-status:s:range(data,8,1),language:n:range(data,9,3),language:s:range(data,9,3),char-encoding:w:range(data,13,4),char-encoding:s:range(data,13,4),ff100-17:w:range(data,17,3),ff100-21:w:range(data,21,2),ff100-23:w:range(data,23,1)
+# Meeting Name
+melm 111$a Conference-name-heading:w,Conference-name-heading:p,Conference-name-heading:s,Conference-name:w,Conference-name:p,Heading:w,Heading:p,Heading:s
+melm 111 Conference-name:w,Conference-name:p,Conference-name:s,Heading:w,Heading:p,Heading:s
+melm 411 Conference-name-see:w,Conference-name-see:p,Conference-name-see:s,See:w,See:p,See:s
+melm 511 Conference-name-see-also:w,Conference-name-see-also:p,Conference-name-see-also:s,See-also:w,See-also:p,See-also:s
 
-#melm 101$a     Language
-#melm 102$a     Country-heading
-# Subject-Heading
-#melm 106$a     Vaut 0(inutilisable sujet-matiere),1 (utilisable sujet-matiere)ou 2(utilisable uniquement sujet-matiere)
-#melm 120$a Obligatoire sur Autorite NP : Sexe et discrimination
-#melm 123$a Obligatoire sur Autorite GEO : Localisation
-#melm 150$a Obligatoire sur Autorite CO : Type de collectivite
-# 4XX$3 5XX$3 7XX$3 authority number
-# 4XX$5 5XX$5 7XX$5 Linking type
-# 4XX$7 5XX$7 7XX$7 Script Cataloguing
-# 4XX$8 5XX$8 7XX$8 Language
+# Uniform Title
+melm 130$a Title-uniform-heading:w,Title-uniform-heading:p,Title-uniform-heading:s,Title-uniform:w,Title-uniform:p,Heading:w,Heading:p,Heading:s
+melm 130 Title-uniform:w,Title-uniform:p,Title-uniform:s,Heading:w,Heading:p,Heading:s
+melm 431 Title-uniform-see:w,Title-uniform-see:p,Title-uniform-see:s,See:w,See:p,See:s
+melm 531 Title-uniform-see-also:w,Title-uniform-see-also:p,Title-uniform-see-also:s,See-also:w,See-also:p,See-also:s
 
+# Topical Term
+melm 150$a Subject-heading:w,Subject-heading:p,Subject-heading:s,Subject:w,Subject:p,Heading:w,Heading:p,Heading:s
+melm 150 Subject:w,Subject:p,Subject:s,Heading:w,Heading:p,Heading:s
+melm 450 Subject-see:w,Subject-see:p,Subject-see:s,See:w,See:p,See:s
+melm 550 Subject-see-also:w,Subject-see-also:p,Subject-see-also:s,See-also:w,See-also:p,See-also:s
 
-############ HEADINGS ##################
-melm 100$a Heading:w,Heading:p,Heading:s,personal-heading,personal-heading:w,personal-heading:s,personal-heading:p
-melm 110$a Heading:w,Heading:p,Heading:s,corporate-heading
-melm 110$a Heading:w,Heading:p,Heading:s,Conference-heading
-melm 115$a Heading:w,Heading:p,Heading:s,Name-geographic
-#melm 216 Name-corporate
-melm 120$a Heading:w,Heading:p,Heading:s,personal-heading,personal-heading:w,personal-heading:s,personal-heading:p
-melm 130$a Heading:w,Heading:p,Heading:s,Title-Uniform,Title-Uniform:w,Title-Uniform:s,Title-Uniform:p
-melm 135$a Heading:w,Heading:p,Heading:s,Title-Uniform,Title-Uniform:w,Title-Uniform:s,Title-Uniform:p
-melm 150$a Heading:w,Heading:p,Heading:s,Subject-heading,Subject-heading:w,Subject-heading:s,Subject-heading:p
+# Geographic Name
+melm 151$a Name-geographic-heading:w,Name-geographic-heading:w,Name-geographic-heading:s,Name-geographic:w,Name-geographic:p,Heading:w,Heading:p,Heading:s
+melm 151 Name-geographic:w,Name-geographic:p,Name-geographic:s,Heading:w,Heading:p,Heading:s
+melm 451 Name-geographic-see:w,Name-geographic-see:p,Name-geographic-see:s,See:w,See:p,See:s
+melm 551 Name-geographic-see-also:w,Name-geographic-see-also:p,Name-geographic-see-also:s,See-also:w,See-also:p,See-also:s
 
-melm 100 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,personal-Heading-Entity,personal-Heading-Entity:w,personal-Heading-Entity:s,personal-Heading-Entity:p
-melm 110 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,corporate-Heading-Entity
-melm 110 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,Conference-Heading-Entity
-melm 115 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,Name-geographic-Entity
-#melm 216 Name-corporate
-melm 120 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,personal-Heading-Entity,personal-Heading-Entity:w,personal-Heading-Entity:s,personal-Heading-Entity:p
-melm 130 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,Title-Uniform-entity,Title-Uniform-entity:w,Title-Uniform:s,Title-Uniform-entity:p
-melm 135 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,Title-Uniform-entity,Title-Uniform-entity:w,Title-Uniform:s,Title-Uniform-entity:p
-melm 150 Heading-Entity:w,Heading-Entity:p,Heading-Entity:s,Subject-Thesaurus
+# Geographic Term
+melm 155$a Term-geographic-heading:w,Term-geographic-heading:p,Term-geographic-heading:s,Term-geographic:w,Term-geographic:p,Heading:w,Heading:p,Heading:s
+melm 155 Term-geographic:w,Term-geographic:p,Term-geographic:s,Heading:w,Heading:p,Heading:s
+melm 455 Term-geographic-see:w,Term-geographic-see:p,Term-geographic-see:s,See:w,See:p,See:s
+melm 555 Term-geographic-see-also:w,Term-geographic-see-also:p,Term-geographic-see-also:s,See-also:w,See-also:p,See-also:s
 
-#210 Heading - Corporate Body Name
-#215 Heading - Territorial or Geographical Name
-#216 Heading - Trademark
-#220 Heading - Family Name
-#230 Heading - Uniform Title
-#235 Heading - Collective Uniform Title
-#240 Heading - Name/Title
-#245 Heading - Name/Collective Uniform Title
-#250 Heading - Topical Subject
-#260 Heading - Place Access
-#280 Heading - Form, Genre or Physical Characteristics
-#melm 712              Author,Author:p,Author:s
+# NOTE: subdivisions management missing from Koha
+# General Subdivision
+melm 180 Subject-subdivision,Heading:w,Heading:p,Heading:s
+# Geographic Subdivision
+melm 181 Geographic-subdivision,Heading:w,Heading:p,Heading:s
+# Chronological Subdivision
+melm 182 Chronological-subdivision,Heading:w,Heading:p,Heading:s
+# Form Subdivision
+melm 185 Form-subdivision,Heading:w,Heading:p,Heading:s
 
-############# Rejected forms ##################
-#melm 400$a See, See:w,See:p,See:s,personal-see,personal-see:w,personal-see:s,personal-see:p
-#melm 410$a See, See:w,See:p,See:s,corporate-see
-#melm 410$a See, See:w,See:p,See:s,Conference-see
-#melm 415$a See, See:w,See:p,See:s,Name-geographic-see
-##melm 416 Name-corporate
-#melm 440$a See, See:w,See:p,See:s,personal-see,personal-see:w,personal-see:s,personal-see:p
-#melm 430$a See, See:w,See:p,See:s,Title-Uniform-see,Title-Uniform-see:w,Title-Uniform-see:s,Title-Uniform-see:p
-#melm 435$a See, See:w,See:p,See:s,Title-Uniform-see,Title-Uniform-see:w,Title-Uniform-see:s,Title-Uniform-see:p
-#melm 450$a See, See:w,See:p,See:s,Subject-see,Subject-see:w,Subject-see:s,Subject-see,:p
-#melm 400 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,personal-See-Entity,personal-See-Entity:w,personal-See-Entity:s,personal-See-Entity:p
-#melm 410 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,corporate-See-Entity
-#melm 410 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,Conference-See-Entity
-#melm 415 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,Name-geographic-See-Entity
-##melm 416 Name-corporate
-#melm 440 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,personal-See-Entity,personal-See-Entity:w,personal-See-Entity:s,personal-See-Entity:p
-#melm 430 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,Title-Uniform-See-Entity,Title-Uniform-See-Entity:w,Title-Uniform-See-Entity:s,Title-Uniform-See-Entity:p
-#melm 435 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,Title-Uniform-See-Entity,Title-Uniform-See-Entity:w,Title-Uniform-See-Entity:s,Title-Uniform-See-Entity:p
-#melm 450 See-Entity, See-Entity:w,See-Entity:p,See-Entity:s,Subject-See-Entity,Subject-See-Entity:w,Subject-See-Entity:s,Subject-See-Entity,:p
-#
-##410 Heading - Corporate Body Name
-##415 Heading - Territorial or Geographical Name
-##416 Heading - Trademark
-##440 Heading - Family Name
-##430 Heading - Uniform Title
-##435 Heading - Collective Uniform Title
-##440 Heading - Name/Title
-##445 Heading - Name/Collective Uniform Title
-##450 Heading - Topical Subject
-##460 Heading - Place Access
-##480 Heading - Form, Genre or Physical Characteristics
-##melm 714             Author,Author:p,Author:s
-#
-############# Related forms ##################
-#melm 500$a personal-see-also,personal-see-also:w,personal-see-also:s,personal-see-also:p
-#melm 510$a corporate-see-also
-#melm 510$a Conference-see-also
-#melm 515$a Name-geographic-see-also
-##melm 416 Name-corporate
-#melm 540$a personal-see-also,personal-see-also:w,personal-see-also:s,personal-see-also:p
-#melm 530$a Title-Uniform-see-also,Title-Uniform-see-also:w,Title-Uniform-see-also:s,Title-Uniform-see-also:p
-#melm 535$a Title-Uniform-see-also,Title-Uniform-see-also:w,Title-Uniform-see-also:s,Title-Uniform-see-also:p
-#melm 550$a Subject-see-also,Subject-see-also:w,Subject-see-also:s,Subject-see-also:p
-##510 Heading - Corporate Body Name
-##515 Heading - Territorial or Geographical Name
-##516 Heading - Trademark
-##550 Heading - Family Name
-##530 Heading - Uniform Title
-##535 Heading - Collective Uniform Title
-##540 Heading - Name/Title
-###545 Heading - Name/Collective Uniform Title
-##550 Heading - Topical Subject
-##560 Heading - Place Access
-##580 Heading - Form, Genre or Physical Characteristics
-##melm 714             Author,Author:p,Author:s
-#
-############# Parallel forms ##################
-#melm 700$a personal-parallel,personal-parallel:w,personal-parallel:s,personal-parallel:p
-#melm 710$a corporate-parallel
-#melm 710$a Conference-parallel
-#melm 715$a Name-geographic-parallel
-##melm 716 Name-corporate
-#melm 770$a personal-parallel,personal-parallel:w,personal-parallel:s,personal-parallel:p
-#melm 730$a Title-Uniform-parallel,Title-Uniform-parallel:w,Title-Uniform-parallel:s,Title-Uniform-parallel:p
-#melm 735$a Title-Uniform-parallel,Title-Uniform-parallel:w,Title-Uniform-parallel:s,Title-Uniform-parallel:p
-#melm 750$a Subject-parallel,Subject-parallel:w,Subject-parallel:s,Subject-parallel:p
-#
-########### NOTES #################
-#melm 300$a            Note    !:w,!:p
-#melm 301$a            Note    !:w,!:p
-#melm 302$a            Note    !:w,!:p
-#melm 303$a            Note    !:w,!:p
-#melm 304$a            Note    !:w,!:p
-#melm 305$a            Note    !:w,!:p
-#melm 306$a            Note    !:w,!:p
-#melm 307$a            Note    !:w,!:p
-#melm 308$a            Note    !:w,!:p
-#melm 310$a            Note    !:w,!:p
-#melm 311$a            Note    !:w,!:p
-#melm 312$a            Note    !:w,!:p
-#melm 313$a            Note    !:w,!:p
-#melm 314$a            Note    !:w,!:p
-#melm 315$a            Note    !:w,!:p
-#melm 316$a            Note    !:w,!:p
-#melm 317$a            Note    !:w,!:p
-#melm 318$a            Note    !:w,!:p
-#melm 320$a            Note    !:w,!:p
-#melm 321$a            Note    !:w,!:p
-#melm 322$a            Note    !:w,!:p
-#melm 323$a            Note    !:w,!:p
-#melm 324$a            Note    !:w,!:p
-#melm 325$a            Note    !:w,!:p
-#melm 326$a            Note    !:w,!:p
-#melm 327$a            Note    !:w,!:p
-#melm 328$a            Note    !:w,!:p
-#melm 330$a            Note    !:w,!:p
-#melm 332$a            Note    !:w,!:p
-#melm 333$a            Note    !:w,!:p
-#melm 336$a            Note    !:w,!:p
-#melm 337$a            Note    !:w,!:p
-#melm 345$a            Note    !:w,!:p
-#####
index 31a680b..933c13e 100644 (file)
-
-# indexing rules. It
-# results in a server which provides a passable Bath level 0 and 1 service
-############################################################################
-# IMPORTANT : this file MUST be renamed record.abs : this name is "hardcoded" in zebra
-# the default record.abs is designed for MARC21.
-############################################################################
-# NOTE: This is designed to be used with the grs.marcxml input filter
-# for ISO2709 (ANSI Z39.2) or grs.xml for MARCXML-formatted records. It
-# won't work for the old grs.marc input filter, which yields a different
-# internal structure.
-
+# This is a fairly simple set of UNIMARC Authority indexing rules
 encoding utf-8
 name authorities
-attset auth1.att
+attset bib1.att
+attset gils.att
 esetname F @
 esetname B @
 
 marc usmarc.mar
 systag sysno rank
-xpath disable
+xpath enable
 
 all any
-melm 001               Local-Number
-melm 152$b             Authority/format-id
-#melm 005        Version-id
-#melm 015        IASDN
-
-
-########################
-# Coded fields
-########################
-#melm 100$a      date-entered-on-file:n:range(data,0,8),date-entered-on-file:s:range(data,0,8),auth-status:n:range(data,8,1),auth-status:s:range(data,8,1),language:n:range(data,9,3),language:s:range(data,9,3),char-encoding:w:range(data,13,4),char-encoding:s:range(data,13,4),ff100-17:w:range(data,17,3),ff100-21:w:range(data,21,2),ff100-23:w:range(data,23,1)
-
-#melm 101$a     Language
-#melm 102$a     Country-heading
-# Subject-Heading
-#melm 106$a     Vaut 0(inutilisable sujet-matiere),1 (utilisable sujet-matiere)ou 2(utilisable uniquement sujet-matiere)
-#melm 120$a Obligatoire sur Autorite NP : Sexe et discrimination
-#melm 123$a Obligatoire sur Autorite GEO : Localisation
-#melm 150$a Obligatoire sur Autorite CO : Type de collectivite
-# 4XX$3 5XX$3 7XX$3 authority number
-# 4XX$5 5XX$5 7XX$5 Linking type
-# 4XX$7 5XX$7 7XX$7 Script Cataloguing
-# 4XX$8 5XX$8 7XX$8 Language
-
-
-############ HEADINGS ##################
-melm 200$a Heading,Heading-Entity,Heading:s,personal-heading
-melm 210$a Heading,Heading-Entity,Heading:s,corporate-heading,Conference-heading
-melm 215$a Heading,Heading-Entity,Heading:s,Name-geographic
-#melm 216 Name-corporate
-melm 220$a Heading,Heading-Entity,Heading:s,personal-heading
-melm 230$a Heading,Heading-Entity,Heading:s,Title-Uniform
-melm 235$a Heading,Heading-Entity,Heading:s,Title-Uniform
-melm 240$a Heading,Heading-Entity,Heading:s,Name-Title
-melm 250$a Heading,Heading-Entity,Heading:s,Subject-heading, Subject-heading:s
-
-melm 200 Heading-Entity,Heading-Entity:s, personal-Heading-Entity
-melm 210 Heading-Entity,Heading-Entity:s,corporate-Heading-Entity
-melm 210 Heading-Entity,Heading-Entity:s,Conference-Heading-Entity
-melm 215 Heading-Entity,Heading-Entity:s,Name-geographic-Entity
-#melm 216 Name-corporate
-melm 220 Heading-Entity,Heading-Entity:s,personal-Heading-Entity
-melm 230 Heading-Entity,Heading-Entity:s,Title-Uniform-entity
-melm 235 Heading-Entity,Heading-Entity:s,Title-Uniform-entity
-melm 240 Heading-Entity,Heading-Entity:s,Name-Title-entity
-melm 250   Heading-Entity,Subject-Thesaurus
-
-#210 Heading - Corporate Body Name
-#215 Heading - Territorial or Geographical Name
-#216 Heading - Trademark
-#220 Heading - Family Name
-#230 Heading - Uniform Title
-#235 Heading - Collective Uniform Title
-#240 Heading - Name/Title
-#245 Heading - Name/Collective Uniform Title
-#250 Heading - Topical Subject
-#260 Heading - Place Access
-#280 Heading - Form, Genre or Physical Characteristics
-#melm 712              Author,Author:p,Author:s
-
-############ Rejected forms ##################
-melm 400$a See, See:s,See-Entity, personal-see,personal-see:w,personal-see:s,personal-see:p
-melm 410$a See, See:s,See-Entity, corporate-see
-melm 410$a See, See:s,See-Entity, Conference-see
-melm 415$a See, See:s,See-Entity, Name-geographic-see
-#melm 416 Name-corporate
-melm 440$a See, See:s,See-Entity, personal-see,personal-see:s
-melm 430$a See, See:s,See-Entity, Title-Uniform-see,Title-Uniform-see:s
-melm 435$a See, See:s,See-Entity, Title-Uniform-see,Title-Uniform-see:s
-melm 450$a See, See:s,See-Entity, Subject-see,Subject-see:s
-melm 400 See-Entity, personal-See-Entity,personal-See-Entity:s
-melm 410 See-Entity, corporate-See-Entity
-melm 410 See-Entity, Conference-See-Entity
-melm 415 See-Entity, Name-geographic-See-Entity
-#melm 416 Name-corporate
-melm 440 See-Entity, personal-See-Entity
-melm 430 See-Entity, Title-Uniform-See-Entity
-melm 435 See-Entity, Title-Uniform-See-Entity
-melm 435 See-Entity, Name-Title-See-Entity
-melm 450 See-Entity,Subject-See-Entity
-
-#410 Heading - Corporate Body Name
-#415 Heading - Territorial or Geographical Name
-#416 Heading - Trademark
-#440 Heading - Family Name
-#430 Heading - Uniform Title
-#435 Heading - Collective Uniform Title
-#440 Heading - Name/Title
-#445 Heading - Name/Collective Uniform Title
-#450 Heading - Topical Subject
-#460 Heading - Place Access
-#480 Heading - Form, Genre or Physical Characteristics
-#melm 714              Author,Author:p,Author:s
-
-############ Related forms ##################
-melm 500$a personal-see-also,personal-see-also:w,personal-see-also:s,personal-see-also:p
-melm 510$a corporate-see-also
-melm 510$a Conference-see-also
-melm 515$a Name-geographic-see-also
-#melm 416 Name-corporate
-melm 540$a personal-see-also,personal-see-also:w,personal-see-also:s,personal-see-also:p
-melm 530$a Title-Uniform-see-also,Title-Uniform-see-also:w,Title-Uniform-see-also:s,Title-Uniform-see-also:p
-melm 535$a Title-Uniform-see-also,Title-Uniform-see-also:w,Title-Uniform-see-also:s,Title-Uniform-see-also:p
-melm 540$a Name-Title-see-also,Name-Title-see-also:w,Name-Title-see-also:s,Name-Title-see-also:p
-melm 550$a Subject-see-also,Subject-see-also:w,Subject-see-also:s,Subject-see-also:p
-#510 Heading - Corporate Body Name
-#515 Heading - Territorial or Geographical Name
-#516 Heading - Trademark
-#550 Heading - Family Name
-#530 Heading - Uniform Title
-#535 Heading - Collective Uniform Title
-#540 Heading - Name/Title
-#545 Heading - Name/Collective Uniform Title
-#550 Heading - Topical Subject
-#560 Heading - Place Access
-#580 Heading - Form, Genre or Physical Characteristics
-#melm 714              Author,Author:p,Author:s
-
-############ Parallel forms ##################
-melm 700$a personal-parallel,personal-parallel:w,personal-parallel:s,personal-parallel:p
-melm 710$a corporate-parallel
-melm 710$a Conference-parallel
-melm 715$a Name-geographic-parallel
-#melm 716 Name-corporate
-melm 770$a personal-parallel,personal-parallel:w,personal-parallel:s,personal-parallel:p
-melm 730$a Title-Uniform-parallel,Title-Uniform-parallel:w,Title-Uniform-parallel:s,Title-Uniform-parallel:p
-melm 735$a Title-Uniform-parallel,Title-Uniform-parallel:w,Title-Uniform-parallel:s,Title-Uniform-parallel:p
-melm 740$a Name-Title-parallel,Name-Title-parallel:w,Name-Title-parallel:s,Name-Title-parallel:p
-melm 750$a Subject-parallel,Subject-parallel:w,Subject-parallel:s,Subject-parallel:p
-
-########## NOTES #################
-melm 300$a             Note
-melm 301$a             Note
-melm 302$a             Note
-melm 303$a             Note
-melm 304$a             Note
-melm 305$a             Note
-melm 306$a             Note
-melm 307$a             Note
-melm 308$a             Note
-melm 310$a             Note
-melm 311$a             Note
-melm 312$a             Note
-melm 313$a             Note
-melm 314$a             Note
-melm 315$a             Note
-melm 316$a             Note
-melm 317$a             Note
-melm 318$a             Note
-melm 320$a             Note
-melm 321$a             Note
-melm 322$a             Note
-melm 323$a             Note
-melm 324$a             Note
-melm 325$a             Note
-melm 326$a             Note
-melm 327$a             Note
-melm 328$a             Note
-melm 330$a             Note
-melm 332$a             Note
-melm 333$a             Note
-melm 336$a             Note
-melm 337$a             Note
-melm 345$a             Note
-
+melm 001 Local-Number
+#melm 942$a authtype
+melm 152$b authtype
+
+# Personal Name
+melm 200 Personal-name:w,Personal-name:p,Personal-name:s,Heading:w,Heading:p,Heading:s
+melm 200$a Personal-name-heading:w,Personal-name-heading:p,Personal-name-heading:s,Personal-name:w,Personal-name:p,Heading:w,Heading:p,Heading:s
+melm 400 Personal-name-see:w,Personal-name-see:p,Personal-name-see:s,See:w,See:p,See:s
+melm 500 Personal-name-see-also:w,Personal-name-see-also:p,Personal-name-see-also:s,See-also:w,See-also:p,See-also:s
+melm 700$a Personal-name-parallel:w,Personal-name-parallel:p,Personal-name-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Corporate Name
+melm 210$a Corporate-name-heading:w,Corporate-name-heading:p,Corporate-name-heading:s,Corporate-name:w,Corporate-name:p,Heading:w,Heading:p,Heading:s
+melm 210 Corporate-name:w,Corporate-name:p,Corporate-name:s,Heading:w,Heading:p,Heading:s
+melm 410 Corporate-name-see:w,Corporate-name-see:p,Corporate-name-see:s,See:w,See:p,See:s
+melm 510 Corporate-name-see-also:w,Corporate-name-see-also:p,Corporate-name-see-also:s,See-also:w,See-also:p,See-also:s
+melm 710 Corporate-name-parallel:w,Corporate-name-parallel:p,Corporate-name-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Meeting Name - Same as Corporate name in UNIMARC?
+melm 210$a Conference-name-heading:w,Conference-name-heading:p,Conference-name-heading:s,Conference-name:w,Conference-name:p,Heading:w,Heading:p,Heading:s
+melm 210 Conference-name:w,Conference-name:p,Conference-name:s,Heading:w,Heading:p,Heading:s
+melm 410 Conference-name-see:w,Conference-name-see:p,Conference-name-see:s,See:w,See:p,See:s
+melm 510 Conference-name-see-also:w,Conference-name-see-also:p,Conference-name-see-also:s,See-also:w,See-also:p,See-also:s
+melm 710 Corporate-name-parallel:w,Corporate-name-parallel:p,Corporate-name-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Uniform Title
+melm 230$a Title-uniform-heading:w,Title-uniform-heading:p,Title-uniform-heading:s,Title-uniform:w,Title-uniform:p,Heading:w,Heading:p,Heading:s
+melm 230 Title-uniform:w,Title-uniform:p,Title-uniform:s,Heading:w,Heading:p,Heading:s
+melm 430 Title-uniform-see:w,Title-uniform-see:p,Title-uniform-see:s,See:w,See:p,See:s
+melm 530 Title-uniform-see-also:w,Title-uniform-see-also:p,Title-uniform-see-also:s,See-also:w,See-also:p,See-also:s
+melm 730$a Title-uniform-parallel:w,Title-uniform-parallel:p,Title-uniform-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Second area for uniform titles in UNIMARC?
+melm 235$a Title-uniform-heading:w,Title-uniform-heading:p,Title-uniform-heading:s,Title-uniform:w,Title-uniform:p,Heading:w,Heading:p,Heading:s
+melm 235 Title-uniform:w,Title-uniform:p,Title-uniform:s,Heading:w,Heading:p,Heading:s
+melm 435 Title-uniform-see:w,Title-uniform-see:p,Title-uniform-see:s,See:w,See:p,See:s
+melm 535 Title-uniform-see-also:w,Title-uniform-see-also:p,Title-uniform-see-also:s,See-also:w,See-also:p,See-also:s
+melm 735$a Title-uniform-parallel:w,Title-uniform-parallel:p,Title-uniform-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Topical Term
+melm 250$a Subject-heading:w,Subject-heading:p,Subject-heading:s,Subject:w,Subject:p,Heading:w,Heading:p,Heading:s
+melm 250 Subject:w,Subject:p,Subject:s,Heading:w,Heading:p,Heading:s
+melm 450 Subject-see:w,Subject-see:p,Subject-see:s,See:w,See:p,See:s
+melm 550 Subject-see-also:w,Subject-see-also:p,Subject-see-also:s,See-also:w,See-also:p,See-also:s
+melm 750$a Subject-parallel:w,Subject-parallel:p,Subject-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Geographic Name
+melm 215$a Name-geographic-heading:w,Name-geographic-heading:w,Name-geographic-heading:s,Name-geographic:w,Name-geographic:p,Heading:w,Heading:p,Heading:s
+melm 215 Name-geographic:w,Name-geographic:p,Name-geographic:s,Heading:w,Heading:p,Heading:s
+melm 415 Name-geographic-see:w,Name-geographic-see:p,Name-geographic-see:s,See:w,See:p,See:s
+melm 515 Name-geographic-see-also:w,Name-geographic-see-also:p,Name-geographic-see-also:s,See-also:w,See-also:p,See-also:s
+melm 715$a Name-geographic-parallel:w,Name-geographic-parallel:p,Name-geographic-parallel:s,Parallel:w,Parallel:p,Parallel:s
+
+# Geographic Term - Not in UNIMARC?
+#melm 155$a Term-geographic-heading:w,Term-geographic-heading:p,Term-geographic-heading:s,Term-geographic:w,Term-geographic:p,Heading:w,Heading:p,Heading:s
+#melm 155 Term-geographic:w,Term-geographic:p,Term-geographic:s,Heading:w,Heading:p,Heading:s
+#melm 455 Term-geographic-see:w,Term-geographic-see:p,Term-geographic-see:s,See:w,See:p,See:s
+#melm 555 Term-geographic-see-also:w,Term-geographic-see-also:p,Term-geographic-see-also:s,See-also:w,See-also:p,See-also:s
+
+# NOTE: subdivisions management missing from Koha
+# Not in UNIMARC?
+# General Subdivision
+# melm 180 Subject-subdivision,Heading:w,Heading:p,Heading:s
+# Geographic Subdivision
+# melm 181 Geographic-subdivision,Heading:w,Heading:p,Heading:s
+# Chronological Subdivision
+# melm 182 Chronological-subdivision,Heading:w,Heading:p,Heading:s
+# Form Subdivision
+# melm 185 Form-subdivision,Heading:w,Heading:p,Heading:s
+melm 300$a    Note
+melm 301$a    Note
+melm 302$a    Note
+melm 303$a    Note
+melm 304$a    Note
+melm 305$a    Note
+melm 306$a    Note
+melm 307$a    Note
+melm 308$a    Note
+melm 310$a    Note
+melm 311$a    Note
+melm 312$a    Note
+melm 313$a    Note
+melm 314$a    Note
+melm 315$a    Note
+melm 316$a    Note
+melm 317$a    Note
+melm 318$a    Note
+melm 320$a    Note
+melm 321$a    Note
+melm 322$a    Note
+melm 323$a    Note
+melm 324$a    Note
+melm 325$a    Note
+melm 326$a    Note
+melm 327$a    Note
+melm 328$a    Note
+melm 330$a    Note
+melm 332$a    Note
+melm 333$a    Note
+melm 336$a    Note
+melm 337$a    Note
+melm 345$a    Note
index c9c6321..d828934 100644 (file)
@@ -13,18 +13,34 @@ modulePath: /usr/lib/idzebra-2.0/modules
 # Files that describe the attribute sets supported.
 attset: bib1.att
 attset: explain.att
-attset:gils.att
+attset: gils.att
 
 #systag sysno rank
+
 # Specify record type
+# group   .recordType[  .name  ]:  type
+# type is split into fundamental type. file-read-type . argument
+# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
+# http://www.indexdata.dk/zebra/doc/grs.tkl
+
+# Can use -g iso2709 to batch index raw iso2709 records in a single or
+# multiple files, or marcxml records that are split into separate files
+# the trailing .record tells zebraidx to use record.abs
 iso2709.recordType:grs.marcxml.record
+
+# Can use -g marcxml to batch index marcxml files
+# zebraidx uses record.abs because of <record> is the root element
+marcxml.recordType:grs.sgml
+
+# Koha uses grs.xml internally when updating a single record, no idea
+# why it knows to use record.abs
 recordType:grs.xml
+
 recordId: (bib1,Local-Number)  
 # was auth1
 storeKeys:1
 storeData:1
 
-
 # Lock File Area
 lockDir: __ZEBRA_LOCK_DIR__/authorities
 perm.anonymous:r
@@ -39,6 +55,6 @@ setTmpDir: __ZEBRA_DATA_DIR__/authorities/tmp
 keyTmpDir: __ZEBRA_DATA_DIR__/authorities/key
 
 # Approx. Memory usage during indexing
-memMax: 200M
+memMax: 50M
 rank:rank-1
 
index 68a7830..980c01a 100644 (file)
@@ -11,12 +11,29 @@ encoding: UTF-8
 # Files that describe the attribute sets supported.
 attset: bib1.att
 attset: explain.att
-attset:gils.att
+attset: gils.att
 
 # systag sysno rank
+
 # Specify record type
+# group   .recordType[  .name  ]:  type
+# type is split into fundamental type. file-read-type . argument
+# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
+# http://www.indexdata.dk/zebra/doc/grs.tkl
+
+# Can use -g iso2709 to batch index raw iso2709 records in a single or
+# multiple files, or marcxml records that are split into separate files
+# the trailing .record tells zebraidx to use record.abs
 iso2709.recordType:grs.marcxml.record
+
+# Can use -g marcxml to batch index marcxml files
+# zebraidx uses record.abs because of <record> is the root element
+marcxml.recordType:grs.sgml
+
+# Koha uses grs.xml internally when updating a single record, no idea
+# why it knows to use record.abs
 recordType:grs.xml
+
 recordId: (bib1,Local-number)
 storeKeys:1
 storeData:1
@@ -36,5 +53,5 @@ setTmpDir: __ZEBRA_DATA_DIR__/biblios/tmp
 keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key
 
 # Approx. Memory usage during indexing
-memMax: 500M
+memMax: 50M
 rank:rank-1
index 25fef87..3b2a7fc 100644 (file)
@@ -1,4 +1,104 @@
+<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl"><!-- TMPL_VAR NAME="LibraryName" --></a></h1>
 <!-- Begin Authorities Resident Search Box -->
-<div id="header_search">
+<div id="header_search" class="residentsearch">
+    <div id="authority_search" class="residentsearch">
+    <p class="tip">Enter authority heading ($a):</p>
+    <form name="f" action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
+        <input type="hidden" name="op" value="do_search" />
+        <input type="hidden" name="type" value="intranet" />
+        <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
+        <select id="authtypecode" name="authtypecode">
+        <!-- TMPL_LOOP NAME="authtypesloop" -->
+            <!-- TMPL_IF name="selected" -->
+            <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- TMPL_ELSE -->
+            <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- /TMPL_IF -->
+        <!-- /TMPL_LOOP -->
+        </select>
+        <input type="hidden" name="marclist" value="mainmainentry" />
+        <select name="operator">
+            <option value="contains">contains</option>
+            <option value="start">starts with</option>
+            <option value="is">is exactly</option>
+        </select>
+        <input id="value_anywhere" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
+        <select name="orderby">
+            <option value="">None</option>
+            <option value="HeadingAsc" selected="selected">Heading A-Z</option>
+            <option value="HeadingDsc">Heading Z-A</option>
+         </select>
+         <input type="submit" value="Search" />
+    </form>
+    </div>
+    <div id="main_heading" class="residentsearch">
+    <p class="tip">Enter authority heading:</p>
+    <form name="f" action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
+        <input type="hidden" name="op" value="do_search" />
+        <input type="hidden" name="type" value="intranet" />
+        <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
+        <select id="authtypecode" name="authtypecode">
+        <!-- TMPL_LOOP NAME="authtypesloop" -->
+            <!-- TMPL_IF name="selected" -->
+            <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- TMPL_ELSE -->
+            <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- /TMPL_IF -->
+        <!-- /TMPL_LOOP -->
+        </select>
+        <input type="hidden" name="marclist" value="mainentry" />
+        <input type="hidden" name="and_or" value="and" />
+        <input type="hidden" name="excluding" value="" />
+        <select name="operator">
+            <option value="contains">contains</option>
+            <option value="start">starts with</option>
+            <option value="is">is exactly</option>
+        </select>
+        <input id="value_mainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
+        <select name="orderby">
+            <option value="">None</option>
+            <option value="HeadingAsc" selected="selected">Heading A-Z</option>
+            <option value="HeadingDsc">Heading Z-A</option>
+        </select>
+        <input type="submit" value="Search" />
+    </form>
+    </div>
+    <div id="all_headings" class="residentsearch">
+    <p class="tip">Enter any authority field:</p>
+    <form name="f" action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
+        <input type="hidden" name="op" value="do_search" />
+        <input type="hidden" name="type" value="intranet" />
+        <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
+        <select id="authtypecode" name="authtypecode">
+        <!-- TMPL_LOOP NAME="authtypesloop" -->
+            <!-- TMPL_IF name="selected" -->
+            <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- TMPL_ELSE -->
+            <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
+            <!-- /TMPL_IF -->
+        <!-- /TMPL_LOOP -->
+        </select>
+        <input type="hidden" name="marclist" value="" />
+        <input type="hidden" name="and_or" value="and" />
+        <input type="hidden" name="excluding" value="" />
+        <select name="operator">
+            <option value="contains">contains</option>
+            <option value="start">starts with</option>
+            <option value="is">is exactly</option>
+        </select>
+        <input id="value_mainmainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
+        <select name="orderby">
+            <option value="">None</option>
+            <option value="HeadingAsc" selected="selected">Heading A-Z</option>
+            <option value="HeadingDsc">Heading Z-A</option>
+        </select>
+        <input type="submit" value="Search" />
+    </form>
+    </div>
+    <ul>
+        <li><a href="/cgi-bin/koha/authorities/authorities-home.pl#authority_search">Search Authorities</a></li>
+        <li><a href="/cgi-bin/koha/authorities/authorities-home.pl#main_heading">Search Main Heading</a></li>
+        <li><a href="/cgi-bin/koha/authorities/authorities-home.pl#all_headings">Search All Headings</a></li>
+    </ul>
 </div>
-<!-- End Authorities Resident Search Box -->
\ No newline at end of file
+<!-- End Authorities Resident Search Box -->
index 0a101ae..b67117c 100644 (file)
@@ -29,8 +29,8 @@
 
        //]]>
        </script>
-       
-  <span id="newmenuc"><form name="f2" method="post" action="authorities.pl">
+  <form name="f2" method="post" action="authorities.pl">       
+  <span id="newmenuc">
        <label for="add_authtypecode">New: </label>
         <select id="add_authtypecode" name="authtypecode">
 <!-- TMPL_LOOP name="authtypesloop" -->
@@ -42,5 +42,5 @@
 <!-- /TMPL_LOOP -->
         </select>
       <input type="submit" value="Add" class="button" />
-  </form></span>
-</div>
\ No newline at end of file
+  </span></form>
+</div>
index 9ba53f5..76203e9 100644 (file)
@@ -26,81 +26,13 @@ function searchauthority() {
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Authorities</div>
 
 <div id="doc" class="yui-t7">
-   
-   <div id="bd">
-       <div id="yui-main">
-       <div class="yui-g">
-       
-       <!-- TMPL_INCLUDE NAME="authorities-toolbar.inc" -->
-
-<fieldset id="authorities_authorities_home_search">
-  <legend>Authority search</legend>
-
-  <form name="f" action="/cgi-bin/koha/authorities/authorities-home.pl" method="post">
-    <input type="hidden" name="op" value="do_search" />
-    <input type="hidden" name="type" value="intranet" />
-    <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-
-    <p><label for="authtypecode">Search on</label>
-          <select id="authtypecode" name="authtypecode">
-<!-- TMPL_LOOP NAME="authtypesloop" -->
-  <!-- TMPL_IF name="selected" -->
-            <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
-  <!-- TMPL_ELSE -->
-            <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
-  <!-- /TMPL_IF -->
-<!-- /TMPL_LOOP -->
-          </select>
-    </p>
-    <p>
-          <label for="value_mainmainentry">Main entry ($a only)</label>
-          <input type="hidden" name="marclist" value="mainmainentry" />
-          <select name="operator">
-           <option value="contains">contains</option>
-           <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-        </select>
-        <input id="value_mainmainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-    </p>
-    <p>
-        <label for="value_mainentry">Main entry</label>
-        <input type="hidden" name="marclist" value="mainentry" />
-        <input type="hidden" name="and_or" value="and" />
-        <input type="hidden" name="excluding" value="" />
-        <select name="operator">
-            <option value="contains">contains</option>
-            <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-        </select>
-        <input id="value_mainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-      </p>
-    <p><label for="value_anywhere">Anywhere</label>
-          <input type="hidden" name="marclist" value="" />
-          <input type="hidden" name="and_or" value="and" />
-          <input type="hidden" name="excluding" value="" />
-          <select name="operator">
-            <option value="contains">contains</option>
-            <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-          </select>
-          <input id="value_anywhere" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-    </p>
-
-    <div id="action">
-          <p><label>Order by :</label><select name="orderby">
-         <option value="">None</option>
-           <option value="HeadingAsc" selected="SELECTED">Heading Ascendant</option>
-           <option value="HeadingDsc">Heading Descendant</option>
-         </select>
-      <input type="submit" value="Start search">
-      </p>
-    </div>
-  </form>
-</fieldset>
+  <div id="bd">
+    <div id="yui-main">
+    <div class="yui-g">
     
+    <!-- TMPL_INCLUDE NAME="authorities-toolbar.inc" -->
 
-
-</div>
-</div>
-
+    </div>
+    </div>
+  </div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
index 750bac5..3e9cab5 100644 (file)
@@ -4,11 +4,11 @@
 <script type="text/javascript" >
 //<![CDATA[
 function confirm_deletion(id) {
-       
-       var is_confirmed = confirm('Are you sure you want to delete this authority?');
-       if (is_confirmed) {
-               window.location="authorities-home.pl?op=delete&amp;authid="+id;
-       }
+    
+    var is_confirmed = confirm('Are you sure you want to delete this authority?');
+    if (is_confirmed) {
+        window.location="authorities-home.pl?op=delete&amp;authid="+id;
+    }
 }
 function Help() {
     newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
@@ -35,11 +35,10 @@ function searchauthority() {
 <div id="doc" class="yui-t7">
    
    <div id="bd">
-       <div id="yui-main">
-       <div class="yui-g">
-       
-       <!-- TMPL_INCLUDE NAME="authorities-toolbar.inc" -->
-
+    <div id="yui-main">
+    <div class="yui-g">
+    
+    <!-- TMPL_INCLUDE NAME="authorities-toolbar.inc" -->
 <h1>Authority search results</h1>
 
 <!-- TMPL_IF name="total" -->
@@ -84,71 +83,8 @@ function searchauthority() {
 
 <!-- TMPL_ELSE -->
   No results found
-  
-  <fieldset id="authorities_authorities_home_search">
-  <legend>Authority search</legend>
-
-  <form name="f" action="/cgi-bin/koha/authorities/authorities-home.pl" method="post">
-    <input type="hidden" name="op" value="do_search" />
-    <input type="hidden" name="type" value="intranet" />
-    <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
-
-    <p><label for="authtypecode">Search on</label>
-          <select id="authtypecode" name="authtypecode">
-<!-- TMPL_LOOP NAME="authtypesloop" -->
-  <!-- TMPL_IF name="selected" -->
-            <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="authtypetext" --></option>
-  <!-- TMPL_ELSE -->
-            <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
-  <!-- /TMPL_IF -->
-<!-- /TMPL_LOOP -->
-          </select>
-          <label for="value_mainmainentry">Main entry ($a only)</label>
-          <input type="hidden" name="marclist" value="mainmainentry" />
-          <select name="operator">
-           <option value="contains">contains</option>
-           <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-        </select>
-        <input id="value_mainmainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-    </p>
-    <p>
-        <label for="value_mainentry">Main entry</label>
-        <input type="hidden" name="marclist" value="mainentry" />
-        <input type="hidden" name="and_or" value="and" />
-        <input type="hidden" name="excluding" value="" />
-        <select name="operator">
-            <option value="contains">contains</option>
-            <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-        </select>
-        <input id="value_mainentry" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-      </p>
-    <p><label for="value_anywhere">Anywhere</label>
-          <input type="hidden" name="marclist" value="" />
-          <input type="hidden" name="and_or" value="and" />
-          <input type="hidden" name="excluding" value="" />
-          <select name="operator">
-            <option value="contains">contains</option>
-            <option value="start">starts with</option>
-            <option value="is">is exactly</option>
-          </select>
-          <input id="value_anywhere" type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
-    </p>
-
-    <div id="action">
-          <p><label>Order by :</label><select name="orderby">
-         <option value="">None</option>
-           <option value="HeadingAsc" selected="SELECTED">Heading Ascendant</option>
-           <option value="HeadingDsc">Heading Descendant</option>
-         </select>
-      <input type="submit" value="Start search">
-      </p>
-    </div>
-  </form>
-</fieldset>
 <!-- /TMPL_IF -->
 </div>
 </div>
-
+</div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl
new file mode 100644 (file)
index 0000000..2b038c9
--- /dev/null
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
+<xsl:stylesheet version="1.0"
+  xmlns:marc="http://www.loc.gov/MARC21/slim"
+  xmlns:dc="http://purl.org/dc/elements/1.1/"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  exclude-result-prefixes="marc">
+       <xsl:import href="MARC21slimUtils.xsl"/>
+       <xsl:output method="xml" indent="yes"/>
+       
+       <xsl:template match="/">
+                       <xsl:apply-templates/>
+       </xsl:template>
+
+       <xsl:template match="marc:record">
+               <xsl:variable name="leader" select="marc:leader"/>
+               <xsl:variable name="leader6" select="substring($leader,7,1)"/>
+               <xsl:variable name="leader7" select="substring($leader,8,1)"/>
+               <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
+
+         <dc:dc>
+                       <xsl:for-each select="marc:datafield[@tag=245]">
+                               <dc:title>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abfghk</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:title>
+                       </xsl:for-each>
+
+       
+                       <xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">
+                               <dc:creator>
+                                       <xsl:value-of select="."/>
+                               </dc:creator>
+                       </xsl:for-each>
+
+                       <dc:type>               
+                               <xsl:if test="$leader7='c'">
+                                       <xsl:attribute name="collection">yes</xsl:attribute>
+                               </xsl:if>
+
+                               <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+                                       <xsl:attribute name="manuscript">yes</xsl:attribute>
+                               </xsl:if>
+
+                               <xsl:choose>
+                                       <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
+                                       <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+                                       <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+                                       <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>
+                                       <xsl:when test="$leader6='k'">still image</xsl:when>
+                                       <xsl:when test="$leader6='g'">moving image</xsl:when>
+                                       <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
+                                       <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
+                                       <xsl:when test="$leader6='p'">mixed material</xsl:when>
+                               </xsl:choose>
+                       </dc:type>
+
+                       <xsl:for-each select="marc:datafield[@tag=655]">
+                               <dc:type>
+                                       <xsl:value-of select="."/>
+                               </dc:type>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=260]">
+                               <dc:publisher>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">ab</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:publisher>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">
+                               <dc:date>
+                                       <xsl:value-of select="."/>
+                               </dc:date>                              
+                       </xsl:for-each>
+
+                       <dc:language>
+                               <xsl:value-of select="substring($controlField008,36,3)"/>
+                       </dc:language>
+
+                       <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
+                               <dc:format>
+                                       <xsl:value-of select="."/>
+                               </dc:format>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=520]">
+                               <dc:description>
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>
+                               </dc:description>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=521]">
+                               <dc:description>
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>
+                               </dc:description>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">
+                               <dc:description>
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>
+                               </dc:description>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=600]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=610]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=611]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+               
+                       <xsl:for-each select="marc:datafield[@tag=630]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=650]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=653]">
+                               <dc:subject>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:subject>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=752]">
+                               <dc:coverage>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcd</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:coverage>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=530]">
+                               <dc:relation type="original">
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">abcdu</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:relation>  
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">
+                               <dc:relation>
+                                       <xsl:call-template name="subfieldSelect">
+                                               <xsl:with-param name="codes">ot</xsl:with-param>
+                                       </xsl:call-template>
+                               </dc:relation>  
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=856]">
+                               <dc:identifier>
+                                       <xsl:value-of select="marc:subfield[@code='u']"/>
+                               </dc:identifier>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=506]">
+                               <dc:rights>
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>
+                               </dc:rights>
+                       </xsl:for-each>
+
+                       <xsl:for-each select="marc:datafield[@tag=540]">
+                               <dc:rights>
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>
+                               </dc:rights>
+                       </xsl:for-each>
+               </dc:dc>
+       </xsl:template>
+</xsl:stylesheet>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl
new file mode 100644 (file)
index 0000000..ff35524
--- /dev/null
@@ -0,0 +1,1873 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns="http://www.loc.gov/mods/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">\r
+       <xsl:include href="MARC21slimUtils.xsl"/>\r
+       <xsl:output method="xml" indent="yes"/>\r
+       \r
+       <xsl:template match="/">\r
+               <collection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/  http://www.loc.gov/standards/marcxml/schema/mods.xsd">\r
+                       <xsl:apply-templates/>\r
+               </collection>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:record">\r
+               <mods>\r
+                       <xsl:variable name="leader" select="marc:leader"/>\r
+                       <xsl:variable name="leader6" select="substring($leader,7,1)"/>\r
+                       <xsl:variable name="leader7" select="substring($leader,8,1)"/>\r
+                       <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>\r
+\r
+                       <xsl:variable name="typeOf008">\r
+                               <xsl:choose>\r
+                                       <xsl:when test="$leader6='a'">\r
+                                               <xsl:choose>\r
+                                                       <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>\r
+                                                       <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>                             \r
+                                               </xsl:choose>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$leader6='t'">BK</xsl:when>\r
+                                       <xsl:when test="$leader6='p'">MM</xsl:when>\r
+                                       <xsl:when test="$leader6='m'">CF</xsl:when>     \r
+                                       <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>     \r
+                                       <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>                             \r
+                                       <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>                             \r
+                               </xsl:choose>\r
+                       </xsl:variable>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=245]">\r
+                               <titleInfo>\r
+                                       <xsl:variable name="title">\r
+                                               <xsl:call-template name="chopPunctuation">\r
+                                                       <xsl:with-param name="chopString">\r
+                                                               <xsl:call-template name="subfieldSelect">\r
+                                                                       <xsl:with-param name="codes">abfghk</xsl:with-param>\r
+                                                               </xsl:call-template>\r
+                                                       </xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </xsl:variable>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="@ind2>0">\r
+                                                       <nonSort>\r
+                                                               <xsl:value-of select="substring($title,1,@ind2)"/>\r
+                                                       </nonSort>\r
+                                                       <title>\r
+                                                               <xsl:value-of select="substring($title,@ind2+1)"/>\r
+                                                       </title>\r
+                                               </xsl:when>\r
+                                               <xsl:otherwise>\r
+                                                       <title>\r
+                                                               <xsl:value-of select="$title"/>\r
+                                                       </title>\r
+                                               </xsl:otherwise>\r
+                                       </xsl:choose>\r
+                                       <xsl:call-template name="part"/>\r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+                       \r
+                       <xsl:for-each select="marc:datafield[@tag=210]">\r
+                               <titleInfo type="abbreviated">\r
+                                       <title>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </title>\r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+                       \r
+                       <xsl:for-each select="marc:datafield[@tag=242]">\r
+                               <titleInfo type="translated">\r
+                                       <title>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">abh</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </title>\r
+                                       <xsl:call-template name="part"/>\r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+                       \r
+                       <xsl:for-each select="marc:datafield[@tag=246]">\r
+                               <titleInfo type="alternative">\r
+                                       <xsl:for-each select="marc:subfield[@code='i']">\r
+                                               <xsl:attribute name="displayLabel">\r
+                                                       <xsl:value-of select="text()"/>\r
+                                               </xsl:attribute>\r
+                                       </xsl:for-each>\r
+                                       <title>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">abfh</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </title>\r
+                                       <xsl:call-template name="part"/>                        \r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">\r
+                               <titleInfo type="uniform">\r
+                                       <title>\r
+                                               <xsl:variable name="str">\r
+                                                       <xsl:for-each select="marc:subfield">\r
+                                                               <xsl:if test="(contains('adfhklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">\r
+                                                                       <xsl:value-of select="text()"/><xsl:text> </xsl:text>\r
+                                                               </xsl:if>\r
+                                                       </xsl:for-each>\r
+                                               </xsl:variable>\r
+                                               <xsl:value-of select="substring($str,1,string-length($str)-1)"/>\r
+                                       </title>\r
+                                       <xsl:call-template name="part"/>                        \r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=740][@ind2!=2]">\r
+                               <titleInfo type="alternative">\r
+                                       <title>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">ah</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </title>\r
+                                       <xsl:call-template name="part"/>                        \r
+                               </titleInfo>\r
+                       </xsl:for-each>\r
+                       \r
+                       <xsl:for-each select="marc:datafield[@tag=100]">\r
+                               <name type="personal">\r
+                                       <xsl:call-template name="nameABCDQ"/>\r
+                                       <xsl:call-template name="affiliation"/>\r
+                                       <role>creator</role>\r
+                                       <xsl:call-template name="role"/>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=110]">\r
+                               <name type="corporate">\r
+                                       <xsl:call-template name="nameABCDN"/>\r
+                                       <role>creator</role>\r
+                                       <xsl:call-template name="role"/>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=111]">\r
+                               <name type="conference">\r
+                                       <xsl:call-template name="nameACDEQ"/>\r
+                                       <role>creator</role>\r
+                                       <xsl:for-each select="marc:subfield[@code='4']">\r
+                                               <role><xsl:value-of select="."/></role>\r
+                                       </xsl:for-each>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=700][not(marc:subfield[@code='t'])]">\r
+                               <name type="personal">\r
+                                       <xsl:call-template name="nameABCDQ"/>\r
+                                       <xsl:call-template name="affiliation"/>\r
+                                       <xsl:call-template name="role"/>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=710][not(marc:subfield[@code='t'])]">\r
+                               <name type="corporate">\r
+                                       <xsl:call-template name="nameABCDN"/>\r
+                                       <xsl:call-template name="role"/>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=711][not(marc:subfield[@code='t'])]">\r
+                               <name type="conference">\r
+                                       <xsl:call-template name="nameACDEQ"/>\r
+                                       <xsl:for-each select="marc:subfield[@code='4']">\r
+                                               <role><xsl:value-of select="."/></role>\r
+                                       </xsl:for-each>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=720][not(marc:subfield[@code='t'])]">\r
+                               <name>\r
+                                       <xsl:if test="@ind1=1">\r
+                                               <xsl:attribute name="type">personal</xsl:attribute>\r
+                                       </xsl:if>\r
+                                       <namePart>\r
+                                               <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                                       </namePart>\r
+                                       <xsl:call-template name="role"/>\r
+                               </name>\r
+                       </xsl:for-each>\r
+\r
+                       <typeOfResource>                \r
+                               <xsl:if test="$leader7='c'">\r
+                                       <xsl:attribute name="collection">yes</xsl:attribute>\r
+                               </xsl:if>\r
+                               <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">\r
+                                       <xsl:attribute name="manuscript">yes</xsl:attribute>\r
+                               </xsl:if>\r
+\r
+                               <xsl:choose>\r
+                                       <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>\r
+                                       <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>\r
+                                       <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>\r
+                                       <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>\r
+                                       <xsl:when test="$leader6='k'">still image</xsl:when>\r
+                                       <xsl:when test="$leader6='g'">moving image</xsl:when>\r
+                                       <xsl:when test="$leader6='r'">three dimensional object</xsl:when>\r
+                                       <xsl:when test="$leader6='m'">software, multimedia</xsl:when>\r
+                                       <xsl:when test="$leader6='p'">mixed material</xsl:when>\r
+                               </xsl:choose>\r
+                       </typeOfResource>\r
+\r
+                               <xsl:if test="substring($controlField008,26,1)='d'">\r
+                                       <genre authority="marc">globe</genre>\r
+                               </xsl:if>\r
+                       \r
+                               <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">\r
+                                       <genre authority="marc">remote sensing image</genre>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='MP'">\r
+                                       <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">\r
+                                                       <genre authority="marc">map</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">\r
+                                                       <genre authority="marc">atlas</genre>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='SE'">\r
+                                       <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-21='d'">\r
+                                                       <genre authority="marc">database</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-21='l'">       \r
+                                                       <genre authority="marc">loose-leaf</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-21='m'">\r
+                                                       <genre authority="marc">series</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-21='n'">\r
+                                                       <genre authority="marc">newspaper</genre>       \r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-21='p'">\r
+                                                       <genre authority="marc">periodical</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-21='w'">\r
+                                                       <genre authority="marc">web site</genre>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">\r
+                                       <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="contains($controlField008-24,'a')">\r
+                                                       <genre authority="marc">abstract or summary</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'b')">\r
+                                                       <genre authority="marc">bibliography</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'c')">\r
+                                                       <genre authority="marc">catalog</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'d')">\r
+                                                       <genre authority="marc">dictionary</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'e')">\r
+                                                       <genre authority="marc">encyclopedia</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'f')">\r
+                                                       <genre authority="marc">handbook</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'g')">\r
+                                                       <genre authority="marc">legal article</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'i')">\r
+                                                       <genre authority="marc">index</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'k')">\r
+                                                       <genre authority="marc">discography</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'l')">\r
+                                                       <genre authority="marc">legislation</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'m')">\r
+                                                       <genre authority="marc">theses</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'n')">\r
+                                                       <genre authority="marc">survey of literature</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'o')">\r
+                                                       <genre authority="marc">review</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'p')">\r
+                                                       <genre authority="marc">programmed text</genre>\r
+                                               </xsl:when>                                     \r
+                                               <xsl:when test="contains($controlField008-24,'q')">\r
+                                                       <genre authority="marc">filmography</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'r')">\r
+                                                       <genre authority="marc">directory</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'s')">\r
+                                                       <genre authority="marc">statistics</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'t')">\r
+                                                       <genre authority="marc">technical report</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'v')">\r
+                                                       <genre authority="marc">legal case and case notes</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'w')">\r
+                                                       <genre authority="marc">law report or digest</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="contains($controlField008-24,'z')">\r
+                                                       <genre authority="marc">treaty</genre>\r
+                                               </xsl:when>      \r
+                                       </xsl:choose>\r
+                                       <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-29='1'">\r
+                                                       <genre authority="marc">conference publication</genre>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='CF'">\r
+                                       <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-26='a'">\r
+                                                       <genre authority="marc">numeric data</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-26='e'">\r
+                                                       <genre authority="marc">database</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-26='f'">\r
+                                                       <genre authority="marc">font</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-26='g'">\r
+                                                       <genre authority="marc">game</genre>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='BK'">\r
+                                       <xsl:if test="substring($controlField008,25,1)='j'">\r
+                                               <genre authority="marc">patent</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="substring($controlField008,31,1)='1'">\r
+                                               <genre authority="marc">festschrift</genre>\r
+                                       </xsl:if>\r
+\r
+                                       <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>\r
+                                       <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">\r
+                                               <genre authority="marc">biography</genre>\r
+                                       </xsl:if>\r
+\r
+                                       <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-33='e'">\r
+                                                       <genre authority="marc">essay</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='d'">\r
+                                                       <genre authority="marc">drama</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='c'">\r
+                                                       <genre authority="marc">comic strip</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='l'">\r
+                                                       <genre authority="marc">fiction</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='h'">\r
+                                                       <genre authority="marc">humor, satire</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='i'">\r
+                                                       <genre authority="marc">letter</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='f'">\r
+                                                       <genre authority="marc">novel</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='j'">\r
+                                                       <genre authority="marc">short story</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='s'">\r
+                                                       <genre authority="marc">speech</genre>\r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='MU'">\r
+                                       <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>\r
+                                       <xsl:if test="contains($controlField008-30-31,'b')">\r
+                                               <genre authority="marc">biography</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'c')">\r
+                                               <genre authority="marc">conference publication</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'d')">\r
+                                               <genre authority="marc">drama</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'e')">\r
+                                               <genre authority="marc">essay</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'f')">\r
+                                               <genre authority="marc">fiction</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'o')">\r
+                                               <genre authority="marc">folktale</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'h')">\r
+                                               <genre authority="marc">history</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'k')">\r
+                                               <genre authority="marc">humor, satire</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'m')">\r
+                                               <genre authority="marc">memoir</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'p')">\r
+                                               <genre authority="marc">poetry</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'r')">\r
+                                               <genre authority="marc">rehersal</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'g')">\r
+                                               <genre authority="marc">reporting</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'s')">\r
+                                               <genre authority="marc">sound</genre>\r
+                                       </xsl:if>\r
+                                       <xsl:if test="contains($controlField008-30-31,'l')">\r
+                                               <genre authority="marc">speech</genre>\r
+                                       </xsl:if>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$typeOf008='VM'">\r
+                                       <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="$controlField008-33='a'">\r
+                                                       <genre authority="marc">art original</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='b'">\r
+                                                       <genre authority="marc">kit</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='c'">\r
+                                                       <genre authority="marc">art reproduction</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='d'">\r
+                                                       <genre authority="marc">diorama</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='f'">\r
+                                                       <genre authority="marc">filmstrip</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='g'">\r
+                                                       <genre authority="marc">legal article</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='i'">\r
+                                                       <genre authority="marc">picture</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='k'">\r
+                                                       <genre authority="marc">graphic</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='l'">\r
+                                                       <genre authority="marc">technical drawing</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='m'">\r
+                                                       <genre authority="marc">motion picture</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='n'">\r
+                                                       <genre authority="marc">chart</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='o'">\r
+                                                       <genre authority="marc">flash card</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='p'">\r
+                                                       <genre authority="marc">microscope slide</genre>\r
+                                               </xsl:when>                                     \r
+                                               <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">\r
+                                                       <genre authority="marc">model</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='r'">\r
+                                                       <genre authority="marc">realia</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='s'">\r
+                                                       <genre authority="marc">slide</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='t'">\r
+                                                       <genre authority="marc">transparency</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='v'">\r
+                                                       <genre authority="marc">videorecording</genre>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="$controlField008-33='w'">\r
+                                                       <genre authority="marc">toy</genre>\r
+                                               </xsl:when> \r
+                                       </xsl:choose>\r
+                               </xsl:if>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=655]">\r
+                                       <genre authority="marc">\r
+                                               <xsl:attribute name="authority">\r
+                                                       <xsl:value-of select="marc:subfield[@code='2']"/>\r
+                                               </xsl:attribute>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">abvxyz</xsl:with-param>\r
+                                                       <xsl:with-param name="delimeter">-</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </genre>\r
+                               </xsl:for-each>\r
+\r
+                       <publicationInfo>\r
+                               <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"/>\r
+                               \r
+                               <xsl:if test="translate($MARCpublicationCode,'|','')">\r
+                                       <placeCode authority="marc">\r
+                                               <xsl:value-of select="$MARCpublicationCode"/>\r
+                                       </placeCode>\r
+                               </xsl:if>\r
+                       \r
+                               <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">\r
+                                       <placeCode authority="iso3166">\r
+                                               <xsl:value-of select="."/>\r
+                                       </placeCode>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a' or @code='b' or @code='c' or @code='g']">\r
+                                       <xsl:choose>\r
+                                               <xsl:when test="@code='a'">\r
+                                                       <place>\r
+                                                               <xsl:call-template name="chopPunctuation">\r
+                                                                       <xsl:with-param name="chopString" select="."/>\r
+                                                               </xsl:call-template>\r
+                                                       </place>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="@code='b'">\r
+                                                       <publisher>\r
+                                                               <xsl:call-template name="chopPunctuation">\r
+                                                                       <xsl:with-param name="chopString" select="."/>\r
+                                                               </xsl:call-template>\r
+                                                       </publisher>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="@code='c'">\r
+                                                       <dateIssued>\r
+                                                               <xsl:call-template name="chopPunctuation">\r
+                                                                       <xsl:with-param name="chopString" select="."/>\r
+                                                               </xsl:call-template>\r
+                                                       </dateIssued>\r
+                                               </xsl:when>\r
+                                               <xsl:when test="@code='g'">\r
+                                                       <dateCreated>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </dateCreated>                  \r
+                                               </xsl:when>\r
+                                       </xsl:choose>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:variable name="dataField260c">\r
+                                       <xsl:call-template name="chopPunctuation">\r
+                                               <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"/>\r
+                                       </xsl:call-template>\r
+                               </xsl:variable>\r
+\r
+                               <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"/>\r
+                               <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"/>\r
+                               <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"/>\r
+               \r
+                               <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">\r
+                                       <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">\r
+                                               <dateIssued encoding="marc">\r
+                                                       <xsl:value-of select="$controlField008-7-10"/>\r
+                                               </dateIssued>\r
+                                       </xsl:if>\r
+                               </xsl:if>\r
+               \r
+                               <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">\r
+                                       <xsl:if test="$controlField008-7-10">\r
+                                               <dateIssued encoding="marc" point="start">\r
+                                                       <xsl:value-of select="$controlField008-7-10"/>\r
+                                               </dateIssued>\r
+                                       </xsl:if>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">\r
+                                       <xsl:if test="$controlField008-11-14">\r
+                                               <dateIssued encoding="marc" point="end">\r
+                                                       <xsl:value-of select="$controlField008-11-14"/>\r
+                                               </dateIssued>\r
+                                       </xsl:if>\r
+                               </xsl:if>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">\r
+                                       <dateCaptured encoding="iso8601">\r
+                                               <xsl:value-of select="."/>\r
+                                       </dateCaptured>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">\r
+                                       <dateCaptured encoding="iso8601" point="start">\r
+                                               <xsl:value-of select="."/>\r
+                                       </dateCaptured>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">\r
+                                       <dateCaptured encoding="iso8601" point="end">\r
+                                               <xsl:value-of select="."/>\r
+                                       </dateCaptured>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">\r
+                                       <edition>\r
+                                               <xsl:value-of select="."/>\r
+                                       </edition>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:leader">\r
+                                       <issuance>\r
+                                               <xsl:choose>\r
+                                                       <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>\r
+                                                       <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>                                                     \r
+                                               </xsl:choose>\r
+                                       </issuance>\r
+                               </xsl:for-each>         \r
+                               \r
+                               <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">\r
+                                       <frequency>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </frequency>\r
+                               </xsl:for-each>                                                         \r
+                       </publicationInfo>\r
+\r
+\r
+                       <xsl:for-each select="marc:controlfield[@tag=041]">\r
+                               <xsl:for-each select="marc:subfield[@code='a' or @code='d' or @code='e']">\r
+                                       <language>\r
+                                               <xsl:choose>\r
+                                                       <xsl:when test="../marc:subfield[@code='2']">\r
+                                                               <xsl:attribute name="authority">rfc3066</xsl:attribute>\r
+                                                       </xsl:when>\r
+                                                       <xsl:otherwise>\r
+                                                               <xsl:attribute name="authority">iso639-2b</xsl:attribute>                                               \r
+                                                       </xsl:otherwise>\r
+                                               </xsl:choose>\r
+                                               <xsl:value-of select="text()"/>\r
+                                       </language>\r
+                               </xsl:for-each>\r
+                       </xsl:for-each>                 \r
+\r
+                       <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"/>\r
+                       <xsl:if test="$controlField008-35-37">\r
+                               <language authority="iso639-2b">\r
+                                       <xsl:value-of select="substring($controlField008,36,3)"/>\r
+                               </language>\r
+                       </xsl:if>\r
+\r
+                       <xsl:variable name="physicalDescription">\r
+                               <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a' or substring(.,12,1)='b']">\r
+                                       <digitalOrigin>reformatted digital</digitalOrigin>\r
+                               </xsl:if>\r
+\r
+                               <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>\r
+                               <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>\r
+\r
+                               <xsl:variable name="check008-23">\r
+                                       <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">\r
+                                               <xsl:value-of select="true()"/>\r
+                                       </xsl:if>\r
+                               </xsl:variable>\r
+\r
+                               <xsl:variable name="check008-29">\r
+                                       <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">\r
+                                               <xsl:value-of select="true()"/>\r
+                                       </xsl:if>\r
+                               </xsl:variable>\r
+\r
+                               <xsl:choose>\r
+                                       <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">\r
+                                               <form><controlled>braille</controlled></form>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">\r
+                                               <form><controlled>electronic</controlled></form>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">\r
+                                               <form><controlled>microfiche</controlled></form>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">\r
+                                               <form><controlled>microfilm</controlled></form>\r
+                                       </xsl:when>\r
+                               </xsl:choose>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">\r
+                                       <internetMediaType>\r
+                                               <xsl:value-of select="."/>\r
+                                       </internetMediaType>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">\r
+                                       <form>\r
+                                               <unControlled>\r
+                                                       <xsl:value-of select="."/>\r
+                                               </unControlled>\r
+                                       </form>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:datafield[@tag=300]">\r
+                                       <extent>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">abce</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </extent>\r
+                               </xsl:for-each>\r
+                       </xsl:variable>\r
+\r
+                       <xsl:if test="string-length(normalize-space($physicalDescription))">\r
+                               <physicalDescription>\r
+                                       <xsl:copy-of select="$physicalDescription"/>\r
+                               </physicalDescription>\r
+                       </xsl:if>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=520]">\r
+                               <abstract>\r
+                                       <xsl:call-template name="uri"/>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </abstract>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=505]">\r
+                               <tableOfContents>\r
+                                       <xsl:call-template name="uri"/>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">agrt</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </tableOfContents>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=521]">\r
+                               <targetAudience>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </targetAudience>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">\r
+                               <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>\r
+                               <xsl:choose>\r
+                                       <xsl:when test="$controlField008-22='d'">\r
+                                               <targetAudience>adolescent</targetAudience>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$controlField008-22='e'">\r
+                                               <targetAudience>adult</targetAudience>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$controlField008-22='g'">\r
+                                               <targetAudience>general</targetAudience>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">\r
+                                               <targetAudience>juvenile</targetAudience>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$controlField008-22='a'">\r
+                                               <targetAudience>preschool</targetAudience>\r
+                                       </xsl:when>\r
+                                       <xsl:when test="$controlField008-22='f'">\r
+                                               <targetAudience>specialized</targetAudience>\r
+                                       </xsl:when>\r
+                               </xsl:choose>\r
+                       </xsl:if>\r
+\r
+                       <!-- Not in mapping but in conversion -->\r
+                       <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">\r
+                               <note type="statement of responsibility">\r
+                                       <xsl:value-of select="."/>\r
+                               </note>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=500]">\r
+                               <note>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                                       <xsl:call-template name="uri"/>\r
+                               </note>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=511]">\r
+                               <note type="performers">\r
+                                       <xsl:call-template name="uri"/>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </note>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=518]">\r
+                               <note type="venue">\r
+                                       <xsl:call-template name="uri"/>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </note>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=506 or @tag=507 or @tag=508 or @tag=510 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=530 or @tag=533 or @tag=534 or @tag=535 or @tag=536 or @tag=538 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=583 or @tag=584 or @tag=585 or @tag=586]">\r
+                               <note>\r
+                                       <xsl:call-template name="uri"/>\r
+                                       <xsl:variable name="str">\r
+                                               <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">\r
+                                                       <xsl:value-of select="."/><xsl:text> </xsl:text>\r
+                                               </xsl:for-each>\r
+                                       </xsl:variable>\r
+                                       <xsl:value-of select="substring($str,1,string-length($str)-1)"/>\r
+                               </note>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">\r
+                               <cartographics>\r
+                                       <coordinates>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">defg</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </coordinates>\r
+                               </cartographics>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=255]">\r
+                               <cartographics>\r
+                                       <xsl:for-each select="marc:subfield[@code='c']">\r
+                                               <coordinates>\r
+                                                       <xsl:value-of select="."/>\r
+                                               </coordinates>\r
+                                       </xsl:for-each>\r
+                                       <xsl:for-each select="marc:subfield[@code='a']">\r
+                                               <scale>\r
+                                                       <xsl:value-of select="."/>\r
+                                               </scale>\r
+                                       </xsl:for-each>\r
+                                       <xsl:for-each select="marc:subfield[@code='b']">\r
+                                               <projection>\r
+                                                       <xsl:value-of select="."/>\r
+                                               </projection>   \r
+                                       </xsl:for-each>\r
+                               </cartographics>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"/>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=752]">\r
+                               <subject>\r
+                                       <hierarchicalGeographic>\r
+                                               <xsl:for-each select="marc:subfield[@code='a']">\r
+                                                       <country>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </country>\r
+                                               </xsl:for-each>         \r
+                                               <xsl:for-each select="marc:subfield[@code='b']">\r
+                                                       <state>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </state>\r
+                                               </xsl:for-each>         \r
+                                               <xsl:for-each select="marc:subfield[@code='c']">\r
+                                                       <county>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </county>\r
+                                               </xsl:for-each>         \r
+                                               <xsl:for-each select="marc:subfield[@code='d']">\r
+                                                       <city>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </city>\r
+                                               </xsl:for-each>         \r
+                                       </hierarchicalGeographic>\r
+                               </subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=050]">\r
+                               <xsl:for-each select="marc:subfield[@code='b']">\r
+                                       <classification authority="lcc">\r
+                                               <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"/>\r
+                                               <xsl:text> </xsl:text>\r
+                                               <xsl:value-of select="text()"/>\r
+                                       </classification>\r
+                               </xsl:for-each>\r
+                               <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">\r
+                                       <classification authority="lcc">\r
+                                               <xsl:value-of select="text()"/>\r
+                                       </classification>\r
+                               </xsl:for-each>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=082]">\r
+                               <classification authority="ddc">\r
+                                       <xsl:if test="marc:subfield[@code='2']">\r
+                                               <xsl:attribute name="edition">\r
+                                                       <xsl:value-of select="marc:subfield[@code='2']"/>\r
+                                               </xsl:attribute>\r
+                                       </xsl:if>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=080]">\r
+                               <classification authority="udc">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abx</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=060]">\r
+                               <classification authority="nlm">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">\r
+                               <classification authority="sudocs">\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">\r
+                               <classification authority="candoc">\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=086]">\r
+                               <classification>\r
+                                       <xsl:attribute name="authority">\r
+                                               <xsl:value-of select="marc:subfield[@code='2']"/>\r
+                                       </xsl:attribute>                                                \r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=084]">\r
+                               <classification>\r
+                                       <xsl:attribute name="authority">\r
+                                               <xsl:value-of select="marc:subfield[@code='2']"/>\r
+                                       </xsl:attribute>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </classification>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=440]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="subfieldSelect">\r
+                                                               <xsl:with-param name="codes">av</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                                       <xsl:call-template name="part"/>\r
+                                               </title>\r
+                                       </titleInfo>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="subfieldSelect">\r
+                                                               <xsl:with-param name="codes">av</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                                       <xsl:call-template name="part"/>\r
+                                               </title>\r
+                                       </titleInfo>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=534]">\r
+                               <relatedItem type="original">\r
+                                       <xsl:call-template name="relatedTitle"/>\r
+                                       <xsl:call-template name="relatedName"/>\r
+                                       <xsl:call-template name="relatedIdentifierISSN"/>\r
+                                       <xsl:for-each select="marc:subfield[@code='z']">\r
+                                               <identifier type="isbn">\r
+                                                       <xsl:value-of select="."/>\r
+                                               </identifier>\r
+                                       </xsl:for-each>\r
+                                       <xsl:call-template name="relatedNote"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">\r
+                               <relatedItem>\r
+                                       <xsl:call-template name="constituentOrRelatedType"/>\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">g</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="part"/>\r
+                                       </titleInfo>\r
+                                       <name type="personal">\r
+                                               <namePart>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">abcq</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="beforeCodes">g</xsl:with-param>\r
+                                                       </xsl:call-template>                                                    \r
+                                               </namePart>\r
+                                               <xsl:call-template name="nameDate"/>\r
+                                               <xsl:for-each select="marc:subfield[@code='e']">\r
+                                                       <role>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </role>\r
+                                               </xsl:for-each>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                                       <xsl:call-template name="relatedIdentifierISSN"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">\r
+                               <relatedItem>\r
+                                       <xsl:call-template name="constituentOrRelatedType"/>\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">dg</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="relatedPart"/>\r
+                                       </titleInfo>\r
+                                       <name type="corporate">\r
+                                               <xsl:for-each select="marc:subfield[@code='a']">\r
+                                                       <namePart>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </namePart>\r
+                                               </xsl:for-each>\r
+                                               <xsl:for-each select="marc:subfield[@code='b']">\r
+                                                       <namePart>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </namePart>\r
+                                               </xsl:for-each>\r
+                                               <xsl:variable name="tempNamePart">\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">c</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="beforeCodes">dgn</xsl:with-param>\r
+                                                       </xsl:call-template>                                                    \r
+                                               </xsl:variable>\r
+                                               <xsl:if test="normalize-space($tempNamePart)">\r
+                                                       <namePart>\r
+                                                               <xsl:value-of select="$tempNamePart"/>\r
+                                                       </namePart>\r
+                                               </xsl:if>\r
+                                               <xsl:for-each select="marc:subfield[@code='e']">\r
+                                                       <role>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </role>\r
+                                               </xsl:for-each>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                                       <xsl:call-template name="relatedIdentifierISSN"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">\r
+                               <relatedItem>\r
+                                       <xsl:call-template name="constituentOrRelatedType"/>\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">g</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="relatedPart"/>\r
+                                       </titleInfo>\r
+                                       <name type="conference">\r
+                                               <namePart>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">aqdc</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="beforeCodes">gn</xsl:with-param>\r
+                                                       </xsl:call-template>                                                    \r
+                                               </namePart>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                                       <xsl:call-template name="relatedIdentifierISSN"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">\r
+                               <relatedItem>\r
+                                       <xsl:call-template name="constituentOrRelatedType"/>\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="subfieldSelect">\r
+                                                               <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="part"/>\r
+                                       </titleInfo>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                                       <xsl:call-template name="relatedIdentifierISSN"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">\r
+                               <relatedItem>\r
+                                       <xsl:call-template name="constituentOrRelatedType"/>\r
+                                       <titleInfo>\r
+                                               <title>                                 \r
+                                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                                               </title>\r
+                                               <xsl:call-template name="part"/>\r
+                                       </titleInfo>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">\r
+                               <relatedItem type="series">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=775]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">\r
+                               <relatedItem type="related">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">\r
+                               <relatedItem type="constituent">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">\r
+                               <relatedItem type="host">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=776]">\r
+                               <relatedItem type="reproduction">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=780]">\r
+                               <relatedItem type="preceding">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=785]">\r
+                               <relatedItem type="succeeding">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=786]">\r
+                               <relatedItem type="original">\r
+                                       <xsl:call-template name="relatedItem76X-78X"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=800]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">g</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="part"/>\r
+                                       </titleInfo>\r
+                                       <name type="personal">\r
+                                               <namePart>\r
+                                                       <xsl:call-template name="chopPunctuation">\r
+                                                               <xsl:with-param name="chopString">\r
+                                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                                               <xsl:with-param name="anyCodes">abcq</xsl:with-param>\r
+                                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                                               <xsl:with-param name="beforeCodes">g</xsl:with-param>\r
+                                                                       </xsl:call-template>\r
+                                                               </xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </namePart>\r
+                                               <xsl:call-template name="nameDate"/>\r
+                                               <xsl:for-each select="marc:subfield[@code='e']">\r
+                                                       <role>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </role>\r
+                                               </xsl:for-each>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                               </relatedItem>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=810]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">dg</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="relatedPart"/>\r
+                                       </titleInfo>\r
+                                       <name type="corporate">\r
+                                               <xsl:for-each select="marc:subfield[@code='a']">\r
+                                                       <namePart>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </namePart>\r
+                                               </xsl:for-each>\r
+                                               <xsl:for-each select="marc:subfield[@code='b']">\r
+                                                       <namePart>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </namePart>\r
+                                               </xsl:for-each>\r
+                                               <namePart>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">c</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="beforeCodes">dgn</xsl:with-param>\r
+                                                       </xsl:call-template>                                                    \r
+                                               </namePart>\r
+                                               <xsl:for-each select="marc:subfield[@code='e']">\r
+                                                       <role>\r
+                                                               <xsl:value-of select="."/>\r
+                                                       </role>\r
+                                               </xsl:for-each>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=811]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="afterCodes">g</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="relatedPart"/>\r
+                                       </titleInfo>\r
+                                       <name type="conference">\r
+                                               <namePart>\r
+                                                       <xsl:call-template name="specialSubfieldSelect">\r
+                                                               <xsl:with-param name="anyCodes">aqdc</xsl:with-param>\r
+                                                               <xsl:with-param name="axis">t</xsl:with-param>\r
+                                                               <xsl:with-param name="beforeCodes">gn</xsl:with-param>\r
+                                                       </xsl:call-template>                                                    \r
+                                               </namePart>\r
+                                       </name>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=830]">\r
+                               <relatedItem type="series">\r
+                                       <titleInfo>\r
+                                               <title>\r
+                                                       <xsl:call-template name="subfieldSelect">\r
+                                                               <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </title>\r
+                                               <xsl:call-template name="part"/>\r
+                                       </titleInfo>\r
+                                       <xsl:call-template name="relatedForm"/>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=856][@ind2=2]/marc:subfield[@code='q']">\r
+                               <relatedItem>\r
+                                       <internetMediaType>\r
+                                               <xsl:value-of select="."/>\r
+                                       </internetMediaType>\r
+                               </relatedItem>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">\r
+                               <identifier type="isbn">\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=024][@ind1=0]/marc:subfield[@code='a']">\r
+                               <identifier type="isrc">\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=024][@ind1=2]/marc:subfield[@code='a']">\r
+                               <identifier type="ismn">\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">\r
+                               <identifier type="issn">\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=010]/marc:subfield[@code='a']">\r
+                               <identifier type="lccn">\r
+                                       <xsl:value-of select="normalize-space(text())"/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=028]">\r
+                               <identifier>\r
+                                       <xsl:attribute name="type">\r
+                                               <xsl:choose>\r
+                                                       <xsl:when test="@ind1=0">issue number</xsl:when>\r
+                                                       <xsl:when test="@ind1=1">matrix number</xsl:when>\r
+                                                       <xsl:when test="@ind1=2">music plate</xsl:when>\r
+                                                       <xsl:when test="@ind1=3">music publisher</xsl:when>\r
+                                                       <xsl:when test="@ind1=4">videorecording identifier</xsl:when>\r
+                                               </xsl:choose>\r
+                                       </xsl:attribute>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+               \r
+                       <xsl:for-each select="marc:datafield[@tag=024][@ind1=4]">\r
+                               <identifier type="sici">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='u']">\r
+                               <identifier>\r
+                                       <xsl:attribute name="type">\r
+                                               <xsl:choose>\r
+                                                       <xsl:when test="starts-with(.,'urn:doi') or starts-with(.,'doi:')">doi</xsl:when>\r
+                                                       <xsl:otherwise>uri</xsl:otherwise>\r
+                                               </xsl:choose>\r
+                                       </xsl:attribute>\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]/marc:subfield[@code='a']">\r
+                               <identifier type="upc">\r
+                                       <xsl:value-of select="."/>\r
+                               </identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=852]">\r
+                               <location>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abj</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </location>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=506]">\r
+                               <accessCondition type="restrictionOnAccess">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcd35</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </accessCondition>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=540]">\r
+                               <accessCondition type="useAndReproduction">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcde35</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </accessCondition>\r
+                       </xsl:for-each>\r
+\r
+                       <recordInfo>\r
+                               <xsl:for-each select="marc:datafield[@tag=040]">\r
+                                       <recordContentSource>\r
+                                               <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                                       </recordContentSource>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:controlfield[@tag=008]">\r
+                                       <recordCreationDate encoding="marc">\r
+                                               <xsl:value-of select="substring(.,1,6)"/>\r
+                                       </recordCreationDate>\r
+                               </xsl:for-each>         \r
+                       \r
+                               <xsl:for-each select="marc:controlfield[@tag=005]">\r
+                                       <recordChangeDate encoding="iso8601">\r
+                                               <xsl:value-of select="."/>\r
+                                       </recordChangeDate>\r
+                               </xsl:for-each>\r
+\r
+                               <xsl:for-each select="marc:controlfield[@tag=001]">\r
+                                       <recordIdentifier>\r
+                                               <xsl:if test="../marc:controlfield[@tag=003]">\r
+                                                       <xsl:attribute name="source">\r
+                                                               <xsl:value-of select="../marc:controlfield[@tag=003]"/>\r
+                                                       </xsl:attribute>\r
+                                               </xsl:if>\r
+                                               <xsl:value-of select="."/>\r
+                                       </recordIdentifier>\r
+                               </xsl:for-each>\r
+                       </recordInfo>\r
+               </mods>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="displayForm">\r
+               <xsl:for-each select="marc:subfield[@code='c']">\r
+                       <displayForm>\r
+                               <xsl:value-of select="."/>\r
+                       </displayForm>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="affiliation">\r
+               <xsl:for-each select="marc:subfield[@code='u']">\r
+                       <affiliation>\r
+                               <xsl:value-of select="."/>\r
+                       </affiliation>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="uri">\r
+               <xsl:for-each select="marc:subfield[@code='u']">\r
+                       <xsl:attribute name="xlink:href">\r
+                               <xsl:value-of select="."/>\r
+                       </xsl:attribute>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="role">\r
+               <xsl:choose>\r
+                       <xsl:when test="marc:subfield[@code='e']">\r
+                               <role><xsl:value-of select="marc:subfield[@code='e']"/></role>\r
+                       </xsl:when>\r
+                       <xsl:when test="marc:subfield[@code='4']">\r
+                               <xsl:for-each select="marc:subfield[@code='4']">\r
+                                       <role><xsl:value-of select="text()"/></role>\r
+                               </xsl:for-each>\r
+                       </xsl:when>\r
+               </xsl:choose>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="part">\r
+               <xsl:variable name="partNumber">\r
+                       <xsl:call-template name="specialSubfieldSelect">\r
+                               <xsl:with-param name="axis">n</xsl:with-param>\r
+                               <xsl:with-param name="anyCodes">n</xsl:with-param>\r
+                               <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>\r
+                       </xsl:call-template>\r
+               </xsl:variable>\r
+               <xsl:variable name="partName">\r
+                       <xsl:call-template name="specialSubfieldSelect">\r
+                               <xsl:with-param name="axis">p</xsl:with-param>\r
+                               <xsl:with-param name="anyCodes">p</xsl:with-param>\r
+                               <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>\r
+                       </xsl:call-template>\r
+               </xsl:variable>\r
+               <xsl:if test="string-length(normalize-space($partNumber))">\r
+                       <partNumber>\r
+                               <xsl:value-of select="$partNumber"/>\r
+                       </partNumber>\r
+               </xsl:if>\r
+               <xsl:if test="string-length(normalize-space($partName))">\r
+                       <partName>\r
+                               <xsl:value-of select="$partName"/>\r
+                       </partName>\r
+               </xsl:if>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedPart">\r
+               <xsl:for-each select="marc:subfield[@code='n'][preceding-sibling::marc:subfield[@code='t']]">\r
+                       <partNumber>\r
+                               <xsl:value-of select="."/>\r
+                       </partNumber>\r
+               </xsl:for-each>\r
+               <xsl:for-each select="marc:subfield[@code='p']">\r
+                       <partName>\r
+                               <xsl:value-of select="."/>\r
+                       </partName>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedName">\r
+               <xsl:for-each select="marc:subfield[@code='a']">\r
+                       <name>\r
+                               <namePart>\r
+                                       <xsl:value-of select="."/>\r
+                               </namePart>\r
+                       </name>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedForm">\r
+               <xsl:for-each select="marc:subfield[@code='h']">\r
+                       <physicalDescription>\r
+                               <form>\r
+                                       <unControlled>\r
+                                               <xsl:value-of select="."/>\r
+                                       </unControlled>\r
+                               </form>\r
+                       </physicalDescription>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedExtent">\r
+               <xsl:for-each select="marc:subfield[@code='h']">\r
+                       <physicalDescription>\r
+                               <extent>\r
+                                       <xsl:value-of select="."/>\r
+                               </extent>\r
+                       </physicalDescription>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedNote">\r
+               <xsl:for-each select="marc:subfield[@code='n']">\r
+                       <note>\r
+                               <xsl:value-of select="."/>\r
+                       </note>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedIdentifierISSN">\r
+               <xsl:for-each select="marc:subfield[@code='x']">\r
+                       <identifier type="issn">\r
+                               <xsl:value-of select="."/>\r
+                       </identifier>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedIdentifierLocal">\r
+               <xsl:for-each select="marc:subfield[@code='w']">\r
+                       <identifier type="local">\r
+                               <xsl:value-of select="."/>\r
+                       </identifier>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedIdentifier">\r
+               <xsl:for-each select="marc:subfield[@code='o']">\r
+                       <identifier>\r
+                               <xsl:value-of select="."/>\r
+                       </identifier>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedItem76X-78X">\r
+               <xsl:call-template name="relatedTitle76X-78X"/>\r
+               <xsl:call-template name="relatedName"/>\r
+               <xsl:call-template name="relatedExtent"/>\r
+               <xsl:call-template name="relatedIdentifier"/>\r
+               <xsl:call-template name="relatedIdentifierISSN"/>\r
+               <xsl:call-template name="relatedIdentifierLocal"/>\r
+               <xsl:call-template name="relatedNote"/>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="subjectGeographicZ">\r
+               <geographic>\r
+                       <xsl:value-of select="."/>\r
+               </geographic>                   \r
+       </xsl:template>\r
+\r
+       <xsl:template name="subjectTemporalY">\r
+               <temporal>\r
+                       <xsl:value-of select="."/>\r
+               </temporal>                     \r
+       </xsl:template>\r
+\r
+       <xsl:template name="subjectTopic">\r
+               <topic>\r
+                       <xsl:call-template name="chopPunctuation">\r
+                               <xsl:with-param name="chopString" select="."/>\r
+                       </xsl:call-template>\r
+               </topic>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="nameABCDN">\r
+               <xsl:for-each select="marc:subfield[@code='a']">\r
+                       <namePart>\r
+                               <xsl:call-template name="chopPunctuation">\r
+                                       <xsl:with-param name="chopString" select="."/>\r
+                               </xsl:call-template>\r
+                       </namePart>                                     \r
+               </xsl:for-each>\r
+               <xsl:for-each select="marc:subfield[@code='b']">\r
+                       <namePart>\r
+                               <xsl:value-of select="."/>\r
+                       </namePart>                                     \r
+               </xsl:for-each>\r
+               <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">\r
+                       <namePart>\r
+                               <xsl:call-template name="subfieldSelect">\r
+                                       <xsl:with-param name="codes">cdn</xsl:with-param>\r
+                               </xsl:call-template>\r
+                       </namePart>\r
+               </xsl:if>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="nameABCDQ">\r
+               <namePart>\r
+                       <xsl:call-template name="chopPunctuation">\r
+                               <xsl:with-param name="chopString">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </xsl:with-param>\r
+                       </xsl:call-template>\r
+               </namePart>\r
+               <xsl:call-template name="nameDate"/>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="nameACDEQ">\r
+               <namePart>\r
+                       <xsl:call-template name="subfieldSelect">\r
+                               <xsl:with-param name="codes">acdeq</xsl:with-param>\r
+                       </xsl:call-template>\r
+               </namePart>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="constituentOrRelatedType">\r
+               <xsl:attribute name="type">\r
+                       <xsl:choose>\r
+                               <xsl:when test="@ind2=2">constituent</xsl:when>\r
+                               <xsl:otherwise>related</xsl:otherwise>\r
+                       </xsl:choose>\r
+               </xsl:attribute>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedTitle">\r
+               <xsl:for-each select="marc:subfield[@code='t']">\r
+                       <titleInfo>\r
+                               <title>\r
+                                       <xsl:value-of select="."/>\r
+                               </title>\r
+                       </titleInfo>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="relatedTitle76X-78X">\r
+               <titleInfo>\r
+                       <xsl:for-each select="marc:subfield[@code='t']">\r
+                               <title>\r
+                                       <xsl:value-of select="."/>\r
+                               </title>\r
+                       </xsl:for-each>\r
+                       <xsl:for-each select="marc:subfield[@code='g']">\r
+                               <partNumber>\r
+                                       <xsl:value-of select="."/>\r
+                               </partNumber>\r
+                       </xsl:for-each>\r
+               </titleInfo>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="nameDate">\r
+               <xsl:for-each select="marc:subfield[@code='d']">\r
+                       <namePart type="date">\r
+                               <xsl:call-template name="chopPunctuation">\r
+                                       <xsl:with-param name="chopString" select="."/>\r
+                               </xsl:call-template>\r
+                       </namePart>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="subjectAuthority">\r
+               <xsl:attribute name="authority">\r
+                       <xsl:choose>\r
+                       <xsl:when test="@ind2=0">lcsh</xsl:when>\r
+                       <xsl:when test="@ind2=1">lcshac</xsl:when>\r
+                       <xsl:when test="@ind2=2">mesh</xsl:when>\r
+                       <xsl:when test="@ind2=3">csh</xsl:when>\r
+                       <xsl:when test="@ind2=5">nal</xsl:when>\r
+                       <xsl:when test="@ind2=6">rvm</xsl:when>\r
+                       <xsl:when test="@ind2=7"><xsl:value-of select="marc:subfield[@code='2']"/></xsl:when>\r
+                       </xsl:choose>\r
+               </xsl:attribute>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="subjectAnyOrder">\r
+               <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">\r
+                       <xsl:choose>\r
+                               <xsl:when test="@code='v'">\r
+                                       <xsl:call-template name="subjectTopic"/>\r
+                               </xsl:when>\r
+                               <xsl:when test="@code='x'">\r
+                                       <xsl:call-template name="subjectTopic"/>\r
+                               </xsl:when>\r
+                               <xsl:when test="@code='y'">\r
+                                       <xsl:call-template name="subjectTemporalY"/>\r
+                               </xsl:when>\r
+                               <xsl:when test="@code='z'">\r
+                                       <xsl:call-template name="subjectGeographicZ"/>\r
+                               </xsl:when>\r
+                       </xsl:choose>\r
+               </xsl:for-each>\r
+       </xsl:template>\r
+\r
+<!--   <xsl:template name="subfieldSelect">\r
+               <xsl:param name="codes"/>\r
+               <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>\r
+               <xsl:variable name="str">\r
+                       <xsl:for-each select="marc:subfield">\r
+                               <xsl:if test="contains($codes, @code)">\r
+                                       <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>\r
+                               </xsl:if>\r
+                       </xsl:for-each>\r
+               </xsl:variable>\r
+               <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>\r
+       </xsl:template>\r
+-->\r
+\r
+       <xsl:template name="specialSubfieldSelect">\r
+               <xsl:param name="anyCodes"/>\r
+               <xsl:param name="axis"/>\r
+               <xsl:param name="beforeCodes"/>\r
+               <xsl:param name="afterCodes"/>\r
+               <xsl:variable name="str">\r
+                       <xsl:for-each select="marc:subfield">\r
+                               <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">\r
+                                       <xsl:value-of select="text()"/><xsl:text> </xsl:text>\r
+                               </xsl:if>\r
+                       </xsl:for-each>\r
+               </xsl:variable>\r
+               <xsl:value-of select="substring($str,1,string-length($str)-1)"/>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=600]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <name type="personal">\r
+                               <namePart>\r
+                                       <xsl:call-template name="chopPunctuation">\r
+                                               <xsl:with-param name="chopString">\r
+                                                       <xsl:call-template name="subfieldSelect">\r
+                                                               <xsl:with-param name="codes">abcq</xsl:with-param>\r
+                                                       </xsl:call-template>\r
+                                               </xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </namePart>\r
+                               <xsl:call-template name="nameDate"/>\r
+                               <xsl:call-template name="affiliation"/>\r
+                               <xsl:call-template name="role"/>\r
+                       </name>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=610]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <name type="corporate">\r
+                               <xsl:for-each select="marc:subfield[@code='a']">\r
+                                       <namePart>\r
+                                               <xsl:value-of select="."/>\r
+                                       </namePart>\r
+                               </xsl:for-each>\r
+                               <xsl:for-each select="marc:subfield[@code='b']">\r
+                                       <namePart>\r
+                                               <xsl:value-of select="."/>\r
+                                       </namePart>\r
+                               </xsl:for-each>\r
+                               <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">\r
+                                       <namePart>\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">cdnp</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </namePart>\r
+                               </xsl:if>\r
+                               <xsl:call-template name="role"/>\r
+                       </name>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=611]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <name type="conference">\r
+                               <namePart>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdeqnp</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </namePart>\r
+                               <xsl:for-each select="marc:subfield[@code='4']">\r
+                                       <role>\r
+                                               <xsl:value-of select="."/>\r
+                                       </role>\r
+                               </xsl:for-each>\r
+                       </name>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=630]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <titleInfo>\r
+                               <title>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">adfhklor</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                                       <xsl:call-template name="part"/>                        \r
+                               </title>\r
+                       </titleInfo>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=650]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <topic>\r
+                               <xsl:call-template name="chopPunctuation">\r
+                                       <xsl:with-param name="chopString">\r
+                                               <xsl:call-template name="subfieldSelect">\r
+                                                       <xsl:with-param name="codes">abcd</xsl:with-param>\r
+                                               </xsl:call-template>\r
+                                       </xsl:with-param>\r
+                               </xsl:call-template>\r
+                       </topic>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+\r
+       <xsl:template match="marc:datafield[@tag=651]">\r
+               <subject>\r
+                       <xsl:call-template name="subjectAuthority"/>\r
+                       <xsl:for-each select="marc:subfield[@code='a']">\r
+                               <geographic>\r
+                                       <xsl:value-of select="."/>\r
+                               </geographic>                   \r
+                       </xsl:for-each>\r
+                       <xsl:call-template name="subjectAnyOrder"/>\r
+               </subject>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:datafield[@tag=653]">\r
+               <subject>\r
+                       <xsl:for-each select="marc:subfield[@code='a']">\r
+                               <topic>\r
+                                       <xsl:value-of select="."/>\r
+                               </topic>                        \r
+                       </xsl:for-each>\r
+               </subject>\r
+       </xsl:template>\r
+</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.\r
+<metaInformation>\r
+<scenarios ><scenario default="yes" name="modstst2" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\modstst2.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="modstest" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\modstest.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\marcxml\t.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>\r
+</metaInformation>\r
+-->
\ No newline at end of file
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl
new file mode 100644 (file)
index 0000000..2e81677
--- /dev/null
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">\r
+       <xsl:import href="MARC21slimUtils.xsl"/>\r
+       <xsl:output method="xml" indent="yes"/>\r
+       \r
+       <xsl:template match="/">\r
+                       <xsl:apply-templates/>\r
+       </xsl:template>\r
+\r
+       <xsl:template match="marc:record">\r
+               <xsl:variable name="leader" select="marc:leader"/>\r
+               <xsl:variable name="leader6" select="substring($leader,7,1)"/>\r
+               <xsl:variable name="leader7" select="substring($leader,8,1)"/>\r
+               <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>\r
+\r
+         <rdf:Description>\r
+                       <xsl:for-each select="marc:datafield[@tag=245]">\r
+                               <dc:title>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abfghk</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:title>\r
+                       </xsl:for-each>\r
+\r
+       \r
+                       <xsl:for-each select="marc:datafield[@tag=100]|marc:datafield[@tag=110]|marc:datafield[@tag=111]|marc:datafield[@tag=700]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=720]">\r
+                               <dc:creator>\r
+                                       <xsl:value-of select="."/>\r
+                               </dc:creator>\r
+                       </xsl:for-each>\r
+\r
+                       <dc:type>               \r
+                               <xsl:if test="$leader7='c'">\r
+                                       <xsl:attribute name="collection">yes</xsl:attribute>\r
+                               </xsl:if>\r
+\r
+                               <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">\r
+                                       <xsl:attribute name="manuscript">yes</xsl:attribute>\r
+                               </xsl:if>\r
+\r
+                               <xsl:choose>\r
+                                       <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>\r
+                                       <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>\r
+                                       <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>\r
+                                       <xsl:when test="$leader6='i' or $leader6='j'">sound recording</xsl:when>\r
+                                       <xsl:when test="$leader6='k'">still image</xsl:when>\r
+                                       <xsl:when test="$leader6='g'">moving image</xsl:when>\r
+                                       <xsl:when test="$leader6='r'">three dimensional object</xsl:when>\r
+                                       <xsl:when test="$leader6='m'">software, multimedia</xsl:when>\r
+                                       <xsl:when test="$leader6='p'">mixed material</xsl:when>\r
+                               </xsl:choose>\r
+                       </dc:type>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=655]">\r
+                               <dc:type>\r
+                                       <xsl:value-of select="."/>\r
+                               </dc:type>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=260]">\r
+                               <dc:publisher>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ab</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:publisher>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='c']">\r
+                               <dc:date>\r
+                                       <xsl:value-of select="."/>\r
+                               </dc:date>                              \r
+                       </xsl:for-each>\r
+\r
+                       <dc:language>\r
+                               <xsl:value-of select="substring($controlField008,36,3)"/>\r
+                       </dc:language>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">\r
+                               <dc:format>\r
+                                       <xsl:value-of select="."/>\r
+                               </dc:format>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=520]">\r
+                               <dc:description>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </dc:description>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=521]">\r
+                               <dc:description>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </dc:description>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[500&lt;@tag][@tag&lt;=599][not(@tag=506 or @tag=530 or @tag=540 or @tag=546)]">\r
+                               <dc:description>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </dc:description>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=600]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=610]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=611]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+               \r
+                       <xsl:for-each select="marc:datafield[@tag=630]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=650]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=653]">\r
+                               <dc:subject>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdq</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:subject>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=752]">\r
+                               <dc:coverage>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcd</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:coverage>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=530]">\r
+                               <dc:relation type="original">\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">abcdu</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:relation>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]|marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=770]|marc:datafield[@tag=772]|marc:datafield[@tag=773]|marc:datafield[@tag=774]|marc:datafield[@tag=775]|marc:datafield[@tag=776]|marc:datafield[@tag=777]|marc:datafield[@tag=780]|marc:datafield[@tag=785]|marc:datafield[@tag=786]|marc:datafield[@tag=787]">\r
+                               <dc:relation>\r
+                                       <xsl:call-template name="subfieldSelect">\r
+                                               <xsl:with-param name="codes">ot</xsl:with-param>\r
+                                       </xsl:call-template>\r
+                               </dc:relation>  \r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=856]">\r
+                               <dc:identifier>\r
+                                       <xsl:value-of select="marc:subfield[@code='u']"/>\r
+                               </dc:identifier>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=506]">\r
+                               <dc:rights>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </dc:rights>\r
+                       </xsl:for-each>\r
+\r
+                       <xsl:for-each select="marc:datafield[@tag=540]">\r
+                               <dc:rights>\r
+                                       <xsl:value-of select="marc:subfield[@code='a']"/>\r
+                               </dc:rights>\r
+                       </xsl:for-each>\r
+               </rdf:Description>\r
+       </xsl:template>\r
+</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.\r
+<metaInformation>\r
+<scenarios ><scenario default="no" name="MODS Website Samples" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\modswebsitesamples.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Ray Charles" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\raycharles.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="s6" userelativepaths="yes" externalpreview="no" url="..\ifla\sally6.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s7" userelativepaths="yes" externalpreview="no" url="..\ifla\sally7.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s12" userelativepaths="yes" externalpreview="no" url="..\ifla\sally12.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>\r
+</metaInformation>\r
+-->
\ No newline at end of file
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
new file mode 100644 (file)
index 0000000..acfe598
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version='1.0'?>\r
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
+       <xsl:template name="datafield">\r
+               <xsl:param name="tag"/>\r
+               <xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>\r
+               <xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>\r
+               <xsl:param name="subfields"/>\r
+               <xsl:element name="datafield">\r
+                       <xsl:attribute name="tag">\r
+                               <xsl:value-of select="$tag"/>\r
+                       </xsl:attribute>\r
+                       <xsl:attribute name="ind1">\r
+                               <xsl:value-of select="$ind1"/>\r
+                       </xsl:attribute>\r
+                       <xsl:attribute name="ind2">\r
+                               <xsl:value-of select="$ind2"/>\r
+                       </xsl:attribute>\r
+                       <xsl:copy-of select="$subfields"/>\r
+               </xsl:element>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="subfieldSelect">\r
+               <xsl:param name="codes"/>\r
+               <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>\r
+               <xsl:variable name="str">\r
+                       <xsl:for-each select="marc:subfield">\r
+                               <xsl:if test="contains($codes, @code)">\r
+                                       <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>\r
+                               </xsl:if>\r
+                       </xsl:for-each>\r
+               </xsl:variable>\r
+               <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="buildSpaces">\r
+               <xsl:param name="spaces"/>\r
+               <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>\r
+               <xsl:if test="$spaces>0">\r
+                       <xsl:value-of select="$char"/>\r
+                       <xsl:call-template name="buildSpaces">\r
+                               <xsl:with-param name="spaces" select="$spaces - 1"/>\r
+                               <xsl:with-param name="char" select="$char"/>\r
+                       </xsl:call-template>\r
+               </xsl:if>\r
+       </xsl:template>\r
+\r
+       <xsl:template name="chopPunctuation">\r
+               <xsl:param name="chopString"/>\r
+               <xsl:variable name="length" select="string-length($chopString)"/>\r
+               <xsl:choose>\r
+                       <xsl:when test="$length=0"/>\r
+                       <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">\r
+                               <xsl:call-template name="chopPunctuation">\r
+                                       <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>\r
+                               </xsl:call-template>\r
+                       </xsl:when>\r
+                       <xsl:when test="not($chopString)"/>\r
+                       <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>\r
+               </xsl:choose>\r
+       </xsl:template>\r
+</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.\r
+<metaInformation>\r
+<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>\r
+</metaInformation>\r
+-->
\ No newline at end of file