koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/misc/zebra/usmarc zebra.cfg explain.xml fi...


From: Tumer Garip
Subject: [Koha-cvs] koha/misc/zebra/usmarc zebra.cfg explain.xml fi...
Date: Fri, 25 Aug 2006 21:17:21 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Tumer Garip <tgarip1957>        06/08/25 21:17:20

Modified files:
        misc/zebra/usmarc: zebra.cfg 
Added files:
        misc/zebra/usmarc: explain.xml filter_alvis_conf.xml 
                           identity.xsl koha2MARC21slimbiblios.xsl 
                           koha2MARC21slimholdings.xsl koha2index.xsl 
                           zebra.xsl 
Removed files:
        misc/zebra/usmarc: bib1.att collection.abs explain.att 
                           record.abs usmarc.abs usmarc.mar usmarc.tag 

Log message:
        New indexing stylsheets for zebra
        we now use stylesheets for indexing and retrieval

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/zebra.cfg?cvsroot=koha&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/explain.xml?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/filter_alvis_conf.xml?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/identity.xsl?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/koha2MARC21slimbiblios.xsl?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/koha2MARC21slimholdings.xsl?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/koha2index.xsl?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/zebra.xsl?cvsroot=koha&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/bib1.att?cvsroot=koha&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/collection.abs?cvsroot=koha&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/explain.att?cvsroot=koha&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/record.abs?cvsroot=koha&r1=1.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/usmarc.abs?cvsroot=koha&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/usmarc.mar?cvsroot=koha&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/misc/zebra/usmarc/usmarc.tag?cvsroot=koha&r1=1.1&r2=0

Patches:
Index: zebra.cfg
===================================================================
RCS file: /sources/koha/koha/misc/zebra/usmarc/zebra.cfg,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- zebra.cfg   31 Mar 2006 17:48:16 -0000      1.6
+++ zebra.cfg   25 Aug 2006 21:17:20 -0000      1.7
@@ -1,65 +1,41 @@
 # Simple Zebra configuration file that defines
-# a database with USMARC records for Koha
-# Joshua Ferraro < jmf at liblime dot com >
+# a database with MARCXML records.
+# $Id: zebra.cfg,v 1.7 2006/08/25 21:17:20 tgarip1957 Exp $
 #
+# Where are the config files located?
+profilePath: ${srcdir:-.}:${srcdir:-.}/tab
+encoding: UTF-8
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset:gils.att
+###Zebra path to index folder
+modulePath: /zebra/index/.libs
+# Specify record type
 
-## EDIT TO MATCH YOUR LOCAL CONFIG
-# name of the database (should match koha.conf's zebradb entry)
-database: kohaplugin
+recordtype: alvis.filter_alvis_conf.xml
 
-# Specifies the location of the various register files that Zebra              
 # uses to represent your databases. See:                                       
 #  http://indexdata.dk/zebra/doc/register-location.tkl
+#database:kohalis
+storeKeys:1
+storeData:1
 
-register: /home/kohaplugin/register:4g
 
-# Enables the  safe update   facility of Zebra, and tells the system           
 # where to place the required, temporary files.
-shadow /home/kohaplugin/shadow:4g
 
 # Lock File Area
-lockDir: /home/kohaplugin/lock
+lockDir: lock
+perm.anonymous:r
+perm.author:rw
+passw.c:kohalis
+#shadow
+#register: /register:500M
+#shadow: /zebrashadow:1G 
 
 # Temp File area for result sets
-setTmpDir: /home/kohaplugin/tmp
+setTmpDir:tmp
 
 # Temp File area for index program
-keyTmpDir: /home/kohaplugin/tmp
+keyTmpDir:tmp
 
 # Approx. Memory usage during indexing
