Bug 6152: Document DOM authority index config
authorJared Camins-Esakov <jcamins@bywatersolutions.com>
Sat, 9 Apr 2011 15:29:07 +0000 (11:29 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sat, 14 May 2011 07:10:10 +0000 (19:10 +1200)
Add a note so developers know not to edit authority-zebra-indexdefs.xsl directly
but to instead edit authority-koha-indexdefs.xml and use the
koha-indexdefs-to-zebra.xsl stylesheet to generate the former from the latter.

Signed-off-by: Frederic Demians <frederic@tamil.fr>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl
etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl

index 2515317..87d31bc 100644 (file)
@@ -1,4 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- This is the canonical source for the authority DOM indexing configuration
+for MARC21. To generate the authority-zebra-indexdefs.xsl file that Zebra uses,
+run the following command:
+`xsltproc koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml >
+authority-zebra-indexdefs.xsl`
+-->
 <kohaidx:index_defs xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs">
   <!-- variables -->
   <kohaidx:var name="form_subdivision_subfield">v</kohaidx:var>
index 9538e6f..5c37bc6 100644 (file)
@@ -1,4 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+This file has been automatically generated from a Koha index definition file
+with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file,
+as it may be overwritten. To regenerate, edit the appropriate Koha index
+definition file (probably something like authority-koha-indexdefs.xml) and run:
+`xsltproc koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml >
+authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
+-->
 <xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0">
   <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
   <xslo:template match="text()"/>
index d466611..66bf816 100644 (file)
     <xsl:key name="index_match_heading_tag" match="kohaidx:index_match_heading" use="@tag"/>
 
     <xsl:template match="kohaidx:index_defs">
+    <xsl:comment>
+This file has been automatically generated from a Koha index definition file
+with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file,
+as it may be overwritten. To regenerate, edit the appropriate Koha index
+definition file (probably something like authority-koha-indexdefs.xml) and run:
+`xsltproc koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml >
+authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
+</xsl:comment>
         <xslo:stylesheet version="1.0">
             <xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
             <xslo:template match="text()"/>