Koha/misc/migration_tools
Tomas Cohen Arazi 7a178fd262 Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed
Using rebuild_zerba.pl with the -x option switch, produces an incorrect output in
terms of what our XSLTs expect for indexing. This patch introduces the right namespace information
on the exported records so indexing succeeds.

To test:
- On current master, have some records on your db
- Run:
  $ sudo koha-shell kohadev
  $ cd kohaclone
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
=> you will get a message like this:

NOTHING cleaned : the export /tmp/NL5ufjUfpp has been kept.

- Run
  $ less /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: The first line looks like this

<?xml version="1.0" encoding="UTF-8"?><collection><record

- Now run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/NL5ufjUfpp/biblio/exported_records
=> FAIL: No output
- Apply the patch
- Run:
  $ misc/migration_tools/rebuild_zebra.pl -r -b -k -x
- Take a look at the result file:
  $ less /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: The start of the file looks like this:
<?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim">

- Run:
  $ xsltproc \
     /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
     /tmp/asdiouqwiue/biblio/exported_records
=> SUCCESS: There is actually indexing data :-D
- Sign off :-D

Edit: I changed qq{} for q{} as suggested by Jonathan.

Sponsored-by: American Numismatic Society

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-23 17:04:04 +00:00
..
22_to_30 Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
build_oai_sets.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
buildCOUNTRY.pl
buildEDITORS.pl
buildLANG.pl
bulkmarcimport.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
checkNonIndexedBiblios.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
create_analytical_rel.pl Bug 5528: Analytic records support 2011-10-13 10:03:39 +13:00
fix_onloan.pl
import_lexile.pl Bug 11368: [QA Followup 2] 2015-09-18 12:40:52 -03:00
koha-svc.pl Bug 14383: misc: Fix some typos in comments and documentation 2015-06-22 17:34:45 -03:00
merge_authority.pl Bug 16010: follow-up of 15381 - FIX merge_authorities migration script 2016-03-21 18:28:46 +00:00
rebuild_zebra.pl Bug 16505: <collection> is missing the marc namespace and updates fail if -x is passed 2016-05-23 17:04:04 +00:00
rebuild_zebra_sliced.sh Bug 8746 [Follow-up] Replace == by eq in string comparison 2013-04-21 09:23:23 -04:00
remove_unused_authorities.pl Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
switch_marc21_series_info.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
upgradeitems.pl (bug #4518) enhance 2.2 to 3.0 scripts 2011-11-16 17:48:24 +01:00