-memMax: 400
-
-# Where are the config files located?
-profilePath: ${srcdir:-.}:/usr/share/idzebra/tab/
-
-# set our encoding to utf-8
-encoding: UTF-8
-
-# we're using ranking
-systag rank rank
-systag sysno sysno
-
-# permissions (add passwords eventually)
-perm.anonymous: rw
-
-# specifies how the records are to be identified when updating
-recordId: (bib1,Identifier-standard)
-
-# key info is stored so we can update/delete records (File Record IDs)
-storeKeys:1
-
-# records are stored internally
-storeData:1
-
-# Approx. Memory usage during indexing
-memMax: 400
-
-# Files that describe the attribute sets supported.
-attset: bib1.att
-attset: explain.att
-attset: gils.att
-
-# Specify record type
-# the syntax is:  group.recordType[.name]:type
-# so in this case, iso2709 is the group name
-iso2709.recordType:grs.marcxml.record
-recordType: grs.xml
-#iso2079.recordType:grs.marcxml.collection
-#recordTyle: grs.xml.collection
+memMax: 200M
+rank:rank-1
\ No newline at end of file

Index: explain.xml
===================================================================
RCS file: explain.xml
diff -N explain.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ explain.xml 25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,11 @@
+<explain xmlns="http://explain.z3950.org/dtd/2.0/";>
+  <serverInfo>
+    <host>localhost</host>
+    <port>9999</port>
+    <database>biblios</database>
+  </serverInfo>
+  <databaseInfo>
+    <title>My Database</title>
+    <description>My database description</description>
+  </databaseInfo>
+</explain>

Index: filter_alvis_conf.xml
===================================================================
RCS file: filter_alvis_conf.xml
diff -N filter_alvis_conf.xml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ filter_alvis_conf.xml       25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+$Id: filter_alvis_conf.xml,v 1.1 2006/08/25 21:17:20 tgarip1957 Exp $
+   Copyright (C) 1995-2006
+   Index Data ApS
+
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra.  If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+-->
+
+<schemaInfo>
+  <schema name="koha" default="1" stylesheet="identity.xsl" />
+  <schema name="index" identifier="http://indexdata.dk/zebra/xslt/1";
+          stylesheet="koha2INDEX.xsl" />
+  <schema name="biblios" stylesheet="koha2MARC21slimbiblios.xsl" />
+<schema name="holdings" stylesheet="koha2MARC21slimholdings.xsl" />
+<schema name="mods" stylesheet="koharecord2MODS3.xsl" />
+  <schema name="marc" stylesheet="MARC21slimUtils.xsl" />
+  <schema name="zebra" stylesheet="zebra.xsl" />
+ <split level="1"/> 
+</schemaInfo>
+

Index: identity.xsl
===================================================================
RCS file: identity.xsl
diff -N identity.xsl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ identity.xsl        25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+$Id: identity.xsl,v 1.1 2006/08/25 21:17:20 tgarip1957 Exp $
+   Copyright (C) 1995-2006
+   Index Data ApS
+
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra.  If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+  version="1.0" >
+
+  <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+
+  <!-- match on any record -->
+  <xsl:template match="/">
+      <xsl:copy-of select="/"/>
+  </xsl:template>
+
+
+</xsl:stylesheet>

