-# $Id: Makefile.am,v 1.3 2005-05-01 07:17:47 adam Exp $
+# $Id: Makefile.am,v 1.4 2005-05-31 14:18:17 adam Exp $
check_PROGRAMS = xslt1 xslt2 xslt3
TESTS = $(check_PROGRAMS)
-EXTRA_DIST=zebra.cfg marc-col.xml marc-one.xml marc1.xsl
+EXTRA_DIST=zebra.cfg marc-col.xml marc-one.xml index.xsl id.xsl marcschema.xsl
xslt1_SOURCES = xslt1.c
xslt2_SOURCES = xslt2.c
--- /dev/null
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:m="http://www.loc.gov/MARC21/slim"
+ xmlns:z="http://indexdata.dk/zebra/indexing/1"
+ version="1.0">
+ <!-- $Id: index.xsl,v 1.1 2005-05-31 14:18:17 adam Exp $ -->
+ <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
+
+ <xsl:template match="/m:record/m:controlfield[@tag=001]">
+ <z:index field="control">
+ <xsl:apply-templates match="."/>
+ </z:index>
+ </xsl:template>
+
+ <xsl:template match="/m:record/m:datafield[@tag=245]">
+ <z:index field="title">
+ <xsl:apply-templates match="."/>
+ </z:index>
+ </xsl:template>
+
+</xsl:stylesheet>
+++ /dev/null
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:m="http://www.loc.gov/MARC21/slim"
- xmlns:z="http://indexdata.dk/zebra/indexing/1"
- version="1.0">
- <!-- $Id: marc1.xsl,v 1.2 2005-04-28 13:34:05 adam Exp $ -->
- <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
-
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="$schema='http://indexdata.dk/zebra/indexing/1'">
- <xsl:apply-templates mode="index"/>
- </xsl:when>
- <xsl:when test="$schema='brief'">
- <xsl:apply-templates mode="brief"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
-
- <xsl:template match="/m:record/m:controlfield[@tag=001]" mode="index">
- <z:index field="control">
- <xsl:apply-templates match="."/>
- </z:index>
- </xsl:template>
-
- <xsl:template match="/m:record/m:datafield[@tag=245]" mode="index">
- <z:index field="title">
- <xsl:apply-templates match="."/>
- </z:index>
- </xsl:template>
-
- <xsl:template match="/m:record/m:datafield[@tag=245]" mode="brief">
- <title><xsl:value-of select="."/></title>
- </xsl:template>
-
-</xsl:stylesheet>
--- /dev/null
+<schemaInfo>
+ <!-- $Id: marcschema.xml,v 1.1 2005-05-31 14:18:17 adam Exp $ -->
+ <schema name="index" identifier="http://indexdata.dk/zebra/indexing/1"
+ stylesheet="index.xsl" />
+ <schema name="F" stylesheet="id.xsl" />
+</schemaInfo>
+
+
-/* $Id: xslt1.c,v 1.2 2005-05-01 07:17:47 adam Exp $
+/* $Id: xslt1.c,v 1.3 2005-05-31 14:18:17 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
zebra_init(zh);
- zebra_set_resource(zh, "recordType", "xslt1.marc1.xsl");
+ zebra_set_resource(zh, "recordType", "xslt1.marcschema.xml");
zebra_begin_trans(zh, 1);
sprintf(path, "%.200s/marc-col.xml", get_srcdir());
-/* $Id: xslt2.c,v 1.2 2005-05-01 07:17:47 adam Exp $
+/* $Id: xslt2.c,v 1.3 2005-05-31 14:18:17 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
zebra_init(zh);
- zebra_set_resource(zh, "recordType", "xslt1.marc1.xsl");
+ zebra_set_resource(zh, "recordType", "xslt1.marcschema.xml");
sprintf(path, "%.200s/marc-col.xml", get_srcdir());
f = fopen(path, "rb");
-/* $Id: xslt3.c,v 1.1 2005-05-01 07:17:47 adam Exp $
+/* $Id: xslt3.c,v 1.2 2005-05-31 14:18:17 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
zebra_init(zh);
- zebra_set_resource(zh, "recordType", "xslt.marc1.xsl");
+ zebra_set_resource(zh, "recordType", "xslt.marcschema.xml");
sprintf(path, "%.200s/marc-one.xml", get_srcdir());
f = fopen(path, "rb");