[Bug 17807] New: Use XSLT_Handler in oai.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Bug ID: 17807 Summary: Use XSLT_Handler in oai.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 58348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58348&action=edit Bug 17807: Add format parameter to XSLT_Handler->transform Format may be chars (default), bytes or xmldoc. Note: xmldoc is a XML::LibXML document object. Since the default is chars, this does not affect current use. Note: The format parameter (xmldoc) will be used later in one of the OAI modules to prevent duplicated xml parsing. Test plan: Run t/db_dependent/XSLT_Handler.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 58349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58349&action=edit Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/Koha/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58348|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 63463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63463&action=edit Bug 17807: Add format parameter to XSLT_Handler->transform Format may be chars (default), bytes or xmldoc. Note: xmldoc is a XML::LibXML document object. Since the default is chars, this does not affect current use. Note: The format parameter (xmldoc) will be used later in one of the OAI modules to prevent duplicated xml parsing. Test plan: Run t/db_dependent/XSLT_Handler.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #58349|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 63464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63464&action=edit Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/Koha/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Rebased (waiting since Dec 21) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63464|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 63935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63935&action=edit Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com Status|Needs Signoff |Failed QA --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Marcel, when I try to get record in marc21 metadata format, I am getting the oai_dc record.... I should get marcxml.... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Josef Moravec from comment #7)
Marcel, when I try to get record in marc21 metadata format, I am getting the oai_dc record.... I should get marcxml....
I tested again and I see DC output and marcxml. Did you restart Plack? Can you show the URLs you are using? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc --> oai_dc, that's OK /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml --> marcxml, that's OK /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marc21 --> oai_dc, that's NOT OK -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 64045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64045&action=edit Bug 17807: [Follow-up] Use marcxml for marc21 prefix Not sure what happened here, but this is an easy fix. Test plan: Try oai.pl with marcxml, marc21 and oai_dc again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63463|0 |1 is obsolete| | Attachment #63935|0 |1 is obsolete| | Attachment #64045|0 |1 is obsolete| | --- Comment #11 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 64046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64046&action=edit [SIGNED-OFF] Bug 17807: Add format parameter to XSLT_Handler->transform Format may be chars (default), bytes or xmldoc. Note: xmldoc is a XML::LibXML document object. Since the default is chars, this does not affect current use. Note: The format parameter (xmldoc) will be used later in one of the OAI modules to prevent duplicated xml parsing. Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 64047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64047&action=edit [SIGNED-OFF] Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #13 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 64048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64048&action=edit [SIGNED-OFF] Bug 17807: [Follow-up] Use marcxml for marc21 prefix Not sure what happened here, but this is an easy fix. Test plan: Try oai.pl with marcxml, marc21 and oai_dc again. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #14 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Marcel de Rooy from comment #10)
Created attachment 64045 [details] [review] Bug 17807: [Follow-up] Use marcxml for marc21 prefix
Not sure what happened here, but this is an easy fix.
Test plan: Try oai.pl with marcxml, marc21 and oai_dc again.
Thanks for quick followup, now it's working perfect, so I signing off ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Josef Moravec from comment #14)
Thanks for quick followup, now it's working perfect, so I signing off ;)
Same for you ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Everything seems to work fine here, however, errors are really noisy if the file is not found - this shouldn't be an issue really since file isn't configurable, but should it be a little quieter? Waiting for answer before PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19018 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19018 [Bug 19018] Can we make XSLT_Handler a little bit less verbose ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #16)
Everything seems to work fine here, however, errors are really noisy if the file is not found - this shouldn't be an issue really since file isn't configurable, but should it be a little quieter? Waiting for answer before PQA
File should be there obviously, but you are right. We could reduce the noise a bit. Opened a new report for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64046|0 |1 is obsolete| | Attachment #64047|0 |1 is obsolete| | Attachment #64048|0 |1 is obsolete| | --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 65534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65534&action=edit Bug 17807: Add format parameter to XSLT_Handler->transform Format may be chars (default), bytes or xmldoc. Note: xmldoc is a XML::LibXML document object. Since the default is chars, this does not affect current use. Note: The format parameter (xmldoc) will be used later in one of the OAI modules to prevent duplicated xml parsing. Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 65535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65535&action=edit Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 65536 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65536&action=edit Bug 17807: [Follow-up] Use marcxml for marc21 prefix Not sure what happened here, but this is an easy fix. Test plan: Try oai.pl with marcxml, marc21 and oai_dc again. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65534|0 |1 is obsolete| | Attachment #65535|0 |1 is obsolete| | Attachment #65536|0 |1 is obsolete| | --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66635&action=edit Bug 17807: Add format parameter to XSLT_Handler->transform Format may be chars (default), bytes or xmldoc. Note: xmldoc is a XML::LibXML document object. Since the default is chars, this does not affect current use. Note: The format parameter (xmldoc) will be used later in one of the OAI modules to prevent duplicated xml parsing. Test plan: Run t/db_dependent/XSLT_Handler.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66636 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66636&action=edit Bug 17807: Use XSLT_Handler in Koha::OAI Replacing some code in the OAI modules by a call to an existing module. Note that the xmldoc format is used in the transform call to get a xml document object. The stylesheet method of Repository now only returns the name of the xsl file to be used instead of a cached xslt object. Similar functionality inside XSLT_Handler is used when calling transform. Note: We still lack unit tests in this area. I did not see the need for adding something for stylesheet since it only returns a simple string. The other change is made in Record::new; there are no tests for this module yet and the heart of the change here is actually tested already in XSLT_Handler.t. Note: I benchmarked calls to Repository in the old and the new situation and did not see significant changes. Test plan: [1] Run t/db_dependent/OAI/Server.t [2] Run oai.pl with ListRecords and marcxml. [3] Run oai.pl with ListRecords and oai_dc. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 66637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66637&action=edit Bug 17807: [Follow-up] Use marcxml for marc21 prefix Not sure what happened here, but this is an easy fix. Test plan: Try oai.pl with marcxml, marc21 and oai_dc again. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19353 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17807 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #25 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org