Index: koha2MARC21slimbiblios.xsl
===================================================================
RCS file: koha2MARC21slimbiblios.xsl
diff -N koha2MARC21slimbiblios.xsl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ koha2MARC21slimbiblios.xsl  25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2006 rel. 3 sp1 (http://www.altova.com) by T Garip 
(Near East University) -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns="http://www.loc.gov/MARC21/slim"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNameSpaceSchemaLocation="http://library.neu.edu.tr/kohanamespace/KohaRecord.xsd";
 version="1.0" >
+       <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+       <xsl:template match="/">
+        <xsl:if test="kohacollection">
+               <collection 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.loc.gov/MARC21/slim 
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"; 
xmlns="http://www.loc.gov/MARC21/slim";>
+                       <xsl:for-each select="kohacollection/koharecord/record">
+                               <record>
+                                       <xsl:apply-templates/>
+                               </record>
+                       </xsl:for-each>
+               </collection>
+               </xsl:if>
+                <xsl:if test="koharecord">
+               <record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.loc.gov/MARC21/slim 
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"; 
xmlns="http://www.loc.gov/MARC21/slim";>
+                                       <xsl:apply-templates 
select="koharecord/record"/>
+               </record>
+               </xsl:if>
+       </xsl:template>
+       
+       <xsl:template match="koharecord/record/node()">
+               <xsl:copy-of select="."/>
+       </xsl:template>
+</xsl:stylesheet>

Index: koha2MARC21slimholdings.xsl
===================================================================
RCS file: koha2MARC21slimholdings.xsl
diff -N koha2MARC21slimholdings.xsl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ koha2MARC21slimholdings.xsl 25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2006 rel. 3 sp1 (http://www.altova.com) by T Garip 
(Near East University) -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns="http://www.loc.gov/MARC21/slim"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNameSpaceSchemaLocation="http://library.neu.edu.tr/kohanamespace/KohaRecord.xsd";
 version="1.0" >
+       <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+       <xsl:template match="/">
+       <xsl:if test="kohacollection">
+               <collection 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.loc.gov/MARC21/slim 
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"; 
xmlns="http://www.loc.gov/MARC21/slim";>
+                       <xsl:for-each 
select="kohacollection/koharecord/holdings/record">
+                               <record>
+                                       <xsl:apply-templates/>
+                               </record>
+                       </xsl:for-each>
+               </collection>
+               </xsl:if>
+                <xsl:if test="koharecord">
+               <collection 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.loc.gov/MARC21/slim 
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"; 
xmlns="http://www.loc.gov/MARC21/slim";>
+                                       <xsl:for-each 
select="koharecord/holdings/record">
+                               <record>
+                                       <xsl:apply-templates/>
+                               </record>
+                       </xsl:for-each>
+               </collection>
+               </xsl:if>
+       </xsl:template>
+       <xsl:template match="koharecord/holdings/record/node()">
+               <xsl:copy-of select="."/>
+       </xsl:template>
+</xsl:stylesheet>

Index: koha2index.xsl
===================================================================
RCS file: koha2index.xsl
diff -N koha2index.xsl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ koha2index.xsl      25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,400 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:z="http://indexdata.dk/zebra/xslt/1"; 
xmlns:marc="http://www.loc.gov/MARC21/slim"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNameSpaceSchemaLocation="http://library.neu.edu.tr/kohanamespace/KohaRecord.xsd";
 version="1.0">
+       <!-- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; -->
+       <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+       <!-- disable all default text node output -->
+       <xsl:template match="text()"/>
+       <!-- match on koha xml record -->
+       <xsl:template match="/">
+               <xsl:if test="kohacollection">
+                       <kohacollection>
+                               <xsl:apply-templates 
select="kohacollection/koharecord"/>
+                       </kohacollection>
+               </xsl:if>
+               <xsl:if test="koharecord">
+                       <xsl:apply-templates select="koharecord"/>
+               </xsl:if>
+       </xsl:template>
+       <xsl:template match="koharecord">
+       <xsl:variable name="controlField001"   
select="normalize-space(record/address@hidden'001'])"/>
+
+               <z:record z:id="{$controlField001}" z:type="update">
+                       <xsl:apply-templates/>
+               </z:record>
+       </xsl:template>
+       <!-- KOHA indexing templates -->
+       <!--biblionumber-->
+       <xsl:template match="koharecord/record/address@hidden'001']">
+               <z:index name="Number-db" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Number-db" type="n">
+                       <xsl:value-of select="."/>
+               </z:index>      
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'008']">
+       <z:index name="Date/time-added-to-db" type="d">
+                       <xsl:value-of select="substring(.,1,6)"/>
+               </z:index>
+               <z:index name="Date/time-added-to-db" type="s">
+                       <xsl:value-of select="substring(.,1,6)"/>
+               </z:index>
+       </xsl:template>
+       <!-- LC-card-number NOT USED BY NEU
+       <xsl:template match="koharecord/record/address@hidden'010']">
+               <z:index name="LC-card-number" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       </xsl:template>
+ -->
+       <xsl:template match="koharecord/record/address@hidden'020']">
+               <z:index name="ISBN" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="Identifier-standard" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'022']">
+               <z:index name="ISSN" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="Identifier-standard" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       </xsl:template>
+       <!-- Cataloguing agency -->
+       <xsl:template match="koharecord/record/address@hidden'040']">
+               <z:index name="Record-source" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <!--language-->
+       <xsl:template match="koharecord/record/address@hidden'041']">
+               <z:index name="Code-language" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'050']">
+               <z:index name="LC-call-number" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="LC-call-number" type="p">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template 
match="koharecord/record/address@hidden'100']|koharecord/record/address@hidden'700']">
+       <z:index name="Author" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       <z:index name="Personal-name" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+                       <xsl:text> </xsl:text>
+               </z:index>
+       <z:index name="Authority/format-id" type="w">
+                       <xsl:value-of select="address@hidden'9']"/>
+               </z:index>
+               <z:index name="Author" type="s">
+                       <xsl:value-of select="address@hidden'a']"/>
+                       <xsl:text> </xsl:text>
+               </z:index>
+               <z:index name="Author" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'110']">
+               <z:index name="Author" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Corporate-name" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       <z:index name="Authority/format-id" type="w">
+                       <xsl:value-of select="address@hidden'9']"/>
+               </z:index>
+               
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'111']">
+       <z:index name="Author" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       <z:index name="Conference-name" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       <z:index name="Authority/format-id" type="w">
+                       <xsl:value-of select="address@hidden'9']"/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'130']">
+               <z:index name="Title-uniform" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'240']">
+               <z:index name="Title-uniform" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'242']">
+               <z:index name="Title-parallel" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'243']">
+               <z:index name="Title-collective" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template 
match="koharecord/record/address@hidden'245']|koharecord/record/address@hidden'740']">
+               <z:index name="Title" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title" type="s">
+                       <xsl:value-of select="address@hidden'a']"/>
+                       <xsl:text> </xsl:text>
+               </z:index>
+               <z:index name="Title" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       <z:index name="Material-type" type="w">
+                       <xsl:value-of select="address@hidden'h']"/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/record/address@hidden'260']">
+       <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Place-publication" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="Publisher" type="w">
+                       <xsl:value-of select="address@hidden'b']"/>
+               </z:index>
+               <z:index name="Date-of-Publication" type="w">
+                       <xsl:value-of select="address@hidden'c']"/>
+               </z:index>
+       </xsl:template>
+       <!--subscriptionid-->
+       <xsl:template 
match="koharecord/record/address@hidden'310']/address@hidden'6']">
+       <z:index name="Thematic-number" type="n">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+<xsl:template 
match="koharecord/record/address@hidden'440']/address@hidden'a']|koharecord/record/address@hidden'490']/address@hidden'a']">
+       <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Title-series" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template 
match="koharecord/record/address@hidden'500']|koharecord/record/address@hidden'501']|koharecord/record/address@hidden'520']">
+       <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Abstract" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <xsl:template 
match="koharecord/record/address@hidden'650']|koharecord/record/address@hidden'651']|koharecord/record/address@hidden'655']|koharecord/record/address@hidden'656']|koharecord/record/address@hidden'657']">
+       <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="Subject-heading" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="LC-subject-heading" type="p">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+               <z:index name="Subject-subdivision" type="w">
+                       <xsl:value-of 
select="address@hidden'v']|address@hidden'x']|address@hidden'y']|address@hidden'z']"/>
+               </z:index>
+               <z:index name="Authority-format-id" type="w">
+                       <xsl:value-of select="address@hidden'9']"/>
+               </z:index>
+       </xsl:template>
+       <!--NEU Specific-->
+       <xsl:template match="koharecord//record/address@hidden'942']">
+       <!-- Padded LC number to sort lcsort-->
+               <z:index name="Local-number" type="s">
+                       <xsl:value-of select="address@hidden'k']"/>
+                       <xsl:text> </xsl:text>
+               </z:index>
+               <!--cataloguerid-->
+               <z:index name="Indexed-by" type="w">
+                       <xsl:value-of select="address@hidden'x']"/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+
+       
+       
+       <!--Holdings specific indexing templates --><!--We use private indexing 
terms instead of Bib-1-->
+       <!-- Itemnumber-->
+       <xsl:template match="koharecord/holdings/record/address@hidden'001']">
+               <z:index name="itemnumber" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+               <z:index name="itemnumber" type="n">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <!--Item biblionumber no need to index just to show concept-->
+       <xsl:template match="koharecord/holdings/record/address@hidden'004']">
+               <z:index name="Number-db" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <!--datelastseen-->
+       <xsl:template match="koharecord/holdings/record/address@hidden'005']">
+       <z:index name="datelastseen" type="d">
+                       <xsl:value-of select="substring(.,1,8)"/>
+               </z:index>
+       </xsl:template>
+       <xsl:template match="koharecord/holdings/record/address@hidden'008']">
+       <z:index name="dateacquired" type="d">
+                       <xsl:value-of select="substring(.,1,6)"/>
+               </z:index>
+       <z:index name="dateacquired" type="s">
+                       <xsl:value-of select="substring(.,1,6)"/>
+               </z:index>
+       </xsl:template>
+       <!--borrowernumber-->
+       <xsl:template 
match="koharecord/holdings/record/address@hidden'887']/address@hidden'a']">
+               <z:index name="borrowernumber" type="w">
+                       <xsl:value-of select="."/>
+               </z:index>
+       </xsl:template>
+       <!--lost & lwithdrawn-->
+       <xsl:template match="koharecord/holdings/record/address@hidden'952']">
+       <!--wthdrawn-->
+               <z:index name="wthdrawn" type="n">
+                       <xsl:value-of select="address@hidden'0']"/>
+               </z:index>
+               <!--itemlost-->
+               <z:index name="itemlost" type="n">
+                       <xsl:value-of select="address@hidden'1']"/>
+               </z:index>
+               <!--date_due-->
+               <z:index name="date_due" type="d">
+                       <xsl:value-of select="address@hidden'4']"/>
+               </z:index>
+               <z:index name="date_due" type="s">
+                       <xsl:value-of select="address@hidden'4']"/>
+               </z:index>
+
+       
+               <!--homebranch-->
+       
+               <z:index name="homebranch" type="w">
+                       <xsl:value-of select="address@hidden'a']"/>
+               </z:index>
+       
+       <!--holdingbranch-->
+       
+               <z:index name="holdingbranch" type="w">
+                       <xsl:value-of select="address@hidden'b']"/>
+               </z:index>
+       
+       <!--booksellerid-->
+       
+               <z:index name="booksellerid" type="w">
+                       <xsl:value-of select="address@hidden'e']"/>
+               </z:index>
+       
+       
+       
+       <!--shelf-->
+               <z:index name="shelf" type="w">
+                       <xsl:value-of select="address@hidden'f']"/>
+               </z:index>
+       <!--location-->
+               <z:index name="location" type="w">
+                       <xsl:value-of select="address@hidden'g']"/>
+               </z:index>
+       
+       <!--cutter extra sorting bits-->
+       
+               <z:index name="cutterextra" type="s">
+                       <xsl:value-of select="."/>
+               </z:index>
+       
+       <!--itemcallnumber-->
+
+<z:index name="itemcallnumber" type="p">
+                       <xsl:value-of select="address@hidden'o']"/>
+               </z:index>
+               <z:index name="itemcallnumber" type="s">
+                       <xsl:value-of select="address@hidden'o']"/>
+                       <xsl:text> </xsl:text>
+               </z:index>
+       
+       <!--circulation-desk-id-->
+       
+               <z:index name="circid" type="w">
+                       <xsl:value-of select="address@hidden'x']"/>
+               </z:index>
+       
+       <!--barcode-->
+       
+               <z:index name="barcode" type="w">
+                       <xsl:value-of select="address@hidden'p']"/>
+               </z:index>
+       
+       <!--itemnotes-->
+       
+               <z:index name="itemnotes" type="w">
+                       <xsl:value-of select="address@hidden'z']"/>
+               </z:index>
+               <z:index name="any" type="w">
+                       <xsl:value-of select="address@hidden'z']"/>
+               </z:index>
+       </xsl:template>
+</xsl:stylesheet>

