MARCXML example is using filter 'dom' instead of 'alvis'.
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 13 Dec 2007 17:42:28 +0000 (17:42 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 13 Dec 2007 17:42:28 +0000 (17:42 +0000)
examples/marcxml/MARC21slim2INDEX.xsl
examples/marcxml/Makefile.am
examples/marcxml/README
examples/marcxml/dom-config.xml [new file with mode: 0644]
examples/marcxml/filter_alvis_conf.xml [deleted file]
examples/marcxml/zebra.cfg
examples/marcxml/zebra.xsl

index 82d6846..cdffb66 100644 (file)
@@ -1,8 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- xsltproc MARC21slim2INDEX.xsl collection-2.xml -->
-
 <!-- 
-$Id: MARC21slim2INDEX.xsl,v 1.5 2006-06-09 20:46:38 marc Exp $
+$Id: MARC21slim2INDEX.xsl,v 1.6 2007-12-13 17:42:28 adam Exp $
    Copyright (C) 1995-2006
    Index Data ApS
 
@@ -26,11 +24,10 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 <xsl:stylesheet 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-    xmlns:z="http://indexdata.dk/zebra/xslt/1" 
+    xmlns:z="http://indexdata.com/zebra-2.0" 
     xmlns:marc="http://www.loc.gov/MARC21/slim" 
     version="1.0">
 
-  <!-- <xsl:include href="MARC21slimUtils.xsl"/> -->
   <xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
 
   <!-- disable all default text node output -->
@@ -79,7 +76,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
        </xsl:choose>
      </xsl:variable>
 
-     <z:record id="{$controlField001}" type="update">
+     <z:record z:id="{$controlField001}" type="update">
 
 
        <!-- <xsl:attribute name="id"></xsl:attribute> -->
@@ -214,7 +211,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    -->
    <xsl:template name="Abstract">
      <xsl:for-each select="marc:datafield[@tag='520']">
-       <z:index name="Abstract" type="w">
+       <z:index name="Abstract:w">
          <xsl:value-of select="."/>
        </z:index>
      </xsl:for-each>
@@ -287,12 +284,12 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
                           | marc:datafield[@tag='800']
                           | marc:datafield[@tag='810']
                           | marc:datafield[@tag='811']">
-      <z:index name="Author" type="w">
+      <z:index name="Author:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
     <xsl:for-each select="marc:datafield[@tag='100']">
-      <z:index name="Author" type="p">
+      <z:index name="Author:p">
         <xsl:value-of select="marc:subfield[@code='a']"/>
         <xsl:text> </xsl:text>
         <xsl:value-of select="marc:subfield[@code='d']"/>
@@ -316,7 +313,7 @@ title                      or a conference or meeting      111/2XX, subfields
   <xsl:template name="Author-title">
     <xsl:if test="marc:datafield[@tag='100']
                   and marc:datafield[@tag='245']">
-      <z:index name="Author-title" type="p">
+      <z:index name="Author-title:p">
         <xsl:value-of 
             select="marc:datafield[@tag='100']/marc:subfield[@code='a']"/>
         <xsl:text> </xsl:text>
@@ -342,7 +339,7 @@ corporate                  of persons that is identified
    -->
   <xsl:template name="Author-name-corporate">
     <xsl:for-each select="marc:datafield[@tag='110']">
-      <z:index name="Author-name-corporate" type="w">
+      <z:index name="Author-name-corporate:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -362,7 +359,7 @@ conference                 representatives of various
    -->
   <xsl:template name="Author-name-conference">
     <xsl:for-each select="marc:datafield[@tag='111']">
-      <z:index name="Author-name-conference" type="w">
+      <z:index name="Author-name-conference:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -382,13 +379,13 @@ Author-name-personal 1004  A person's real name,           100, 400, 700, 800
   <xsl:template name="Author-name-personal">
     <xsl:for-each select="marc:datafield[@tag='100']">
       <xsl:for-each select="marc:subfield[@code='a']">
-        <z:index name="Author-name-personal" type="w">
+        <z:index name="Author-name-personal:w">
           <xsl:value-of select="."/>
         </z:index>
       </xsl:for-each>
     </xsl:for-each>
     <xsl:for-each select="marc:datafield[@tag='100']">
-      <z:index name="Author-name-personal" type="p">
+      <z:index name="Author-name-personal:p">
         <xsl:value-of select="marc:subfield[@code='a']"/>
         <xsl:text> </xsl:text>
         <xsl:value-of select="marc:subfield[@code='d']"/>
@@ -667,7 +664,7 @@ Identifier-ISBN         7  International Standard Book     020
    -->
   <xsl:template name="ISBN">
     <xsl:for-each select="marc:datafield[@tag='020']/marc:subfield[@code='a']">
-      <z:index name="ISBN" type="n">
+      <z:index name="ISBN:n">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -684,7 +681,7 @@ Identifier-ISSN         8  International Standard Serial   022, 4XX$x,
    -->
   <xsl:template name="ISSN">
     <xsl:for-each select="marc:datafield[@tag='022']">
-      <z:index name="ISSN" type="n">
+      <z:index name="ISSN:n">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -887,7 +884,7 @@ Subject                21  The primary topic on which a    600, 610, 611, 630,
                           |marc:datafield[@tag='655']
                           |marc:datafield[@tag='656']
                           |marc:datafield[@tag='657']">
-      <z:index name="Subject-heading" type="w">
+      <z:index name="Subject-heading:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -895,7 +892,7 @@ Subject                21  The primary topic on which a    600, 610, 611, 630,
                           |marc:datafield[@tag='650']
                           |marc:datafield[@tag='651']
                           |marc:datafield[@tag='653']">
-      <z:index name="Subject-heading" type="w">
+      <z:index name="Subject-heading:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
@@ -1023,7 +1020,7 @@ Title                   4  A word, phrase, character,      130, 21X-24X, 440,
    -->
   <xsl:template name="Title">
     <xsl:for-each select="marc:datafield[@tag='245']/marc:subfield[@code='a']">
-      <z:index name="Title" type="w">
+      <z:index name="Title:w">
         <xsl:value-of select="."/>
       </z:index>
     </xsl:for-each>
index e7e58c1..7e3c3e1 100644 (file)
@@ -1,6 +1,7 @@
-# $Id: Makefile.am,v 1.2 2006-06-13 07:52:15 marc Exp $
+# $Id: Makefile.am,v 1.3 2007-12-13 17:42:28 adam Exp $
 
 EXTRA_DIST = zebra.cfg\
+   README\
    MARC21slim2INDEX.xsl\
    MARC21slim2MADS.xsl\
    MARC21slim2MODS3-1.xsl\
@@ -13,7 +14,7 @@ EXTRA_DIST = zebra.cfg\
    collection-opera-43.xml\
    collection-sandburg-1.xml\
    collection-subjmrc.xml\
-   filter_alvis_conf.xml\
+   dom-config.xml\
    identity.xsl\
    zebra.xsl
 
index a222990..1734ce0 100644 (file)
@@ -1,8 +1,7 @@
-Example data and configuration for MARC21 XML data using the 'alvis'
+Example data and configuration for MARC21 XML data using the 'dom'
 XSLT input filter. 
 
 MARC21 XML example data and transforming XSLT stylesheets are borrowed from 
-
 The Library of Congress' Network Development and MARC Standards Office,
 which is developing a framework for working with MARC data in a XML
 environment. 
diff --git a/examples/marcxml/dom-config.xml b/examples/marcxml/dom-config.xml
new file mode 100644 (file)
index 0000000..76601d3
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+$Id: dom-config.xml,v 1.1 2007-12-13 17:42:28 adam 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.
+-->
+<dom>
+  <extract name="index">
+    <xslt stylesheet="MARC21slim2INDEX.xsl"/>
+  </extract>
+  <retrieve name="marc">
+    <xslt stylesheet="identity.xsl" />
+  </retrieve>
+  <retrieve name="dc">
+   <xslt stylesheet="MARC21slim2SRWDC.xsl"/>
+  </retrieve>
+  <retrieve name="index">
+    <xslt stylesheet="MARC21slim2INDEX.xsl"/>
+  </retrieve>
+  <retrieve name="mads">
+    <xslt  stylesheet="MARC21slim2MADS.xsl"/>
+  </retrieve>
+  <retrieve name="mods">
+    <xslt stylesheet="MARC21slim2MODS3-1.xsl"/>
+  </retrieve>
+  <retrieve name="zebra">
+    <xslt stylesheet="zebra.xsl"/>
+  </retrieve>
+  <input syntax="xml">
+    <xmlreader level="1"/>
+  </input>
+</dom>
diff --git a/examples/marcxml/filter_alvis_conf.xml b/examples/marcxml/filter_alvis_conf.xml
deleted file mode 100644 (file)
index eef35b9..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-\r
-<!-- \r
-$Id: filter_alvis_conf.xml,v 1.5 2006-06-09 20:46:38 marc Exp $\r
-   Copyright (C) 1995-2006\r
-   Index Data ApS\r
-\r
-This file is part of the Zebra server.\r
-\r
-Zebra is free software; you can redistribute it and/or modify it under\r
-the terms of the GNU General Public License as published by the Free\r
-Software Foundation; either version 2, or (at your option) any later\r
-version.\r
-\r
-Zebra is distributed in the hope that it will be useful, but WITHOUT ANY\r
-WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
-for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with Zebra; see the file LICENSE.zebra.  If not, write to the\r
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA\r
-02111-1307, USA.\r
--->\r
-\r
-<schemaInfo>\r
-  <schema name="dc" default="1" stylesheet="MARC21slim2SRWDC.xsl" />\r
-  <schema name="index" identifier="http://indexdata.dk/zebra/xslt/1"\r
-          stylesheet="MARC21slim2INDEX.xsl" />\r
-  <schema name="mads" stylesheet="MARC21slim2MADS.xsl" />\r
-  <schema name="marc" stylesheet="identity.xsl" />\r
-  <schema name="mods" stylesheet="MARC21slim2MODS3-1.xsl" />\r
-  <schema name="zebra" stylesheet="zebra.xsl" />\r
-  <split level="1"/> \r
-</schemaInfo>\r
-\r
index e1c36d7..e332aa3 100644 (file)
@@ -1,7 +1,7 @@
-profilePath: ./:./../../tab
+profilePath: .:./../../tab
 modulePath: ../../index/.libs
 
-recordtype: alvis.filter_alvis_conf.xml
+recordtype: dom.dom-config.xml
 
 attset: bib1.att
 attset: explain.att
@@ -12,5 +12,3 @@ attset: explain.att
 #tmpdir: db2/tmp
 #keytmpdir: db2/tmp
 
-
-
index 27c6002..f0745e8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!-- 
-$Id: zebra.xsl,v 1.1 2006-06-09 20:46:38 marc Exp $
+$Id: zebra.xsl,v 1.2 2007-12-13 17:42:28 adam Exp $
    Copyright (C) 1995-2006
    Index Data ApS
 
@@ -24,7 +24,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:z="http://indexdata.dk/zebra/xslt/1" 
+                xmlns:z="http://indexdata.com/zebra-2.0" 
                 version="1.0">
 
   <xsl:param name="id" select="''"/>