[Bug 9415] New: XML catalogue export is missing root node
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Bug ID: 9415 Summary: XML catalogue export is missing root node Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: fridolyn.somers@biblibre.com When exporting some biblio or authorities records with tools/export.pl (via web client or command-line) : If choosing XML format, you get a concatenation of full XML records : <?xml version="1.0" encoding="UTF-8"?> <record> ... </record> <?xml version="1.0" encoding="UTF-8"?> <record> ... </record> ... This file should have a root node. It should use MARC::File::XML: http://search.cpan.org/~gmcharlt/MARC-XML-0.93/lib/MARC/File/XML.pm#close%28... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|XML catalogue export is |XML catalog export is |missing root node |missing root node -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |fridolyn.somers@biblibre.co | |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 14658 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14658&action=edit Proposed patch See commit comment -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14658|0 |1 is obsolete| | --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 14660 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14660&action=edit Proposed patch Little update of patch to format with perltidy -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14660|0 |1 is obsolete| | --- Comment #3 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 14661 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14661&action=edit Proposed patch (Wrong previous patch upload) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14661|0 |1 is obsolete| | --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 14719 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14719&action=edit Bug 9415: XML catalog export is missing root node When exporting some biblio or authorities records with tools/export.pl (via web client or command-line) : If choosing XML format, you get a concatenation of full XML records. This patch uses MARC::File::XML to create a well formated file. See http://search.cpan.org/~gmcharlt/MARC-XML-0.93/lib/MARC/File/XML.pm#close%28... Test plan: - Go to Tools/Export data - Enter numbers in from and to biblio number (make sure that at least two records will be exported). - Select xml in file format - Click "Export bibliographic records" - Save file somewhere - Look at downloaded file => File should look like : <?xml version="1.0" encoding="UTF-8"?> <collection ... <record> ... </record> <record> ... </record> </collection> => "collection" is the root node and XML declaration exists only once - Do the same for authorities export and command-line use of tools/export.pl Second test plan: - From the command line, run tools/export.pl, e.g., tools/export.pl --format=xml --filename=bibs.xml - Verify that the output is valid XML, e.g., xmllint --noout bibs.xml # if the file is valid, no error messages will be displayed Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com QA Contact| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment * small patch, that sounds logical and fixes a nasty problem * passes koha-qa.pl passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14719|0 |1 is obsolete| | --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16432 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16432&action=edit Bug 9415: XML catalog export is missing root node When exporting some biblio or authorities records with tools/export.pl (via web client or command-line) : If choosing XML format, you get a concatenation of full XML records. This patch uses MARC::File::XML to create a well formated file. See http://search.cpan.org/~gmcharlt/MARC-XML-0.93/lib/MARC/File/XML.pm#close%28... Test plan: - Go to Tools/Export data - Enter numbers in from and to biblio number (make sure that at least two records will be exported). - Select xml in file format - Click "Export bibliographic records" - Save file somewhere - Look at downloaded file => File should look like : <?xml version="1.0" encoding="UTF-8"?> <collection ... <record> ... </record> <record> ... </record> </collection> => "collection" is the root node and XML declaration exists only once - Do the same for authorities export and command-line use of tools/export.pl Second test plan: - From the command line, run tools/export.pl, e.g., tools/export.pl --format=xml --filename=bibs.xml - Verify that the output is valid XML, e.g., xmllint --noout bibs.xml # if the file is valid, no error messages will be displayed Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9415 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x will be in 3.10.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org