Index: zebra.xsl
===================================================================
RCS file: zebra.xsl
diff -N zebra.xsl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ zebra.xsl   25 Aug 2006 21:17:20 -0000      1.1
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+$Id: zebra.xsl,v 1.1 2006/08/25 21:17:20 tgarip1957 Exp $
+   Copyright (C) 1995-2006
+   Index Data ApS
+
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra.  If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+                xmlns:z="http://indexdata.dk/zebra/xslt/1"; 
+                version="1.0">
+
+  <xsl:param name="id" select="''"/>
+  <xsl:param name="filename" select="''"/>
+  <xsl:param name="rank" select="''"/>
+  <xsl:param name="score" select="''"/>
+  <xsl:param name="schema" select="''"/>
+  <xsl:param name="size" select="''"/>
+
+  <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+
+  <!-- match on any record -->
+  <xsl:template match="/">
+    <z:info z:id="{$id}"
+            z:filename="{$filename}"
+            z:rank="{$rank}"
+            z:score="{$score}"
+            z:schema="{$schema}"
+            z:size="{$size}"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Index: bib1.att
===================================================================
RCS file: bib1.att
diff -N bib1.att
--- bib1.att    10 Apr 2006 21:52:38 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,110 +0,0 @@
-# $Id: bib1.att,v 1.1 2006/04/10 21:52:38 tgarip1957 Exp $
-# Bib-1 Attribute Set
-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-heading
-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              Date-of-publication
-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              Identifier-local-call
-att 54              Code-language
-att 55              Code-geographic
-att 56              Code-institution
-att 57              Name-and-title
-att 58              Name-geographic
-att 59              Place-publication
-att 60              CODEN
-att 61              Microform-generation
-att 62              Abstract
-att 63              Note
-att 1000            Author-title
-att 1001            Record-type
-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/time-added-to-db
-att 1012            Date/time-last-modified
-att 1013            Authority/format-id
-att 1014            Concept-text
-att 1015            Concept-reference
-att 1016            Any                1016,4,1005,62
-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            Content-type
-att 1035            Anywhere
-att 1036            Author-Title-Subject
-
-## My extra definitions to handle LC sorting and other holdings data
-att 8000       Holding-branch
-att 8001       LCalpha
-att 8002       LCnumber
-att 8005       Shelving
\ No newline at end of file

