In authority-koha-indexdefs.xml, all tags use the namespace "kohaidx" except the tag "id". When re-generating authority-zebra-indexdefs.xsl, the line : <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> is modified : <xslo:variable name="idfield" select="normalize-space()"/> This is an error.
Created attachment 40582 [details] [review] Bug 14453 - kohaidx is missing for id in authority-koha-indexdefs.xml In authority-koha-indexdefs.xml, all tags use the namespace "kohaidx" except the tag "id". When re-generating authority-zebra-indexdefs.xsl, the line : <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> is modified : <xslo:variable name="idfield" select="normalize-space()"/> This is an error. This patch adds kohaidx namespace to correct. Test plan : - Without patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has changed : <xslo:variable name="idfield" select="normalize-space()"/> - Apply patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has not changed (same for unimarc flavor)
Created attachment 40626 [details] [review] Bug 14453 - kohaidx is missing for id in authority-koha-indexdefs.xml In authority-koha-indexdefs.xml, all tags use the namespace "kohaidx" except the tag "id". When re-generating authority-zebra-indexdefs.xsl, the line : <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> is modified : <xslo:variable name="idfield" select="normalize-space()"/> This is an error. This patch adds kohaidx namespace to correct. Test plan : - Without patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has changed : <xslo:variable name="idfield" select="normalize-space()"/> - Apply patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has not changed (same for unimarc flavor) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Before the patch /usr/bin/xsltproc /home/mirko/koha/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl.bug14453 diff authority-zebra-indexdefs.xsl authority-zebra-indexdefs.xsl.bug14453 14a15 > <xslo:template match="text()" mode="index_facets"/> 30c31 < <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> --- > <xslo:variable name="idfield" select="normalize-space()"/> 37a39 > <xslo:apply-templates mode="index_facets"/> After the patch /usr/bin/xsltproc /home/mirko/koha/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl.bug14453patched diff authority-zebra-indexdefs.xsl authority-zebra-indexdefs.xsl.bug14453patched 14a15 > <xslo:template match="text()" mode="index_facets"/> 37a39 > <xslo:apply-templates mode="index_facets"/> The patch fixes the problem in the description. There seem to be two other differences between the standard file and the generated output?
(In reply to Mirko Tietgen from comment #3) > There seem to be two other differences between the standard file and the > generated output? Yes indeed, but since its not the purpose of this bugfix I've not added this in the patch. Since authorities does not use facets, this call is useless. Thanks for testing :)
(In reply to Mirko Tietgen from comment #3) > There seem to be two other differences between the standard file and the > generated output? Those templates will never be applied to authority records as we don't have facets defined for authorities. I tried myself (to make sure) and the templates in the generated XSLT work as expected.
Created attachment 40634 [details] [review] [SIGNED OFF] Bug 14453: kohaidx is missing for id in authority-koha-indexdefs.xml In authority-koha-indexdefs.xml, all tags use the namespace "kohaidx" except the tag "id". When re-generating authority-zebra-indexdefs.xsl, the line : <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> is modified : <xslo:variable name="idfield" select="normalize-space()"/> This is an error. This patch adds kohaidx namespace to correct. Test plan : - Without patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has changed : <xslo:variable name="idfield" select="normalize-space()"/> - Apply patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has not changed (same for unimarc flavor) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> As Mirko mentioned, the xslt's now generate the facet-processing templates in the authority xslt's too. They are harmless because we don't define facets for authority records. If we did, it would be harmless too.
(In reply to Tomás Cohen Arazi from comment #6) > As Mirko mentioned, the xslt's now generate the facet-processing templates in > the authority xslt's too. They are harmless because we don't define facets > for authority records. If we did, it would be harmless too. I think it would be cool to commit the correct generated files, in order to avoid having this surprise at first generation ;)
I agree. If it is what you get from a generation, the standard file should have it too.
Created attachment 40635 [details] [review] Bug 14453 Followup: fix standard file Make the standard file the same as the generated version
Added a followup for that.
(In reply to Mirko Tietgen from comment #10) > Added a followup for that. Can you add the same change for UNIMARC ? I'll sign them
Created attachment 40639 [details] [review] [SIGNED OFF] Bug 14453: (followup) Fix shipped XSLT files Make the shipped XSLTs for authorities (MARC21 and UNIMARC) the same as the generated version Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Created attachment 40838 [details] [review] [PASSED QA] Bug 14453: kohaidx is missing for id in authority-koha-indexdefs.xml In authority-koha-indexdefs.xml, all tags use the namespace "kohaidx" except the tag "id". When re-generating authority-zebra-indexdefs.xsl, the line : <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/> is modified : <xslo:variable name="idfield" select="normalize-space()"/> This is an error. This patch adds kohaidx namespace to correct. Test plan : - Without patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has changed : <xslo:variable name="idfield" select="normalize-space()"/> - Apply patch - go to etc/zebradb/marc_defs/marc21/authorities/ - run : xslproc xsltproc ../../../xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl - read authority-zebra-indexdefs.xsl => the line has not changed (same for unimarc flavor) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> As Mirko mentioned, the xslt's now generate the facet-processing templates in the authority xslt's too. They are harmless because we don't define facets for authority records. If we did, it would be harmless too. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 40839 [details] [review] [PASSED QA] Bug 14453: (followup) Fix shipped XSLT files Make the shipped XSLTs for authorities (MARC21 and UNIMARC) the same as the generated version Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Good catch Frido!
Pushed to 3.20.x will be in 3.20.2
Pushed to 3.18.x will be in 3.18.09
Pushed to 3.16.x, will be in 3.16.13