Index: collection.abs
===================================================================
RCS file: collection.abs
diff -N collection.abs
--- collection.abs      1 Apr 2006 22:42:04 -0000       1.9
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
-# $Id: collection.abs,v 1.9 2006/04/01 22:42:04 rangi Exp $
-
-# This is a fairly simple example of a set of MARC21 indexing rules. It
-# results in a server which provides a passable Bath level 0 and 1 service
-# (author, title, subject, keyword and exact services). Feel free to
-# elaborate on it, and if you do, please consider sharing your additions.
-# 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.
-encoding utf-8
-name marc21
-attset bib1.att
-attset gils.att
-esetname F @
-esetname B @
-
-marc usmarc.mar
-
-xpath disable
-
-all any
-melm 090$c             identifier-standard,identifier-standard:p
-melm 020$a             ISBN:w,ISBN:s
-melm 022$a             ISSN:w,ISBN:w
-melm 050               LC-call-number,LC-call-number:s
-melm 082               Dewey-classification:w,Dewey-classification:s
-melm 090$c             Local-number:w
-melm 100$9             Cross-Reference !:w
-melm 100               author,author:p,author:s
-melm 110               author
-melm 111               author
-melm 130               title
-melm 240               title,title:p
-melm 242               title,title:p
-melm 243               title,title:p
-melm 245$a             title:w,title:s
-melm 245$c             author
-melm 245               title,title:p
-melm 246               title,title:p
-melm 247               title,title:p
-melm 260$a             Place-publication !:w,!:p
-melm 260$b             Publisher,Publisher:w,Publisher:p,Publisher:s
-melm 260$c             Date,Date:y,Date:s
-melm 260               Place-publication       
-melm 300$f             Material-type,Material-type:w
-melm 400$t             title,author
-melm 400               author
-melm 410$t             title,author
-melm 410               author
-melm 411$t             title,author
-melm 411               author
-melm 440$a             title,title:p
-melm 440               title
-melm 490$a             title,title:p
-melm 490               title
-melm 600$t             title
-melm 600               subject-heading,subject-heading:p
-melm 610$t             title
-melm 610               subject-heading
-melm 611$t             title
-melm 611               subject-heading
-melm 630               subject-heading
-melm 650$9             Controlled-Subject-Index        
-melm 650               subject-heading,subject-heading:p
-melm 651$9             Controlled-Subject-Index        
-melm 651               subject-heading,subject-heading:p
-melm 652$9             Controlled-Subject-Index        
-melm 652               subject-heading,subject-heading:p
-melm 653$9             Controlled-Subject-Index        
-melm 653               subject-heading,subject-heading:p
-melm 654$9             Controlled-Subject-Index        
-melm 654               subject-heading
-melm 655$9             Controlled-Subject-Index        
-melm 655               subject-heading
-melm 656$9             Controlled-Subject-Index        
-melm 656               subject-heading
-melm 657$9             Controlled-Subject-Index        
-melm 657               subject-heading
-melm 650$9             Controlled-Subject-Index        
-
-melm 700$9             Cross-Reference
-melm 700$t             title,author
-melm 700$a             author,author:p
-melm 700               author
-melm 710$t             title,author
-melm 710$a             author,author:p
-melm 710               author
-melm 711$t             title,author
-melm 711               author
-melm 730               title
-melm 740               title
-melm 800$t             title,author
-melm 800               author
-melm 810$t             title,author
-melm 810               author
-melm 811$t             title,author
-melm 811               author
-melm 830               title
-melm 942$c             Material-type
-melm 952$a             Local-classification
-melm 952$b             Record-source
-melm 952$d             Host-item
-melm 952$p             Stock-number
-melm 952$v             
Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s
-melm 952               Local-classification

Index: explain.att
===================================================================
RCS file: explain.att
diff -N explain.att
--- explain.att 11 Dec 2005 00:57:08 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-# The Explain Attribute Set
-#
-# $Id: explain.att,v 1.1 2005/12/11 00:57:08 kados Exp $
-name explain
-reference Exp-1
-
-att 1                  ExplainCategory
-att 2                  HumanStringLanguage
-att 3                  DatabaseName
-att 4                  Targetname
-att 5                  AttributeSetOID
-att 6                  RecordSyntaxOID
-att 7                  TagSetOID
-att 8                  ExtendedServicesOID
-att 9                  DateAdded
-att 10                 DateChanged
-att 11                 DateExpired
-att 12                 ElementSetName
-att 13                 ProcessingContext
-att 14                 ProcessingName
-att 15                 TermListName
-att 16                 SchemaOID
-att 17                 Producer
-att 18                 Supplier
-att 19                 Availability
-att 20                 Proprietary
-att 21                 UserFee

Index: record.abs
===================================================================
RCS file: record.abs
diff -N record.abs
--- record.abs  10 Apr 2006 21:49:41 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,105 +0,0 @@
-# $Id: record.abs,v 1.3 2006/04/10 21:49:41 tgarip1957 Exp $
-
-# This is a fairly simple example of a set of MARC21 indexing rules. It
-# results in a server which provides a passable Bath level 0 and 1 service
-# (author, title, subject, keyword and exact services). Feel free to
-# elaborate on it, and if you do, please consider sharing your additions.
-# 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.
-encoding utf-8
-name marc21
-attset bib1.att
-attset gils.att
-esetname F @
-esetname B @
-
-marc usmarc.mar
-systag sysno rank
-xpath disable
-
-all any
-melm 020$a             ISBN:w
-melm 022$a             ISSN:w,ISBN:w
-melm 050$b             LC-call-number:s
-melm 050               LC-call-number
-melm 090$a             LCalpha:s
-melm 090$b             LCnumber:s
-melm 090$c             Identifier-standard:w
-melm 100$9     Cross-Reference !:w
-melm 100$a             author,author:p,author:s
-melm 100               author
-melm 110               author
-melm 111               author
-melm 130               title
-melm 240               title,title:p
-melm 242               title,title:p
-melm 243               title,title:p
-melm 245$a             title:w,title:p,title:s
-melm 245$c             author
-melm 245               title,title:p
-melm 246               title,title:p
-melm 247               title,title:p
-melm 260$a             Place-publication       !:w,!:p
-melm 260$b             Publisher               !:w,!:p
-melm 260$c             Date            !:y
-melm 260               Place-publication       
-melm 400$t             title,author
-melm 400               author
-melm 410$t             title,author
-melm 410               author
-melm 411$t             title,author
-melm 411               author
-melm 440$a             title,title:p
-melm 440               title
-melm 490$a             title,title:p
-melm 490               title
-melm 600$t             title
-melm 600               subject-heading,subject-heading:p
-melm 610$t             title
-melm 610               subject-heading
-melm 611$t             title
-melm 611               subject-heading
-melm 630               subject-heading
-melm 650$9             Controlled-Subject-Index        
-melm 650               subject-heading,subject-heading:p
-melm 651$9             Controlled-Subject-Index        
-melm 651               subject-heading,subject-heading:p
-melm 652$9             Controlled-Subject-Index        
-melm 652               subject-heading,subject-heading:p
-melm 653$9             Controlled-Subject-Index        
-melm 653               subject-heading,subject-heading:p
-melm 654$9             Controlled-Subject-Index        
-melm 654               subject-heading
-melm 655$9             Controlled-Subject-Index        
-melm 655               subject-heading
-melm 656$9             Controlled-Subject-Index        
-melm 656               subject-heading
-melm 657$9             Controlled-Subject-Index        
-melm 657               subject-heading
-
-melm 700$9             Cross-Reference
-melm 700$t             title,author
-melm 700$a             author,author:p
-melm 700               author
-melm 710$t             title,author
-melm 710$a             author,author:p
-melm 710               author
-melm 711$t             title,author
-melm 711               author
-melm 730               title
-melm 740               title
-melm 800$t             title,author
-melm 800               author
-melm 810$t             title,author
-melm 810               author
-melm 811$t             title,author
-melm 811               author
-melm 830               title
-melm 952$a             Local-classification
-melm 952$b             Holding-branch
-melm 952$d             Shelving
-melm 952$p             Stock-number
-melm 952$v       Date-of-acquisition:d
-

Index: usmarc.abs
===================================================================
RCS file: usmarc.abs
diff -N usmarc.abs
--- usmarc.abs  11 Dec 2005 04:09:29 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-# $Id: usmarc.abs,v 1.2 2005/12/11 04:09:29 kados Exp $
-name usmarc
-reference USmarc
-attset bib1.att
-tagset usmarc.tag
-
-marc usmarc.mar
-
-esetname B usmarc-b.est
-esetname F @
-
-# 020a is isbn
-elm 020                 isbn            -
-elm 020/?               isbn            !:w
-elm 020/?/a             isbn            !:w,!:p
-
-# 090 is mapped to biblionumber in Koha
-elm 090            Local-number            -
-elm 090/?          Local-number            -
-elm 090/?/c        Local-number            !:w
-
-# All 245 subfields mapped to title (word) and
-# 245 subfield a mapped to tile (phrase).
-elm 245                 title           -
-elm 245/?               title           !:w
-elm 245/?/a             title           !:w,!:p
-
-# 100 mapped to Author-name-personal and Author.
-elm 100                 Author-name-personal    -
-elm 100/?               Author-name-personal    !:w,!:p,Author:w,Author:p
-
-# 110 mapped to Author-name-corporate and Author
-elm 110                 Author-name-corporate   -
-elm 110/?               Author-name-corporate   !:w,!:p,Author:w,Author:p
-
-# 111 mapped to Author-name-conference and Author
-elm 111                 Author-name-conference  -
-elm 111/?               Author-name-conference  !:w,!:p,Author:w,Author:p
-
-# Tag 260 subfield a mapped to Place-publication
-elm 260                 Place-publication       -
-elm 260/?               Place-publication       -
-elm 260/?/a             Place-publication       !:w
-elm 260/?/b             Publisher               !:w
-elm 260/?/c             Date                    !:w
-

Index: usmarc.mar
===================================================================
RCS file: usmarc.mar
diff -N usmarc.mar
--- usmarc.mar  11 Dec 2005 00:57:34 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-# $Id: usmarc.mar,v 1.1 2005/12/11 00:57:34 kados Exp $
-name usmarc
-reference USmarc

Index: usmarc.tag
===================================================================
RCS file: usmarc.tag
diff -N usmarc.tag
--- usmarc.tag  11 Dec 2005 00:57:46 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-# Pseudo-tagset for USMARC
-#
-# $Id: usmarc.tag,v 1.1 2005/12/11 00:57:46 kados Exp $
-
-name usmarc
-type 4
-include tagsetm.tag
-
-#tag 1          a               string
-#tag 2          b               string
-tag 245         245             string
-tag 100         100             string
-tag 090         c               string




reply via email to

[Prev in Thread] Current Thread [Next in Thread]